본 사이트는 여러분의 사용자 경험을 개선하기 위해 유지 보수를 진행하는 동안 기능이 제한됩니다. 도움말로 문제가 해결되지 않고 질문을 하고 싶다면 Twitter의 @FirefoxSupport 및 Reddit의 /r/firefox 채널을 활용하세요.

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

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

  • 1 답장
  • 2 이 문제를 만남
  • 12 보기
  • 최종 답변자: 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?

모든 댓글 (1)

more options

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