title: Firefox Profile does not work when I copy it to CentOS
body: <p>This is a continuation to an earlier question (<a href="https://stackoverflow.com/questions/49037666/authenticating-selenium-webdriver-java-with-p12-certificate">Authenticating Selenium WebDriver (Java) with .p12 certificate</a>). I found a partial solution to that question, but am stuck here.</p>
  
  <p>I created a firefox profile named "eAgency-Client1", following directions similar to these: <a href="https://seleniumbycharan.wordpress.com/2015/07/12/how-to-create-custom-firefox-profile-in-selenium-webdriver/" rel="nofollow noreferrer">https://seleniumbycharan.wordpress.com/2015/07/12/how-to-create-custom-firefox-profile-in-selenium-webdriver/</a> </p>
  
  <p>I have a certificate named "client1.p12" that I use to authenticate with a server. I set up the aforementioned profile to use that certificate. After step 7 in the profile creation process, I went to the newly opened firefox browser and went to Options->Privacy &amp; Security->Certificates->View Certificates, selected the "Your Certificates" tab, clicked "Import", browsed to the "client1.p12" file and entered the password. </p>
  
  <p>I am using this profile ("eAgency-Client1") with Selenium. I access the site I am working with by using Selenium code like the following:</p>
  
  <pre><code>ProfilesIni profile = new ProfilesIni();
  FirefoxProfile ffProfile = profile.getProfile("eAgency-Client1");
  ffProfile.setPreference("security.default_personal_cert", "Select Automatically");
  . . . 
  FirefoxOptions firefoxOptions = new FirefoxOptions();
  . . . 
  firefoxOptions.setProfile(ffProfile);
  . . .
  driver = new FirefoxDriver(firefoxOptions);
  . . . 
  driver.get(&lt;URL&gt;);
  </code></pre>
  
  <p>Unfortunately, this code functions differently on my local machine and on the Jenkins server. I checked this by printing out the page source.</p>
  
  <p>When I run it locally, the resultant source is what I expect it to be (too long to copy here.) When I run it in Jenkins, I get the following:</p>
  
  <pre><code>&lt;html&gt;&lt;head&gt;&lt;title&gt;400 No required SSL certificate was sent&lt;/title&gt;&lt;/head&gt;
  &lt;body bgcolor="white"&gt;
  &lt;center&gt;&lt;h1&gt;400 Bad Request&lt;/h1&gt;&lt;/center&gt;
  &lt;center&gt;No required SSL certificate was sent&lt;/center&gt;
  &lt;hr&gt;&lt;center&gt;nginx/1.10.2&lt;/center&gt;
  
  
  &lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>This is what I would get locally before I started using that profile. It indicates that the "client1.p12" was not getting sent. Once I started using the profile, the profile would allow firefox to send the certificate. I know, however, that the profile was successfully copied to Jenkins and is being used, because if it was not the following line </p>
  
  <pre><code>FirefoxProfile ffProfile = profile.getProfile("eAgency-Client1");
  </code></pre>
  
  <p>would return a null. It does not, so the profile it returns is legitimate. This profile is identical to what I have locally and it should have the information to provide the certificate. It does not, however, appear to be sending the certificate.</p>
  
  <p>Does anyone have any idea how this could be happening? The evidence suggests that the profile allows the user to send the certificate. The evidence also suggests that the Jenkins project is using the profile. However, it also looks like the certificate is not getting sent. </p>
  
  <p>Any idea what the weak link could be?</p>