Skip to content

Commit

Permalink
Fix NPE in bsserver-demo with x509 auth mode
Browse files Browse the repository at this point in the history
Signed-off-by: Tolgahan Akgun <akguntolgahan@gmail.com>
  • Loading branch information
tolgahanakgun committed Apr 29, 2020
1 parent 1af49e0 commit ba072b6
Showing 1 changed file with 1 addition and 12 deletions.
Expand Up @@ -189,18 +189,7 @@ public static void createAndStartServer(String webAddress, int webPort, String l
builder.setCertificateChain(new X509Certificate[] { serverCertificate });

// Use a certificate verifier which trust all certificates by default.
dtlsConfig.setCertificateVerifier(new CertificateVerifier() {
@Override
public void verifyCertificate(CertificateMessage message, DTLSSession session)
throws HandshakeException {
// trust all means never raise HandshakeException
}

@Override
public X509Certificate[] getAcceptedIssuers() {
return null;
}
});
builder.setTrustedCertificates(new X509Certificate[0]);
} catch (Exception e) {
LOG.error("Unable to load embedded X.509 certificate.", e);
System.exit(-1);
Expand Down

0 comments on commit ba072b6

Please sign in to comment.