You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2014/09/13 15:50:57 UTC

svn commit: r1624740 - /jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java

Author: pmouawad
Date: Sat Sep 13 13:50:57 2014
New Revision: 1624740

URL: http://svn.apache.org/r1624740
Log:
Bug 56057 - JMeter does not create ApacheJMeterTemporaryRootCA.crt when starting a recording
Add a checks for generation of CRT before copying it
Bugzilla Id: 56057

Modified:
    jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java

Modified: jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java?rev=1624740&r1=1624739&r2=1624740&view=diff
==============================================================================
--- jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java (original)
+++ jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java Sat Sep 13 13:50:57 2014
@@ -251,7 +251,11 @@ public class KeyToolUtils {
         // Export the Root CA for Firefox/Chrome/IE
         KeyToolUtils.keytool("-exportcert", keystore, password, ROOTCA_ALIAS, null, null, "-rfc", "-file", ROOT_CACERT_CRT);
         // Copy for Opera
-        FileUtils.copyFile(caCert_crt, caCert_usr);
+        if(caCert_crt.exists() && caCert_crt.canRead()) {
+            FileUtils.copyFile(caCert_crt, caCert_usr);            
+        } else {
+            log.warn("Failed creating "+caCert_crt.getAbsolutePath()+", check 'keytool' utility in path is available and points to a JDK >= 7");
+        }
     }
 
     /**