简体   繁体   中英

Determine if a FirefoxProfile is accepting untrusted certificates or not

How can you check if a Firefox profile is accepting untrusted certificates?

I know you can set it true/false with code like this:

    FirefoxProfile profile = new FirefoxProfile();
    profile.setAcceptUntrustedCertificates(false);

But how can you determine what a FirefoxProfile has it set to?

Quoting from the docs :

public void setAcceptUntrustedCertificates(boolean acceptUntrustedSsl)

Sets whether Firefox should accept SSL certificates which have expired, signed by an unknown authority or are generally untrusted. This is set to true by default .

So unless you change it to false, its already true and by the code one should know when using your controls has the flag been changed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM