Skip to content

Commit 0dc8c1f

Browse files
authored
[KeyVault] Addresses API View comments and prepare release for Keys (#50926)
* Change KeyAttestation properties from `byte[]` to `ReadOnlyMemory<byte>` * Export API * Ran the prepare release script * Remove empty section in CHANGELOG
1 parent d0937b4 commit 0dc8c1f

File tree

6 files changed

+17
-19
lines changed

6 files changed

+17
-19
lines changed

sdk/keyvault/Azure.Security.KeyVault.Keys/CHANGELOG.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Release History
22

3-
## 4.8.0-beta.2 (Unreleased)
3+
## 4.8.0 (2025-06-27)
44

55
### Acknowledgments
66

@@ -15,8 +15,6 @@ Thank you to our developer community members who helped to make the Key Vault cl
1515
- Added Attestation property for Keys in Managed HSM Key Vaults.
1616
- Adde new `GetKeyAttestation` operation to get the public part of a stored key along with its attestation blob.
1717

18-
### Breaking Changes
19-
2018
### Bugs Fixed
2119

2220
- Removed additional forward slash in `RestoreKeyBackup` and `RestoreKeyBackupAsync`.

sdk/keyvault/Azure.Security.KeyVault.Keys/api/Azure.Security.KeyVault.Keys.net8.0.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ public JsonWebKey(System.Security.Cryptography.RSA rsaProvider, bool includePriv
106106
public partial class KeyAttestation
107107
{
108108
public KeyAttestation() { }
109-
public byte[] CertificatePemFile { get { throw null; } set { } }
110-
public byte[] PrivateKeyAttestation { get { throw null; } set { } }
111-
public byte[] PublicKeyAttestation { get { throw null; } set { } }
109+
public System.ReadOnlyMemory<byte> CertificatePemFile { get { throw null; } set { } }
110+
public System.ReadOnlyMemory<byte> PrivateKeyAttestation { get { throw null; } set { } }
111+
public System.ReadOnlyMemory<byte> PublicKeyAttestation { get { throw null; } set { } }
112112
public string Version { get { throw null; } set { } }
113113
}
114114
public partial class KeyClient

sdk/keyvault/Azure.Security.KeyVault.Keys/api/Azure.Security.KeyVault.Keys.netstandard2.0.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ public JsonWebKey(System.Security.Cryptography.RSA rsaProvider, bool includePriv
106106
public partial class KeyAttestation
107107
{
108108
public KeyAttestation() { }
109-
public byte[] CertificatePemFile { get { throw null; } set { } }
110-
public byte[] PrivateKeyAttestation { get { throw null; } set { } }
111-
public byte[] PublicKeyAttestation { get { throw null; } set { } }
109+
public System.ReadOnlyMemory<byte> CertificatePemFile { get { throw null; } set { } }
110+
public System.ReadOnlyMemory<byte> PrivateKeyAttestation { get { throw null; } set { } }
111+
public System.ReadOnlyMemory<byte> PublicKeyAttestation { get { throw null; } set { } }
112112
public string Version { get { throw null; } set { } }
113113
}
114114
public partial class KeyClient

sdk/keyvault/Azure.Security.KeyVault.Keys/src/Azure.Security.KeyVault.Keys.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<Description>This is the Microsoft Azure Key Vault Keys client library</Description>
55
<AssemblyTitle>Microsoft Azure.Security.KeyVault.Keys client library</AssemblyTitle>
6-
<Version>4.8.0-beta.2</Version>
6+
<Version>4.8.0</Version>
77
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
88
<ApiCompatVersion>4.7.0</ApiCompatVersion>
99
<PackageTags>Microsoft Azure Key Vault Keys;$(PackageCommonTags)</PackageTags>

sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyAttestation.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ public KeyAttestation()
2020
/// <summary>
2121
/// Gets or sets a base64url-encoded string containing certificates in PEM format, used for attestation validation.
2222
/// </summary>
23-
public byte[] CertificatePemFile { get; set; }
23+
public ReadOnlyMemory<byte> CertificatePemFile { get; set; }
2424

2525
/// <summary>
2626
/// Gets or sets the attestation blob bytes encoded as a base64 URL string corresponding to the private key value.
2727
/// </summary>
28-
public byte[] PrivateKeyAttestation { get; set; }
28+
public ReadOnlyMemory<byte> PrivateKeyAttestation { get; set; }
2929

3030
/// <summary>
3131
/// Gets or sets the attestation blob bytes encoded as a base64 URL string.
3232
/// In the case of an asymmetric key, this corresponds to the public key value.
3333
/// </summary>
34-
public byte[] PublicKeyAttestation { get; set; }
34+
public ReadOnlyMemory<byte> PublicKeyAttestation { get; set; }
3535

3636
/// <summary>
3737
/// Gets or sets the version of the attestation.

sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyAttributes.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,17 +143,17 @@ internal void WriteProperties(Utf8JsonWriter json)
143143
if (Attestation != null)
144144
{
145145
json.WriteStartObject(s_keyAttestationPropertyNameBytes);
146-
if (Attestation.CertificatePemFile != null)
146+
if (!Attestation.CertificatePemFile.IsEmpty)
147147
{
148-
json.WriteString("certificatePemFile", Convert.ToBase64String(Attestation.CertificatePemFile));
148+
json.WriteString("certificatePemFile", Convert.ToBase64String(Attestation.CertificatePemFile.ToArray()));
149149
}
150-
if (Attestation.PrivateKeyAttestation != null)
150+
if (!Attestation.PrivateKeyAttestation.IsEmpty)
151151
{
152-
json.WriteString("privateKeyAttestation", Convert.ToBase64String(Attestation.PrivateKeyAttestation));
152+
json.WriteString("privateKeyAttestation", Convert.ToBase64String(Attestation.PrivateKeyAttestation.ToArray()));
153153
}
154-
if (Attestation.PublicKeyAttestation != null)
154+
if (!Attestation.PublicKeyAttestation.IsEmpty)
155155
{
156-
json.WriteString("publicKeyAttestation", Convert.ToBase64String(Attestation.PublicKeyAttestation));
156+
json.WriteString("publicKeyAttestation", Convert.ToBase64String(Attestation.PublicKeyAttestation.ToArray()));
157157
}
158158
if (Attestation.Version != null)
159159
{

0 commit comments

Comments
 (0)