From e952cfff3e362512cdea0ece504f6a64d4a075a8 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Thu, 18 Jun 2020 18:29:42 -0500 Subject: [PATCH] Make public JsonWebKey properties settable (#12879) * Make public JsonWebKey properties settable * export-api --- .../Azure.Security.KeyVault.Keys/CHANGELOG.md | 11 +++++++ ...e.Security.KeyVault.Keys.netstandard2.0.cs | 30 +++++++++---------- .../src/JsonWebKey.cs | 30 +++++++++---------- 3 files changed, 41 insertions(+), 30 deletions(-) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/CHANGELOG.md b/sdk/keyvault/Azure.Security.KeyVault.Keys/CHANGELOG.md index b1243eac369da..47323739f451f 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/CHANGELOG.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/CHANGELOG.md @@ -1,5 +1,16 @@ # Release History +## 4.1.0-preview.1 (2020-03-09) + +### Added + +- Add "import" value to `KeyOperation` enumeration. +- Add `RecoverableDays` property to `KeyProperties`. + +### Minor changes + +- Make public `JsonWebKey` properties settable ([#12084](https://github.com/Azure/azure-sdk-for-net/issues/12084)) + ## 4.0.3 (2020-03-18) ### Fixed diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/api/Azure.Security.KeyVault.Keys.netstandard2.0.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/api/Azure.Security.KeyVault.Keys.netstandard2.0.cs index e8243c14517dc..c0d0f3521d002 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/api/Azure.Security.KeyVault.Keys.netstandard2.0.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/api/Azure.Security.KeyVault.Keys.netstandard2.0.cs @@ -67,22 +67,22 @@ public partial class JsonWebKey public JsonWebKey(System.Security.Cryptography.Aes aesProvider, System.Collections.Generic.IEnumerable keyOps = null) { } public JsonWebKey(System.Security.Cryptography.ECDsa ecdsa, bool includePrivateParameters = false, System.Collections.Generic.IEnumerable keyOps = null) { } public JsonWebKey(System.Security.Cryptography.RSA rsaProvider, bool includePrivateParameters = false, System.Collections.Generic.IEnumerable keyOps = null) { } - public Azure.Security.KeyVault.Keys.KeyCurveName? CurveName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } - public byte[] D { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } - public byte[] DP { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } - public byte[] DQ { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } - public byte[] E { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } - public string Id { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } - public byte[] K { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public Azure.Security.KeyVault.Keys.KeyCurveName? CurveName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public byte[] D { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public byte[] DP { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public byte[] DQ { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public byte[] E { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public string Id { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public byte[] K { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public System.Collections.Generic.IReadOnlyCollection KeyOps { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } - public Azure.Security.KeyVault.Keys.KeyType KeyType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } - public byte[] N { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } - public byte[] P { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } - public byte[] Q { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } - public byte[] QI { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } - public byte[] T { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } - public byte[] X { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } - public byte[] Y { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } + public Azure.Security.KeyVault.Keys.KeyType KeyType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public byte[] N { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public byte[] P { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public byte[] Q { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public byte[] QI { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public byte[] T { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public byte[] X { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } + public byte[] Y { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public System.Security.Cryptography.Aes ToAes() { throw null; } public System.Security.Cryptography.ECDsa ToECDsa(bool includePrivateParameters = false) { throw null; } public System.Security.Cryptography.RSA ToRSA(bool includePrivateParameters = false) { throw null; } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/JsonWebKey.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/JsonWebKey.cs index c764cc7f52368..fe1a3c8c74d8b 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/JsonWebKey.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/JsonWebKey.cs @@ -62,12 +62,12 @@ public class JsonWebKey : IJsonDeserializable, IJsonSerializable /// /// Gets the identifier of the key. This is not limited to a . /// - public string Id { get; internal set; } + public string Id { get; set; } /// /// Gets the for this . /// - public KeyType KeyType { get; internal set; } + public KeyType KeyType { get; set; } /// /// Gets a list of values supported by this key. @@ -162,12 +162,12 @@ public JsonWebKey(RSA rsaProvider, bool includePrivateParameters = default, IEnu /// /// Gets the RSA modulus. /// - public byte[] N { get; internal set; } + public byte[] N { get; set; } /// /// Gets RSA public exponent. /// - public byte[] E { get; internal set; } + public byte[] E { get; set; } #endregion @@ -176,27 +176,27 @@ public JsonWebKey(RSA rsaProvider, bool includePrivateParameters = default, IEnu /// /// Gets the RSA private key parameter. /// - public byte[] DP { get; internal set; } + public byte[] DP { get; set; } /// /// Gets the RSA private key parameter. /// - public byte[] DQ { get; internal set; } + public byte[] DQ { get; set; } /// /// Gets the RSA private key parameter. /// - public byte[] QI { get; internal set; } + public byte[] QI { get; set; } /// /// Gets the RSA secret prime. /// - public byte[] P { get; internal set; } + public byte[] P { get; set; } /// /// Gets the RSA secret prime. /// - public byte[] Q { get; internal set; } + public byte[] Q { get; set; } #endregion @@ -205,17 +205,17 @@ public JsonWebKey(RSA rsaProvider, bool includePrivateParameters = default, IEnu /// /// Gets the name of the elliptical curve. /// - public KeyCurveName? CurveName { get; internal set; } + public KeyCurveName? CurveName { get; set; } /// /// Gets the X coordinate of the elliptic curve point. /// - public byte[] X { get; internal set; } + public byte[] X { get; set; } /// /// Gets the Y coordinate for the elliptic curve point. /// - public byte[] Y { get; internal set; } + public byte[] Y { get; set; } #endregion @@ -224,7 +224,7 @@ public JsonWebKey(RSA rsaProvider, bool includePrivateParameters = default, IEnu /// /// Gets the RSA private exponent or EC private key. /// - public byte[] D { get; internal set; } + public byte[] D { get; set; } #endregion @@ -233,14 +233,14 @@ public JsonWebKey(RSA rsaProvider, bool includePrivateParameters = default, IEnu /// /// Gets the symmetric key. /// - public byte[] K { get; internal set; } + public byte[] K { get; set; } #endregion /// /// Gets the HSM token used with "Bring Your Own Key". /// - public byte[] T { get; internal set; } + public byte[] T { get; set; } internal bool HasPrivateKey {