Skip to content

Commit dd93d6b

Browse files
author
Matthew Sackman
committed
inital work on getting ant sufficiently smart. again same dumb mistake as with erlang client and making extras certs with no need. will rip out tomorrow
1 parent 57e983a commit dd93d6b

File tree

2 files changed

+45
-4
lines changed

2 files changed

+45
-4
lines changed

build.xml

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,50 @@
106106
</fileset>
107107
</javadoc>
108108
</target>
109-
109+
110+
<target name="detect-ssl">
111+
<property environment="env"/>
112+
<property name="SSL_CERTS_DIR" value="${env.SSL_CERTS_DIR}"/>
113+
<available property="SSL_AVAILABLE" file="${SSL_CERTS_DIR}/Makefile"/>
114+
</target>
115+
116+
<target name="make-client-ssl-certs" if="SSL_AVAILABLE" depends="detect-ssl">
117+
<exec executable="mktemp" outputproperty="CLIENT_SSL_DIR" failonerror="true" osfamily="unix">
118+
<arg value="-d"/>
119+
</exec>
120+
<exec executable="make" failonerror="true" osfamily="unix">
121+
<arg line="-C ${SSL_CERTS_DIR} all DIR=${CLIENT_SSL_DIR}"/>
122+
</exec>
123+
<exec executable="keytool" failonerror="true" osfamily="unix">
124+
<arg line="-import"/>
125+
<arg value="-alias"/>
126+
<arg value="server1"/>
127+
<arg value="-file"/>
128+
<arg value="${SSL_CERTS_DIR}/server/cert.pem"/>
129+
<arg value="-keystore"/>
130+
<arg value="${CLIENT_SSL_DIR}/clientstore"/>
131+
<arg value="-noprompt"/>
132+
<arg value="-storepass"/>
133+
<arg value="bunnies"/>
134+
</exec>
135+
<exec executable="keytool" failonerror="true" osfamily="unix" inputstring="\n\n">
136+
<arg value="-genkey"/>
137+
<arg value="-keystore"/>
138+
<arg value="${CLIENT_SSL_DIR}/clientstore"/>
139+
<arg value="-noprompt"/>
140+
<arg value="-storepass"/>
141+
<arg value="bunnies"/>
142+
<arg value="-dname"/>
143+
<arg value="CN=cName, OU=orgUnit, O=org, L=city, S=state, C=countryCode"/>
144+
</exec>
145+
</target>
146+
147+
<target name="remove-client-ssl-certs" if="SSL_AVAILABLE" depends="make-client-ssl-certs">
148+
<delete includeemptydirs="true">
149+
<fileset dir="${CLIENT_SSL_DIR}" includes="**/*" />
150+
</delete>
151+
</target>
152+
110153
<target name="test-prepare">
111154
<property name="haltOnFailureJunit" value="yes" />
112155
<property name="haltOnFailureJava" value="true" />

test/src/com/rabbitmq/client/test/Bug19356Test.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,10 @@
3131
package com.rabbitmq.client.test;
3232

3333
import java.io.IOException;
34-
import java.security.NoSuchAlgorithmException;
3534
import java.security.KeyManagementException;
35+
import java.security.NoSuchAlgorithmException;
3636

3737
import com.rabbitmq.client.GetResponse;
38-
import com.rabbitmq.client.AMQP;
39-
4038
import com.rabbitmq.client.test.functional.BrokerTestCase;
4139

4240
/**

0 commit comments

Comments
 (0)