Collections.singleton(new X500Principal("CN=bob")),
Collections.EMPTY_SET, Collections.EMPTY_SET);
final SslServerEndpoint se =
SslServerEndpoint.getInstance(s, null, null, 0);
final MethodConstraints nomc =
new BasicMethodConstraints(InvocationConstraints.EMPTY);
final InvocationLayerFactory uilf =
new BasicILFactory(nomc, null);
// check that null server endpoint throws NPE
try {
new BasicJeriExporter(null, uilf);
throw new RuntimeException("null endpoint did not cause NPE");
} catch (NullPointerException e) {
}
// check that null il factory throws NPE
try {
new BasicJeriExporter(se, null);
throw new RuntimeException("null il factory did not cause NPE");
} catch (NullPointerException e) {
}
InvocationConstraints sauth =
new InvocationConstraints(ServerAuthentication.YES, null);
MethodConstraints samc = new BasicMethodConstraints(sauth);
final InvocationLayerFactory ailf =
new BasicILFactory(samc, null);
// check that subject cannot satisfy server authentication
BasicJeriExporter exp = new BasicJeriExporter(se, ailf);
try {