Decrypt key credentials in keystore-legacy
[netconf.git] / keystore / keystore-legacy / src / main / java / org / opendaylight / netconf / keystore / legacy / NetconfKeystore.java
index 0f04c0b6eba0e8134688df3da4063733a92c0bc4..939b3ee9567174b3e33e0ba191ac6317ef54661e 100644 (file)
@@ -7,6 +7,7 @@
  */
 package org.opendaylight.netconf.keystore.legacy;
 
+import java.security.KeyPair;
 import java.security.cert.X509Certificate;
 import java.util.Map;
 import org.eclipse.jdt.annotation.NonNullByDefault;
@@ -15,11 +16,13 @@ import org.opendaylight.yangtools.concepts.Immutable;
 @NonNullByDefault
 public record NetconfKeystore(
         Map<String, CertifiedPrivateKey> privateKeys,
-        Map<String, X509Certificate> trustedCertificates) implements Immutable {
-    public static final NetconfKeystore EMPTY = new NetconfKeystore(Map.of(), Map.of());
+        Map<String, X509Certificate> trustedCertificates,
+        Map<String, KeyPair> credentials) implements Immutable {
+    public static final NetconfKeystore EMPTY = new NetconfKeystore(Map.of(), Map.of(), Map.of());
 
     public NetconfKeystore {
         privateKeys = Map.copyOf(privateKeys);
         trustedCertificates = Map.copyOf(trustedCertificates);
+        credentials = Map.copyOf(credentials);
     }
 }