static TlsEncryptionCredentials loadEncryptionCredentials( TlsContext context, String[] certResources, String keyResource) throws IOException { Certificate certificate = loadCertificateChain(certResources); AsymmetricKeyParameter privateKey = loadPrivateKeyResource(keyResource); return new DefaultTlsEncryptionCredentials(context, certificate, privateKey); }
static TlsEncryptionCredentials loadEncryptionCredentials(TlsContext context, String[] certResources, String keyResource) throws IOException { Certificate certificate = loadCertificateChain(certResources); AsymmetricKeyParameter privateKey = loadPrivateKeyResource(keyResource); return new DefaultTlsEncryptionCredentials(context, certificate, privateKey); }
static TlsEncryptionCredentials loadEncryptionCredentials( TlsContext context, String[] certResources, String keyResource) throws IOException { Certificate certificate = loadCertificateChain(certResources); AsymmetricKeyParameter privateKey = loadPrivateKeyResource(keyResource); return new DefaultTlsEncryptionCredentials(context, certificate, privateKey); }
/** * {@inheritDoc} * * Depending on the <tt>selectedCipherSuite</tt>, <tt>DefaultTlsServer</tt> * will require either <tt>rsaEncryptionCredentials</tt> or * <tt>rsaSignerCredentials</tt> neither of which is implemented by * <tt>DefaultTlsServer</tt>. */ @Override protected TlsEncryptionCredentials getRSAEncryptionCredentials() throws IOException { if (rsaEncryptionCredentials == null) { CertificateInfo certificateInfo = getDtlsControl().getCertificateInfo(); rsaEncryptionCredentials = new DefaultTlsEncryptionCredentials( context, certificateInfo.getCertificate(), certificateInfo.getKeyPair().getPrivate()); } return rsaEncryptionCredentials; }