Skip to content

Commit c0d3336

Browse files
committed
Add an overload of useSslProtocol that takes a full SSLContext
1 parent c066c9c commit c0d3336

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/com/rabbitmq/client/ConnectionFactory.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,17 @@ public void useSslProtocol(String protocol, TrustManager trustManager)
131131
setSocketFactory(c.getSocketFactory());
132132
}
133133

134+
/**
135+
* Convenience method for setting up an SSL socket factory.
136+
* Pass in an initialized SSLContext.
137+
*
138+
* @param context An initialized SSLContext
139+
*/
140+
public void useSslProtocol(SSLContext context)
141+
{
142+
setSocketFactory(context.getSocketFactory());
143+
}
144+
134145
/**
135146
* The default SSL protocol (currently "SSLv3").
136147
*/

0 commit comments

Comments
 (0)