This is a migrated thread and some comments may be shown as answers.

CertMaker.createRootCert() return false

5 Answers 286 Views
Windows
This is a migrated thread and some comments may be shown as answers.
Message
Top achievements
Rank 1
Message asked on 24 Dec 2020, 12:59 PM

I called CertMaker.createRootCert () returns false,

But I don't know what causes this situation?

How to solve this problem?

If createrootcert() fails, calling trustRootCert() will crash the application

5 Answers, 1 is accepted

Sort by
0
Message
Top achievements
Rank 1
answered on 24 Dec 2020, 01:06 PM
I am using a Windows 7 system. I can't create a root certificate even if I run as an administrator
0
Nick Iliev
Telerik team
answered on 24 Dec 2020, 01:19 PM

Hello,

 

There might be multiple reasons why the certificate creation is not working (e.g., insufficient rights, locked folder, already created, and existing certificate). You could make your business logic so that the certificate installation process is handled for different occasions.

For example:

public static bool InstallCertificate()
{
    if (!CertMaker.rootCertExists())
    {
        if (!CertMaker.createRootCert())
            return false; // or do whatever the business logic requires - e.g. inform the user

        if (!CertMaker.trustRootCert())
            return false;
    }

    return true;
}

Calling the trustmethod should not crash the app, but without a generated certificate, the FiddlerCore proxy won't capture any secure traffic (it will still capture non-secure traffic).

Regards,
Nick Iliev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Message
Top achievements
Rank 1
answered on 24 Dec 2020, 01:54 PM

Thank you for your kind reply

CertMaker.rootCertExists()   // The return is false

CertMaker.createRootCert()   // The return is false

My computer is Windows 7 32 bit

All Fiddler's certificates have been removed

insufficient rights, But I've run Fiddler as an administrator

locked folder, Which folder do you mean locked?

Please guide me to create the certificate successfully

0
Message
Top achievements
Rank 1
answered on 25 Dec 2020, 02:43 PM

Please help me. 

 

0
Nick Iliev
Telerik team
answered on 27 Dec 2020, 09:00 AM

Hey there,

 

If possible, please share the code implementation for creating and enabling the certificate - this way, I would be able to test the scenario on my side and continue the investigation.

 

Meanwhile, you could check if the certificate s existing in your certificate manager (see how here). Once Fiddler installed the certificate, it should be present in the Certificate Manager app under Personal > Certificates with the name DO_NOT_TRUST_FIddlerRoot.

 

You could also check this blog post about some specific with the non-sticky certificates created by CertMaker and follow some of the suggestions.

 

Regards,
Nick Iliev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Windows
Asked by
Message
Top achievements
Rank 1
Answers by
Message
Top achievements
Rank 1
Nick Iliev
Telerik team
Share this question
or