Skip to content

Commit

Permalink
Make public JsonWebKey properties settable (#12879)
Browse files Browse the repository at this point in the history
* Make public JsonWebKey properties settable

* export-api
  • Loading branch information
christothes authored Jun 18, 2020
1 parent 4541714 commit e952cff
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 30 deletions.
11 changes: 11 additions & 0 deletions sdk/keyvault/Azure.Security.KeyVault.Keys/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,22 @@ public partial class JsonWebKey
public JsonWebKey(System.Security.Cryptography.Aes aesProvider, System.Collections.Generic.IEnumerable<Azure.Security.KeyVault.Keys.KeyOperation> keyOps = null) { }
public JsonWebKey(System.Security.Cryptography.ECDsa ecdsa, bool includePrivateParameters = false, System.Collections.Generic.IEnumerable<Azure.Security.KeyVault.Keys.KeyOperation> keyOps = null) { }
public JsonWebKey(System.Security.Cryptography.RSA rsaProvider, bool includePrivateParameters = false, System.Collections.Generic.IEnumerable<Azure.Security.KeyVault.Keys.KeyOperation> 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<Azure.Security.KeyVault.Keys.KeyOperation> 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; }
Expand Down
30 changes: 15 additions & 15 deletions sdk/keyvault/Azure.Security.KeyVault.Keys/src/JsonWebKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ public class JsonWebKey : IJsonDeserializable, IJsonSerializable
/// <summary>
/// Gets the identifier of the key. This is not limited to a <see cref="Uri"/>.
/// </summary>
public string Id { get; internal set; }
public string Id { get; set; }

/// <summary>
/// Gets the <see cref="KeyType"/> for this <see cref="JsonWebKey"/>.
/// </summary>
public KeyType KeyType { get; internal set; }
public KeyType KeyType { get; set; }

/// <summary>
/// Gets a list of <see cref="KeyOperation"/> values supported by this key.
Expand Down Expand Up @@ -162,12 +162,12 @@ public JsonWebKey(RSA rsaProvider, bool includePrivateParameters = default, IEnu
/// <summary>
/// Gets the RSA modulus.
/// </summary>
public byte[] N { get; internal set; }
public byte[] N { get; set; }

/// <summary>
/// Gets RSA public exponent.
/// </summary>
public byte[] E { get; internal set; }
public byte[] E { get; set; }

#endregion

Expand All @@ -176,27 +176,27 @@ public JsonWebKey(RSA rsaProvider, bool includePrivateParameters = default, IEnu
/// <summary>
/// Gets the RSA private key parameter.
/// </summary>
public byte[] DP { get; internal set; }
public byte[] DP { get; set; }

/// <summary>
/// Gets the RSA private key parameter.
/// </summary>
public byte[] DQ { get; internal set; }
public byte[] DQ { get; set; }

/// <summary>
/// Gets the RSA private key parameter.
/// </summary>
public byte[] QI { get; internal set; }
public byte[] QI { get; set; }

/// <summary>
/// Gets the RSA secret prime.
/// </summary>
public byte[] P { get; internal set; }
public byte[] P { get; set; }

/// <summary>
/// Gets the RSA secret prime.
/// </summary>
public byte[] Q { get; internal set; }
public byte[] Q { get; set; }

#endregion

Expand All @@ -205,17 +205,17 @@ public JsonWebKey(RSA rsaProvider, bool includePrivateParameters = default, IEnu
/// <summary>
/// Gets the name of the elliptical curve.
/// </summary>
public KeyCurveName? CurveName { get; internal set; }
public KeyCurveName? CurveName { get; set; }

/// <summary>
/// Gets the X coordinate of the elliptic curve point.
/// </summary>
public byte[] X { get; internal set; }
public byte[] X { get; set; }

/// <summary>
/// Gets the Y coordinate for the elliptic curve point.
/// </summary>
public byte[] Y { get; internal set; }
public byte[] Y { get; set; }

#endregion

Expand All @@ -224,7 +224,7 @@ public JsonWebKey(RSA rsaProvider, bool includePrivateParameters = default, IEnu
/// <summary>
/// Gets the RSA private exponent or EC private key.
/// </summary>
public byte[] D { get; internal set; }
public byte[] D { get; set; }

#endregion

Expand All @@ -233,14 +233,14 @@ public JsonWebKey(RSA rsaProvider, bool includePrivateParameters = default, IEnu
/// <summary>
/// Gets the symmetric key.
/// </summary>
public byte[] K { get; internal set; }
public byte[] K { get; set; }

#endregion

/// <summary>
/// Gets the HSM token used with "Bring Your Own Key".
/// </summary>
public byte[] T { get; internal set; }
public byte[] T { get; set; }

internal bool HasPrivateKey
{
Expand Down

0 comments on commit e952cff

Please # to comment.