|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.freshcookies.security.cert.SSLHelper
public class SSLHelper
Extracts SSL certificates from a specified webserver and optionally adds them to the JSSE truststore.
Field Summary | |
---|---|
protected static int |
SSL_PORT
Default SSL port. |
Constructor Summary | |
---|---|
SSLHelper()
Constructs a new SSLHelper. |
Method Summary | |
---|---|
static java.security.cert.Certificate[] |
extractSSLCertificates(java.lang.String hostname,
int port)
Helper method that connects to a specified host using SSL and extracts the server's peer certificates. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int SSL_PORT
Constructor Detail |
---|
public SSLHelper()
Method Detail |
---|
public static java.security.cert.Certificate[] extractSSLCertificates(java.lang.String hostname, int port)
SSLContext
is
created using a "null" trust manager that accepts all peer SSL certificates
as trusted. The null trust manager is provided by the method
nullTrustManager
. Note that in the array of Certificates
returned by this method, the first certficate is the server's own
certificate; the ones that follow are the certificate authorities in the
chain.
hostname
-
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |