Allow alias and password to be configured on a per PEM store basis

Closes gh-38124
This commit is contained in:
Phillip Webb
2023-10-30 16:04:58 -07:00
parent 8bf847e549
commit 2c6fca8df7
5 changed files with 122 additions and 50 deletions

View File

@@ -107,10 +107,11 @@ public final class PropertiesSslBundle implements SslBundle {
}
private static SslStoreBundle asSslStoreBundle(PemSslBundleProperties properties) {
PemSslStoreDetails keyStoreDetails = asStoreDetails(properties.getKeystore());
PemSslStoreDetails trustStoreDetails = asStoreDetails(properties.getTruststore());
return new PemSslStoreBundle(keyStoreDetails, trustStoreDetails, properties.getKey().getAlias(), null,
properties.isVerifyKeys());
PemSslStoreDetails keyStoreDetails = asStoreDetails(properties.getKeystore())
.withAlias(properties.getKey().getAlias());
PemSslStoreDetails trustStoreDetails = asStoreDetails(properties.getTruststore())
.withAlias(properties.getKey().getAlias());
return new PemSslStoreBundle(keyStoreDetails, trustStoreDetails, properties.isVerifyKeys());
}
private static PemSslStoreDetails asStoreDetails(PemSslBundleProperties.Store properties) {