Join us and the lead editor of IRL, Mozilla's multi-award-winning podcast, for a behind-the-scenes look at the pod and to contribute your ideas for the next season, themed: "AI and ME." Mark your calendar and join our Community Call on Wednesday, Aug 7, 17:00–17:45 UTC. See you there!

Rechercher dans l’assistance

Évitez les escroqueries à l’assistance. Nous ne vous demanderons jamais d’appeler ou d’envoyer un SMS à un numéro de téléphone ou de partager des informations personnelles. Veuillez signaler toute activité suspecte en utilisant l’option « Signaler un abus ».

En savoir plus

How to include a client side certificate (for server authentication) into Firefox profile through command line?

  • 1 réponse
  • 2 ont ce problème
  • 12 vues
  • Dernière réponse par cor-el

more options

I'm automating the use-cases for a web based application, for which the client and server has to authenticate using a signed certificate (by Internationally recognized authorities). As this is a test environment, this is neither a CA signed certificate at server nor at client side. So I'm using self signed certificates, and using them. So when I access the web application, browser first throws 'untrusted certificate error' for which I handled using below snippet - .... ProfilesIni allProfiles = new ProfilesIni(); if (isHTTPS) { System.setProperty("webdriver.firefox.profile", "default"); String browserProfile = System.getProperty("webdriver.firefox.profile"); FirefoxProfile profile = allProfiles.getProfile(browserProfile); profile.setAcceptUntrustedCertificates(true); } driver = new FirefoxDriver(); selenium = new WebDriverBackedSelenium(driver, url); selenium.setTimeout("300000"); selenium.open(uri); ...

Now to authenticate the server request from the client side, I need to respond with an appropriate client side certificate, which server can understand and respect the client request.

How to handle this scenario pragmatically?

Also not that I need to have different client certificates for each of test case scenarios, so I need to prepare the Firefox profile dynamically for each of the test cases by modifying the existing Firefox profile, i.e., I need to remove the certificate at the end of the test case and include the newly created client certificate. How can I accomplish this?

I'm automating the use-cases for a web based application, for which the client and server has to authenticate using a signed certificate (by Internationally recognized authorities). As this is a test environment, this is neither a CA signed certificate at server nor at client side. So I'm using self signed certificates, and using them. So when I access the web application, browser first throws 'untrusted certificate error' for which I handled using below snippet - .... ProfilesIni allProfiles = new ProfilesIni(); if (isHTTPS) { System.setProperty("webdriver.firefox.profile", "default"); String browserProfile = System.getProperty("webdriver.firefox.profile"); FirefoxProfile profile = allProfiles.getProfile(browserProfile); profile.setAcceptUntrustedCertificates(true); } driver = new FirefoxDriver(); selenium = new WebDriverBackedSelenium(driver, url); selenium.setTimeout("300000"); selenium.open(uri); ... Now to authenticate the server request from the client side, I need to respond with an appropriate client side certificate, which server can understand and respect the client request. How to handle this scenario pragmatically? Also not that I need to have different client certificates for each of test case scenarios, so I need to prepare the Firefox profile dynamically for each of the test cases by modifying the existing Firefox profile, i.e., I need to remove the certificate at the end of the test case and include the newly created client certificate. How can I accomplish this?

Toutes les réponses (1)

more options

You would need to build the certutil tool to manipulate the cer8.db file.