22 lines
799 B
XML
22 lines
799 B
XML
<?xml version='1.0' encoding='utf-8' ?>
|
|
<!DOCTYPE programlisting PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
]>
|
|
<!-- Automatically generated file. Do not edit. -->
|
|
<programlisting language="Java">
|
|
SSLContext ctx;
|
|
try {
|
|
ctx = SSLContext.getInstance("TLSv1.2", "SunJSSE");
|
|
} catch (NoSuchAlgorithmException e) {
|
|
try {
|
|
ctx = SSLContext.getInstance("TLSv1", "SunJSSE");
|
|
} catch (NoSuchAlgorithmException e1) {
|
|
throw new AssertionError(e1);
|
|
} catch (NoSuchProviderException e1) {
|
|
throw new AssertionError(e1);
|
|
}
|
|
} catch (NoSuchProviderException e) {
|
|
throw new AssertionError(e);
|
|
}
|
|
MyTrustManager tm = new MyTrustManager(certHash);
|
|
ctx.init(null, new TrustManager[] {tm}, null);
|
|
</programlisting>
|