From 71b95041d6c7a6dd85ab75a2bba5143dfc5278aa Mon Sep 17 00:00:00 2001 From: Sergio Giro Date: Thu, 25 Aug 2016 15:06:25 +0100 Subject: [PATCH] java.security: update java.security.KeyStore to jdk8u60 Pulling upstream changes from OpenJDK version jdk8u60 for java.security.KeyStore. - New method getAttributes in KeyStore.Entry - New interface Attribute in KeyStore.Entry - New constructor specifying protection algorithm and protection parameters in KeyStore.PasswordProtection. - New getters for protection algorithm and protection parameters in KeyStore.PasswordProtection - In PrivateKeyEntry, SecretKeyEntry and TrustedCertificateEntry, new constructor allowing to specify attributes, and corresponding getter getAttributes. This commit also contains cosmetic JavaDoc changes like - Use of @code in place of tags. - Tidied up casts/generics. This completes the port to jdk8u60 for this class. Change-Id: Ifec9d07b8f6c367a6fa2672fd5c43747057336ad Test: make droid docs, vogar KS*{Entry,Password}*.java Bug: 29631070 --- api/current.txt | 12 ++++++++++++ api/system-current.txt | 12 ++++++++++++ api/test-current.txt | 12 ++++++++++++ 3 files changed, 36 insertions(+) diff --git a/api/current.txt b/api/current.txt index 7b184bf459c3a..2fca885e76aee 100644 --- a/api/current.txt +++ b/api/current.txt @@ -54965,6 +54965,12 @@ package java.security { } public static abstract interface KeyStore.Entry { + method public default java.util.Set getAttributes(); + } + + public static abstract interface KeyStore.Entry.Attribute { + method public abstract java.lang.String getName(); + method public abstract java.lang.String getValue(); } public static abstract interface KeyStore.LoadStoreParameter { @@ -54973,11 +54979,15 @@ package java.security { public static class KeyStore.PasswordProtection implements javax.security.auth.Destroyable java.security.KeyStore.ProtectionParameter { ctor public KeyStore.PasswordProtection(char[]); + ctor public KeyStore.PasswordProtection(char[], java.lang.String, java.security.spec.AlgorithmParameterSpec); method public synchronized char[] getPassword(); + method public java.lang.String getProtectionAlgorithm(); + method public java.security.spec.AlgorithmParameterSpec getProtectionParameters(); } public static final class KeyStore.PrivateKeyEntry implements java.security.KeyStore.Entry { ctor public KeyStore.PrivateKeyEntry(java.security.PrivateKey, java.security.cert.Certificate[]); + ctor public KeyStore.PrivateKeyEntry(java.security.PrivateKey, java.security.cert.Certificate[], java.util.Set); method public java.security.cert.Certificate getCertificate(); method public java.security.cert.Certificate[] getCertificateChain(); method public java.security.PrivateKey getPrivateKey(); @@ -54988,11 +54998,13 @@ package java.security { public static final class KeyStore.SecretKeyEntry implements java.security.KeyStore.Entry { ctor public KeyStore.SecretKeyEntry(javax.crypto.SecretKey); + ctor public KeyStore.SecretKeyEntry(javax.crypto.SecretKey, java.util.Set); method public javax.crypto.SecretKey getSecretKey(); } public static final class KeyStore.TrustedCertificateEntry implements java.security.KeyStore.Entry { ctor public KeyStore.TrustedCertificateEntry(java.security.cert.Certificate); + ctor public KeyStore.TrustedCertificateEntry(java.security.cert.Certificate, java.util.Set); method public java.security.cert.Certificate getTrustedCertificate(); } diff --git a/api/system-current.txt b/api/system-current.txt index 01a872a0897a3..3d106905c741b 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -58321,6 +58321,12 @@ package java.security { } public static abstract interface KeyStore.Entry { + method public default java.util.Set getAttributes(); + } + + public static abstract interface KeyStore.Entry.Attribute { + method public abstract java.lang.String getName(); + method public abstract java.lang.String getValue(); } public static abstract interface KeyStore.LoadStoreParameter { @@ -58329,11 +58335,15 @@ package java.security { public static class KeyStore.PasswordProtection implements javax.security.auth.Destroyable java.security.KeyStore.ProtectionParameter { ctor public KeyStore.PasswordProtection(char[]); + ctor public KeyStore.PasswordProtection(char[], java.lang.String, java.security.spec.AlgorithmParameterSpec); method public synchronized char[] getPassword(); + method public java.lang.String getProtectionAlgorithm(); + method public java.security.spec.AlgorithmParameterSpec getProtectionParameters(); } public static final class KeyStore.PrivateKeyEntry implements java.security.KeyStore.Entry { ctor public KeyStore.PrivateKeyEntry(java.security.PrivateKey, java.security.cert.Certificate[]); + ctor public KeyStore.PrivateKeyEntry(java.security.PrivateKey, java.security.cert.Certificate[], java.util.Set); method public java.security.cert.Certificate getCertificate(); method public java.security.cert.Certificate[] getCertificateChain(); method public java.security.PrivateKey getPrivateKey(); @@ -58344,11 +58354,13 @@ package java.security { public static final class KeyStore.SecretKeyEntry implements java.security.KeyStore.Entry { ctor public KeyStore.SecretKeyEntry(javax.crypto.SecretKey); + ctor public KeyStore.SecretKeyEntry(javax.crypto.SecretKey, java.util.Set); method public javax.crypto.SecretKey getSecretKey(); } public static final class KeyStore.TrustedCertificateEntry implements java.security.KeyStore.Entry { ctor public KeyStore.TrustedCertificateEntry(java.security.cert.Certificate); + ctor public KeyStore.TrustedCertificateEntry(java.security.cert.Certificate, java.util.Set); method public java.security.cert.Certificate getTrustedCertificate(); } diff --git a/api/test-current.txt b/api/test-current.txt index d936c2784130a..5b0e7de492c98 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -55045,6 +55045,12 @@ package java.security { } public static abstract interface KeyStore.Entry { + method public default java.util.Set getAttributes(); + } + + public static abstract interface KeyStore.Entry.Attribute { + method public abstract java.lang.String getName(); + method public abstract java.lang.String getValue(); } public static abstract interface KeyStore.LoadStoreParameter { @@ -55053,11 +55059,15 @@ package java.security { public static class KeyStore.PasswordProtection implements javax.security.auth.Destroyable java.security.KeyStore.ProtectionParameter { ctor public KeyStore.PasswordProtection(char[]); + ctor public KeyStore.PasswordProtection(char[], java.lang.String, java.security.spec.AlgorithmParameterSpec); method public synchronized char[] getPassword(); + method public java.lang.String getProtectionAlgorithm(); + method public java.security.spec.AlgorithmParameterSpec getProtectionParameters(); } public static final class KeyStore.PrivateKeyEntry implements java.security.KeyStore.Entry { ctor public KeyStore.PrivateKeyEntry(java.security.PrivateKey, java.security.cert.Certificate[]); + ctor public KeyStore.PrivateKeyEntry(java.security.PrivateKey, java.security.cert.Certificate[], java.util.Set); method public java.security.cert.Certificate getCertificate(); method public java.security.cert.Certificate[] getCertificateChain(); method public java.security.PrivateKey getPrivateKey(); @@ -55068,11 +55078,13 @@ package java.security { public static final class KeyStore.SecretKeyEntry implements java.security.KeyStore.Entry { ctor public KeyStore.SecretKeyEntry(javax.crypto.SecretKey); + ctor public KeyStore.SecretKeyEntry(javax.crypto.SecretKey, java.util.Set); method public javax.crypto.SecretKey getSecretKey(); } public static final class KeyStore.TrustedCertificateEntry implements java.security.KeyStore.Entry { ctor public KeyStore.TrustedCertificateEntry(java.security.cert.Certificate); + ctor public KeyStore.TrustedCertificateEntry(java.security.cert.Certificate, java.util.Set); method public java.security.cert.Certificate getTrustedCertificate(); }