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 2017/12/01 20:05:54 UTC
svn commit: r1816901 - in /jmeter/trunk:
src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java xdocs/changes.xml
Author: pmouawad
Date: Fri Dec 1 20:05:54 2017
New Revision: 1816901
URL: http://svn.apache.org/viewvc?rev=1816901&view=rev
Log:
Bug 61843 - HTTP(S) Test Script Recorder : Add SAN to JMeter generated CA Certificate
Contributed by Matthew Buckett
This closes #347
Bugzilla Id: 61843
Modified:
jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java
jmeter/trunk/xdocs/changes.xml
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=1816901&r1=1816900&r2=1816901&view=diff
==============================================================================
--- jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java (original)
+++ jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java Fri Dec 1 20:05:54 2017
@@ -281,18 +281,19 @@ public class KeyToolUtils {
private static void generateSignedCert(File keystore, String password,
int validity, String alias, String subject) throws IOException {
String dname = "cn=" + subject + ", o=JMeter Proxy (TEMPORARY TRUST ONLY)";
- KeyToolUtils.genkeypair(keystore, alias, password, validity, dname, null);
+ String ext = "san=dns:" + subject;
+ KeyToolUtils.genkeypair(keystore, alias, password, validity, dname, ext);
//rem generate cert for DOMAIN using CA and import it
// get the certificate request
ByteArrayOutputStream certReqOut = new ByteArrayOutputStream();
- KeyToolUtils.keytool("-certreq", keystore, password, alias, null, certReqOut);
+ KeyToolUtils.keytool("-certreq", keystore, password, alias, null, certReqOut, "-ext", ext);
// create the certificate
//rem ku:c=dig,keyE means KeyUsage:critical=digitalSignature,keyEncipherment
InputStream certReqIn = new ByteArrayInputStream(certReqOut.toByteArray());
ByteArrayOutputStream certOut = new ByteArrayOutputStream();
- KeyToolUtils.keytool("-gencert", keystore, password, INTERMEDIATE_CA_ALIAS, certReqIn, certOut, "-ext", "ku:c=dig,keyE");
+ KeyToolUtils.keytool("-gencert", keystore, password, INTERMEDIATE_CA_ALIAS, certReqIn, certOut, "-ext", "ku:c=dig,keyE", "-ext ", ext);
// import the certificate
InputStream certIn = new ByteArrayInputStream(certOut.toByteArray());
Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1816901&r1=1816900&r2=1816901&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
+++ jmeter/trunk/xdocs/changes.xml [utf-8] Fri Dec 1 20:05:54 2017
@@ -98,6 +98,7 @@ Summary
<li><bug>61672</bug>HTTP(S) Test Script Recorder : Have the ability to choose the sampler name while keeping the ability to just add a prefix</li>
<li><bug>53957</bug>HTTP Request : In Parameters tab, allow pasting of content coming from Firefox and Chrome (unparsed)</li>
<li><bug>61587</bug>Drop properties <code>sampleresult.getbytes.headers_size</code> and <code>sampleresult.getbytes.body_real_size</code></li>
+ <li><bug>61843</bug>HTTP(S) Test Script Recorder : Add SAN to JMeter generated CA Certificate. Contributed by Matthew Buckett</li>
</ul>
<h3>Other samplers</h3>
@@ -267,6 +268,7 @@ Summary
<li>Artem Fedorov (artem at blazemeter.com)</li>
<li><a href="https://www.blazemeter.com">BlazeMeter Ltd</a></li>
<li>Benny van Wijngaarden (benny at smaragd-it.nl)</li>
+ <li>Matthew Buckett (https://github.com/buckett)</li>
</ul>
<p>We also thank bug reporters who helped us improve JMeter. <br/>
For this release we want to give special thanks to the following reporters for the clear reports and tests made after our fixes:</p>