Skip to content

Commit 59a5ce1

Browse files
authored
Add UrlFormat to PQC Experimental attribute
1 parent e097b8b commit 59a5ce1

File tree

16 files changed

+60
-60
lines changed

16 files changed

+60
-60
lines changed

src/libraries/Common/src/System/Security/Cryptography/MLDsa.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace System.Security.Cryptography
2525
/// The derived classes are intended for interop with the underlying system
2626
/// cryptographic libraries.
2727
/// </remarks>
28-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
28+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
2929
public abstract partial class MLDsa : IDisposable
3030
#if DESIGNTIMEINTERFACES
3131
#pragma warning disable SA1001

src/libraries/Common/src/System/Security/Cryptography/MLDsaAlgorithm.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace System.Security.Cryptography
88
/// <summary>
99
/// Represents a specific algorithm within the ML-DSA family.
1010
/// </summary>
11-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
11+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
1212
public sealed class MLDsaAlgorithm
1313
{
1414
/// <summary>

src/libraries/Common/src/System/Security/Cryptography/MLDsaImplementation.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace System.Security.Cryptography
88
{
9-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
9+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
1010
internal sealed partial class MLDsaImplementation : MLDsa
1111
{
1212
private MLDsaImplementation(MLDsaAlgorithm algorithm)

src/libraries/Common/src/System/Security/Cryptography/MLKem.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace System.Security.Cryptography
2626
/// cryptographic libraries.
2727
/// </para>
2828
/// </remarks>
29-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
29+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
3030
public abstract class MLKem : IDisposable
3131
{
3232
private static readonly string[] s_knownOids = [Oids.MlKem512, Oids.MlKem768, Oids.MlKem1024];

src/libraries/Common/src/System/Security/Cryptography/MLKemAlgorithm.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace System.Security.Cryptography
1111
/// </summary>
1212
/// <seealso cref="MLKem" />
1313
[DebuggerDisplay("{Name,nq}")]
14-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
14+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
1515
public sealed class MLKemAlgorithm : IEquatable<MLKemAlgorithm>
1616
{
1717
private MLKemAlgorithm(

src/libraries/Common/src/System/Security/Cryptography/SlhDsa.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace System.Security.Cryptography
1919
/// The derived classes are intended for interop with the underlying system
2020
/// cryptographic libraries.
2121
/// </remarks>
22-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
22+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
2323
public abstract partial class SlhDsa : IDisposable
2424
#if DESIGNTIMEINTERFACES
2525
#pragma warning disable SA1001

src/libraries/Common/src/System/Security/Cryptography/SlhDsaAlgorithm.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace System.Security.Cryptography
1010
/// Represents a specific algorithm within the SHL-DSA family.
1111
/// </summary>
1212
[DebuggerDisplay("{Name,nq}")]
13-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
13+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
1414
public sealed class SlhDsaAlgorithm
1515
{
1616
/// <summary>

src/libraries/Common/src/System/Security/Cryptography/SlhDsaImplementation.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace System.Security.Cryptography
88
{
9-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
9+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
1010
internal sealed partial class SlhDsaImplementation : SlhDsa
1111
{
1212
internal static partial bool SupportsAny();

src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs

+29-29
Large diffs are not rendered by default.

src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/MLDsaOpenSsl.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace System.Security.Cryptography
2020
/// cryptographic libraries.
2121
/// </para>
2222
/// </remarks>
23-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
23+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
2424
public sealed partial class MLDsaOpenSsl : MLDsa
2525
{
2626
private SafeEvpPKeyHandle _key;

src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/MLKemOpenSsl.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace System.Security.Cryptography
2020
/// cryptographic libraries.
2121
/// </para>
2222
/// </remarks>
23-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
23+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
2424
public sealed partial class MLKemOpenSsl : MLKem
2525
{
2626
private readonly SafeEvpPKeyHandle _key;

src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SlhDsaOpenSsl.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace System.Security.Cryptography
2020
/// cryptographic libraries.
2121
/// </para>
2222
/// </remarks>
23-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
23+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
2424
public sealed partial class SlhDsaOpenSsl : SlhDsa
2525
{
2626
private readonly SafeEvpPKeyHandle _key;

src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/CertificateRequest.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public CertificateRequest(
192192
/// <exception cref="ArgumentNullException">
193193
/// <paramref name="subjectName" /> or <paramref name="key" /> is <see langword="null" />.
194194
/// </exception>
195-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
195+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
196196
public CertificateRequest(
197197
string subjectName,
198198
MLDsa key)
@@ -220,7 +220,7 @@ public CertificateRequest(
220220
/// <exception cref="ArgumentNullException">
221221
/// <paramref name="subjectName" /> or <paramref name="key" /> is <see langword="null" />.
222222
/// </exception>
223-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
223+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
224224
public CertificateRequest(
225225
X500DistinguishedName subjectName,
226226
MLDsa key)
@@ -248,7 +248,7 @@ public CertificateRequest(
248248
/// <exception cref="ArgumentNullException">
249249
/// <paramref name="subjectName" /> or <paramref name="key" /> is <see langword="null" />.
250250
/// </exception>
251-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
251+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
252252
public CertificateRequest(
253253
string subjectName,
254254
SlhDsa key)
@@ -276,7 +276,7 @@ public CertificateRequest(
276276
/// <exception cref="ArgumentNullException">
277277
/// <paramref name="subjectName" /> or <paramref name="key" /> is <see langword="null" />.
278278
/// </exception>
279-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
279+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
280280
public CertificateRequest(
281281
X500DistinguishedName subjectName,
282282
SlhDsa key)

src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/PublicKey.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public PublicKey(AsymmetricAlgorithm key) : this(key.ExportSubjectPublicKeyInfo(
6969
/// <see cref="MLKem.ExportSubjectPublicKeyInfo" /> must return a
7070
/// valid ASN.1-DER encoded X.509 SubjectPublicKeyInfo.
7171
/// </exception>
72-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
72+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
7373
public PublicKey(MLKem key) : this(key.ExportSubjectPublicKeyInfo())
7474
{
7575
}
@@ -86,7 +86,7 @@ public PublicKey(MLKem key) : this(key.ExportSubjectPublicKeyInfo())
8686
/// <see cref="SlhDsa.ExportSubjectPublicKeyInfo" /> must return a
8787
/// valid ASN.1-DER encoded X.509 SubjectPublicKeyInfo.
8888
/// </exception>
89-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
89+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
9090
public PublicKey(SlhDsa key) : this(key.ExportSubjectPublicKeyInfo())
9191
{
9292
}
@@ -324,7 +324,7 @@ public static PublicKey CreateFromSubjectPublicKeyInfo(ReadOnlySpan<byte> source
324324
/// <exception cref="CryptographicException">
325325
/// The key contents are corrupt or could not be read successfully.
326326
/// </exception>
327-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
327+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
328328
[UnsupportedOSPlatform("browser")]
329329
public MLKem? GetMLKemPublicKey()
330330
{
@@ -347,7 +347,7 @@ public static PublicKey CreateFromSubjectPublicKeyInfo(ReadOnlySpan<byte> source
347347
/// <exception cref="CryptographicException">
348348
/// The key contents are corrupt or could not be read successfully.
349349
/// </exception>
350-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
350+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
351351
[UnsupportedOSPlatform("browser")]
352352
public MLDsa? GetMLDsaPublicKey()
353353
{
@@ -370,7 +370,7 @@ public static PublicKey CreateFromSubjectPublicKeyInfo(ReadOnlySpan<byte> source
370370
/// <exception cref="CryptographicException">
371371
/// The key contents are corrupt or could not be read successfully.
372372
/// </exception>
373-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
373+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
374374
[UnsupportedOSPlatform("browser")]
375375
public SlhDsa? GetSlhDsaPublicKey() =>
376376
Helpers.IsSlhDsaOid(_oid.Value)

src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs

+9-9
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ public X509Certificate2 CopyWithPrivateKey(ECDiffieHellman privateKey)
791791
/// <exception cref="CryptographicException">
792792
/// The public key was invalid, or otherwise could not be imported.
793793
/// </exception>
794-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
794+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
795795
public MLKem? GetMLKemPublicKey()
796796
{
797797
if (MLKemAlgorithm.FromOid(GetKeyAlgorithm()) is null)
@@ -812,7 +812,7 @@ public X509Certificate2 CopyWithPrivateKey(ECDiffieHellman privateKey)
812812
/// <exception cref="CryptographicException">
813813
/// An error occurred accessing the private key.
814814
/// </exception>
815-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
815+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
816816
public MLKem? GetMLKemPrivateKey()
817817
{
818818
MLKemAlgorithm? algorithm = MLKemAlgorithm.FromOid(GetKeyAlgorithm());
@@ -845,7 +845,7 @@ public X509Certificate2 CopyWithPrivateKey(ECDiffieHellman privateKey)
845845
/// <exception cref="InvalidOperationException">
846846
/// The certificate already has an associated private key.
847847
/// </exception>
848-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
848+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
849849
public X509Certificate2 CopyWithPrivateKey(MLKem privateKey)
850850
{
851851
ArgumentNullException.ThrowIfNull(privateKey);
@@ -890,7 +890,7 @@ public X509Certificate2 CopyWithPrivateKey(MLKem privateKey)
890890
/// <exception cref="CryptographicException">
891891
/// The public key was invalid, or otherwise could not be imported.
892892
/// </exception>
893-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
893+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
894894
public MLDsa? GetMLDsaPublicKey()
895895
{
896896
MLDsaAlgorithm? algorithm = MLDsaAlgorithm.GetMLDsaAlgorithmFromOid(GetKeyAlgorithm());
@@ -913,7 +913,7 @@ public X509Certificate2 CopyWithPrivateKey(MLKem privateKey)
913913
/// <exception cref="CryptographicException">
914914
/// An error occurred accessing the private key.
915915
/// </exception>
916-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
916+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
917917
public MLDsa? GetMLDsaPrivateKey()
918918
{
919919
MLDsaAlgorithm? algorithm = MLDsaAlgorithm.GetMLDsaAlgorithmFromOid(GetKeyAlgorithm());
@@ -946,7 +946,7 @@ public X509Certificate2 CopyWithPrivateKey(MLKem privateKey)
946946
/// <exception cref="InvalidOperationException">
947947
/// The certificate already has an associated private key.
948948
/// </exception>
949-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
949+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
950950
public X509Certificate2 CopyWithPrivateKey(MLDsa privateKey)
951951
{
952952
ArgumentNullException.ThrowIfNull(privateKey);
@@ -994,7 +994,7 @@ public X509Certificate2 CopyWithPrivateKey(MLDsa privateKey)
994994
/// <exception cref="CryptographicException">
995995
/// The public key was invalid, or otherwise could not be imported.
996996
/// </exception>
997-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
997+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
998998
public SlhDsa? GetSlhDsaPublicKey()
999999
{
10001000
if (!Helpers.IsSlhDsaOid(GetKeyAlgorithm()))
@@ -1015,7 +1015,7 @@ public X509Certificate2 CopyWithPrivateKey(MLDsa privateKey)
10151015
/// <exception cref="CryptographicException">
10161016
/// An error occurred accessing the private key.
10171017
/// </exception>
1018-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
1018+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
10191019
public SlhDsa? GetSlhDsaPrivateKey() =>
10201020
Helpers.IsSlhDsaOid(GetKeyAlgorithm())
10211021
? Pal.GetSlhDsaPrivateKey()
@@ -1041,7 +1041,7 @@ public X509Certificate2 CopyWithPrivateKey(MLDsa privateKey)
10411041
/// <exception cref="InvalidOperationException">
10421042
/// The certificate already has an associated private key.
10431043
/// </exception>
1044-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
1044+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
10451045
public X509Certificate2 CopyWithPrivateKey(SlhDsa privateKey)
10461046
{
10471047
ArgumentNullException.ThrowIfNull(privateKey);

src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509SignatureGenerator.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static X509SignatureGenerator CreateForRSA(RSA key, RSASignaturePadding s
4747
/// <exception cref="ArgumentNullException">
4848
/// <paramref name="key" /> is <see langword="null" />.
4949
/// </exception>
50-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
50+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
5151
public static X509SignatureGenerator CreateForMLDsa(MLDsa key)
5252
{
5353
ArgumentNullException.ThrowIfNull(key);
@@ -67,7 +67,7 @@ public static X509SignatureGenerator CreateForMLDsa(MLDsa key)
6767
/// <exception cref="ArgumentNullException">
6868
/// <paramref name="key" /> is <see langword="null" />.
6969
/// </exception>
70-
[Experimental(Experimentals.PostQuantumCryptographyDiagId)]
70+
[Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
7171
public static X509SignatureGenerator CreateForSlhDsa(SlhDsa key)
7272
{
7373
ArgumentNullException.ThrowIfNull(key);

0 commit comments

Comments
 (0)