@Test void getPrivateKey_aliasNotSupported() { PrivateKey privateKey = spiffeKeyManager.getPrivateKey("other_alias"); assertNull(privateKey); }
@Override public PrivateKey getPrivateKey(final String alias) { if (!Objects.equals(alias, DEFAULT_ALIAS)) { return null; } val x509Svid = x509SvidSource.getX509Svid(); return x509Svid.getPrivateKey(); }
SpiffeKeyManager extends X509ExtendedKeyManager { @Override public PrivateKey getPrivateKey(final String alias) { if (!Objects.equals(alias, DEFAULT_ALIAS)) { return null; } val x509Svid = x509SvidSource.getX509Svid(); return x509Svid.getPrivateKey(); } }
SpiffeKeyManager extends X509ExtendedKeyManager { @Override public PrivateKey getPrivateKey(final String alias) { if (!Objects.equals(alias, DEFAULT_ALIAS)) { return null; } val x509Svid = x509SvidSource.getX509Svid(); return x509Svid.getPrivateKey(); } SpiffeKeyManager(@NonNull final X509SvidSource x509SvidSource); }
SpiffeKeyManager extends X509ExtendedKeyManager { @Override public PrivateKey getPrivateKey(final String alias) { if (!Objects.equals(alias, DEFAULT_ALIAS)) { return null; } val x509Svid = x509SvidSource.getX509Svid(); return x509Svid.getPrivateKey(); } SpiffeKeyManager(@NonNull final X509SvidSource x509SvidSource); @Override X509Certificate[] getCertificateChain(final String alias); @Override PrivateKey getPrivateKey(final String alias); @Override String[] getClientAliases(final String keyType, final Principal[] issuers); @Override String chooseClientAlias(final String[] keyTypes, final Principal[] issuers, final Socket socket); @Override String chooseEngineClientAlias(final String[] keyTypes, final Principal[] issuers, final SSLEngine sslEngine); @Override String[] getServerAliases(final String keyType, final Principal[] issuers); @Override String chooseEngineServerAlias(final String keyType, final Principal[] issuers, final SSLEngine sslEngine); @Override String chooseServerAlias(final String keyType, final Principal[] issuers, final Socket socket); }
SpiffeKeyManager extends X509ExtendedKeyManager { @Override public PrivateKey getPrivateKey(final String alias) { if (!Objects.equals(alias, DEFAULT_ALIAS)) { return null; } val x509Svid = x509SvidSource.getX509Svid(); return x509Svid.getPrivateKey(); } SpiffeKeyManager(@NonNull final X509SvidSource x509SvidSource); @Override X509Certificate[] getCertificateChain(final String alias); @Override PrivateKey getPrivateKey(final String alias); @Override String[] getClientAliases(final String keyType, final Principal[] issuers); @Override String chooseClientAlias(final String[] keyTypes, final Principal[] issuers, final Socket socket); @Override String chooseEngineClientAlias(final String[] keyTypes, final Principal[] issuers, final SSLEngine sslEngine); @Override String[] getServerAliases(final String keyType, final Principal[] issuers); @Override String chooseEngineServerAlias(final String keyType, final Principal[] issuers, final SSLEngine sslEngine); @Override String chooseServerAlias(final String keyType, final Principal[] issuers, final Socket socket);  }