From 1c25035995944c94ccdf5c6369c1ba5ad32fbf8a Mon Sep 17 00:00:00 2001 From: Kevin Jones Date: Thu, 8 May 2025 17:11:48 -0400 Subject: [PATCH] Add UrlFormat to PQC Experimental attribute --- .../src/System/Security/Cryptography/MLDsa.cs | 2 +- .../Security/Cryptography/MLDsaAlgorithm.cs | 2 +- .../Cryptography/MLDsaImplementation.cs | 2 +- .../src/System/Security/Cryptography/MLKem.cs | 2 +- .../Security/Cryptography/MLKemAlgorithm.cs | 2 +- .../System/Security/Cryptography/SlhDsa.cs | 2 +- .../Security/Cryptography/SlhDsaAlgorithm.cs | 2 +- .../Cryptography/SlhDsaImplementation.cs | 2 +- .../ref/System.Security.Cryptography.cs | 58 +++++++++---------- .../Security/Cryptography/MLDsaOpenSsl.cs | 2 +- .../Security/Cryptography/MLKemOpenSsl.cs | 2 +- .../Security/Cryptography/SlhDsaOpenSsl.cs | 2 +- .../X509Certificates/CertificateRequest.cs | 8 +-- .../X509Certificates/PublicKey.cs | 10 ++-- .../X509Certificates/X509Certificate2.cs | 18 +++--- .../X509SignatureGenerator.cs | 4 +- 16 files changed, 60 insertions(+), 60 deletions(-) diff --git a/src/libraries/Common/src/System/Security/Cryptography/MLDsa.cs b/src/libraries/Common/src/System/Security/Cryptography/MLDsa.cs index 1b1972b3eb27b0..24e369c75e94c8 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/MLDsa.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/MLDsa.cs @@ -25,7 +25,7 @@ namespace System.Security.Cryptography /// The derived classes are intended for interop with the underlying system /// cryptographic libraries. /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public abstract partial class MLDsa : IDisposable #if DESIGNTIMEINTERFACES #pragma warning disable SA1001 diff --git a/src/libraries/Common/src/System/Security/Cryptography/MLDsaAlgorithm.cs b/src/libraries/Common/src/System/Security/Cryptography/MLDsaAlgorithm.cs index ed1c7585cba0f3..e5fc7bbbc21cc3 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/MLDsaAlgorithm.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/MLDsaAlgorithm.cs @@ -8,7 +8,7 @@ namespace System.Security.Cryptography /// /// Represents a specific algorithm within the ML-DSA family. /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public sealed class MLDsaAlgorithm { /// diff --git a/src/libraries/Common/src/System/Security/Cryptography/MLDsaImplementation.cs b/src/libraries/Common/src/System/Security/Cryptography/MLDsaImplementation.cs index 851c10272b8573..7578c3d07181dc 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/MLDsaImplementation.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/MLDsaImplementation.cs @@ -6,7 +6,7 @@ namespace System.Security.Cryptography { - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] internal sealed partial class MLDsaImplementation : MLDsa { private MLDsaImplementation(MLDsaAlgorithm algorithm) diff --git a/src/libraries/Common/src/System/Security/Cryptography/MLKem.cs b/src/libraries/Common/src/System/Security/Cryptography/MLKem.cs index 3a2d3262ba8577..524bb7a9222346 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/MLKem.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/MLKem.cs @@ -26,7 +26,7 @@ namespace System.Security.Cryptography /// cryptographic libraries. /// /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public abstract class MLKem : IDisposable { private static readonly string[] s_knownOids = [Oids.MlKem512, Oids.MlKem768, Oids.MlKem1024]; diff --git a/src/libraries/Common/src/System/Security/Cryptography/MLKemAlgorithm.cs b/src/libraries/Common/src/System/Security/Cryptography/MLKemAlgorithm.cs index 7bfd2d786a9272..1c879d44be1993 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/MLKemAlgorithm.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/MLKemAlgorithm.cs @@ -11,7 +11,7 @@ namespace System.Security.Cryptography /// /// [DebuggerDisplay("{Name,nq}")] - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public sealed class MLKemAlgorithm : IEquatable { private MLKemAlgorithm( diff --git a/src/libraries/Common/src/System/Security/Cryptography/SlhDsa.cs b/src/libraries/Common/src/System/Security/Cryptography/SlhDsa.cs index 507ef1e43dbfc9..182869c7830ed2 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/SlhDsa.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/SlhDsa.cs @@ -19,7 +19,7 @@ namespace System.Security.Cryptography /// The derived classes are intended for interop with the underlying system /// cryptographic libraries. /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public abstract partial class SlhDsa : IDisposable #if DESIGNTIMEINTERFACES #pragma warning disable SA1001 diff --git a/src/libraries/Common/src/System/Security/Cryptography/SlhDsaAlgorithm.cs b/src/libraries/Common/src/System/Security/Cryptography/SlhDsaAlgorithm.cs index 23cb59e1847832..c981c3b5501637 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/SlhDsaAlgorithm.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/SlhDsaAlgorithm.cs @@ -10,7 +10,7 @@ namespace System.Security.Cryptography /// Represents a specific algorithm within the SHL-DSA family. /// [DebuggerDisplay("{Name,nq}")] - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public sealed class SlhDsaAlgorithm { /// diff --git a/src/libraries/Common/src/System/Security/Cryptography/SlhDsaImplementation.cs b/src/libraries/Common/src/System/Security/Cryptography/SlhDsaImplementation.cs index 04074a8c94becf..7ce51ec7f1e862 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/SlhDsaImplementation.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/SlhDsaImplementation.cs @@ -6,7 +6,7 @@ namespace System.Security.Cryptography { - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] internal sealed partial class SlhDsaImplementation : SlhDsa { internal static partial bool SupportsAny(); diff --git a/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs b/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs index c86c9edc851c18..9dbb8e16c89287 100644 --- a/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs +++ b/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs @@ -1795,7 +1795,7 @@ protected override void HashCore(System.ReadOnlySpan source) { } public override void Initialize() { } protected override bool TryHashFinal(System.Span destination, out int bytesWritten) { throw null; } } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public abstract partial class MLDsa : System.IDisposable { protected MLDsa(System.Security.Cryptography.MLDsaAlgorithm algorithm) { } @@ -1838,7 +1838,7 @@ protected void ThrowIfDisposed() { } public bool VerifyData(System.ReadOnlySpan data, System.ReadOnlySpan signature, System.ReadOnlySpan context = default(System.ReadOnlySpan)) { throw null; } protected abstract bool VerifyDataCore(System.ReadOnlySpan data, System.ReadOnlySpan context, System.ReadOnlySpan signature); } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public sealed partial class MLDsaAlgorithm { internal MLDsaAlgorithm() { } @@ -1851,7 +1851,7 @@ internal MLDsaAlgorithm() { } public int SecretKeySizeInBytes { get { throw null; } } public int SignatureSizeInBytes { get { throw null; } } } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public sealed partial class MLDsaOpenSsl : System.Security.Cryptography.MLDsa { [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("android")] @@ -1869,7 +1869,7 @@ protected override void ExportMLDsaSecretKeyCore(System.Span destination) protected override void SignDataCore(System.ReadOnlySpan data, System.ReadOnlySpan context, System.Span destination) { } protected override bool VerifyDataCore(System.ReadOnlySpan data, System.ReadOnlySpan context, System.ReadOnlySpan signature) { throw null; } } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public abstract partial class MLKem : System.IDisposable { protected MLKem(System.Security.Cryptography.MLKemAlgorithm algorithm) { } @@ -1929,7 +1929,7 @@ public void ExportPrivateSeed(System.Span destination) { } protected abstract bool TryExportPkcs8PrivateKeyCore(System.Span destination, out int bytesWritten); public bool TryExportSubjectPublicKeyInfo(System.Span destination, out int bytesWritten) { throw null; } } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public sealed partial class MLKemAlgorithm : System.IEquatable { internal MLKemAlgorithm() { } @@ -1948,7 +1948,7 @@ internal MLKemAlgorithm() { } public static bool operator ==(System.Security.Cryptography.MLKemAlgorithm? left, System.Security.Cryptography.MLKemAlgorithm? right) { throw null; } public static bool operator !=(System.Security.Cryptography.MLKemAlgorithm? left, System.Security.Cryptography.MLKemAlgorithm? right) { throw null; } } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public sealed partial class MLKemOpenSsl : System.Security.Cryptography.MLKem { [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("android")] @@ -2839,7 +2839,7 @@ public SignatureDescription(System.Security.SecurityElement el) { } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("CreateFormatter is not trim compatible because the algorithm implementation referenced by FormatterAlgorithm might be removed.")] public virtual System.Security.Cryptography.AsymmetricSignatureFormatter CreateFormatter(System.Security.Cryptography.AsymmetricAlgorithm key) { throw null; } } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public abstract partial class SlhDsa : System.IDisposable { protected SlhDsa(System.Security.Cryptography.SlhDsaAlgorithm algorithm) { } @@ -2894,7 +2894,7 @@ public void ExportSlhDsaSecretKey(System.Span destination) { } public bool VerifyData(System.ReadOnlySpan data, System.ReadOnlySpan signature, System.ReadOnlySpan context = default(System.ReadOnlySpan)) { throw null; } protected abstract bool VerifyDataCore(System.ReadOnlySpan data, System.ReadOnlySpan context, System.ReadOnlySpan signature); } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public sealed partial class SlhDsaAlgorithm { internal SlhDsaAlgorithm() { } @@ -2915,7 +2915,7 @@ internal SlhDsaAlgorithm() { } public static System.Security.Cryptography.SlhDsaAlgorithm SlhDsaShake256f { get { throw null; } } public static System.Security.Cryptography.SlhDsaAlgorithm SlhDsaShake256s { get { throw null; } } } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public sealed partial class SlhDsaOpenSsl : System.Security.Cryptography.SlhDsa { [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("android")] @@ -3104,18 +3104,18 @@ namespace System.Security.Cryptography.X509Certificates public sealed partial class CertificateRequest { public CertificateRequest(System.Security.Cryptography.X509Certificates.X500DistinguishedName subjectName, System.Security.Cryptography.ECDsa key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public CertificateRequest(System.Security.Cryptography.X509Certificates.X500DistinguishedName subjectName, System.Security.Cryptography.MLDsa key) { } public CertificateRequest(System.Security.Cryptography.X509Certificates.X500DistinguishedName subjectName, System.Security.Cryptography.RSA key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public CertificateRequest(System.Security.Cryptography.X509Certificates.X500DistinguishedName subjectName, System.Security.Cryptography.SlhDsa key) { } public CertificateRequest(System.Security.Cryptography.X509Certificates.X500DistinguishedName subjectName, System.Security.Cryptography.X509Certificates.PublicKey publicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { } public CertificateRequest(System.Security.Cryptography.X509Certificates.X500DistinguishedName subjectName, System.Security.Cryptography.X509Certificates.PublicKey publicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding? rsaSignaturePadding = null) { } public CertificateRequest(string subjectName, System.Security.Cryptography.ECDsa key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public CertificateRequest(string subjectName, System.Security.Cryptography.MLDsa key) { } public CertificateRequest(string subjectName, System.Security.Cryptography.RSA key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public CertificateRequest(string subjectName, System.Security.Cryptography.SlhDsa key) { } public System.Collections.ObjectModel.Collection CertificateExtensions { get { throw null; } } public System.Security.Cryptography.HashAlgorithmName HashAlgorithm { get { throw null; } } @@ -3215,10 +3215,10 @@ public Pkcs12LoadLimitExceededException(string propertyName) { } public sealed partial class PublicKey { public PublicKey(System.Security.Cryptography.AsymmetricAlgorithm key) { } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public PublicKey(System.Security.Cryptography.MLKem key) { } public PublicKey(System.Security.Cryptography.Oid oid, System.Security.Cryptography.AsnEncodedData? parameters, System.Security.Cryptography.AsnEncodedData keyValue) { } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public PublicKey(System.Security.Cryptography.SlhDsa key) { } public System.Security.Cryptography.AsnEncodedData EncodedKeyValue { get { throw null; } } public System.Security.Cryptography.AsnEncodedData? EncodedParameters { get { throw null; } } @@ -3235,15 +3235,15 @@ public PublicKey(System.Security.Cryptography.SlhDsa key) { } public System.Security.Cryptography.ECDiffieHellman? GetECDiffieHellmanPublicKey() { throw null; } [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] public System.Security.Cryptography.ECDsa? GetECDsaPublicKey() { throw null; } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] public System.Security.Cryptography.MLDsa? GetMLDsaPublicKey() { throw null; } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] public System.Security.Cryptography.MLKem? GetMLKemPublicKey() { throw null; } [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] public System.Security.Cryptography.RSA? GetRSAPublicKey() { throw null; } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] public System.Security.Cryptography.SlhDsa? GetSlhDsaPublicKey() { throw null; } public bool TryExportSubjectPublicKeyInfo(System.Span destination, out int bytesWritten) { throw null; } @@ -3555,11 +3555,11 @@ public X509Certificate2(string fileName, string? password, System.Security.Crypt public string Thumbprint { get { throw null; } } public int Version { get { throw null; } } public System.Security.Cryptography.X509Certificates.X509Certificate2 CopyWithPrivateKey(System.Security.Cryptography.ECDiffieHellman privateKey) { throw null; } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public System.Security.Cryptography.X509Certificates.X509Certificate2 CopyWithPrivateKey(System.Security.Cryptography.MLDsa privateKey) { throw null; } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public System.Security.Cryptography.X509Certificates.X509Certificate2 CopyWithPrivateKey(System.Security.Cryptography.MLKem privateKey) { throw null; } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public System.Security.Cryptography.X509Certificates.X509Certificate2 CopyWithPrivateKey(System.Security.Cryptography.SlhDsa privateKey) { throw null; } [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] public static System.Security.Cryptography.X509Certificates.X509Certificate2 CreateFromEncryptedPem(System.ReadOnlySpan certPem, System.ReadOnlySpan keyPem, System.ReadOnlySpan password) { throw null; } @@ -3580,18 +3580,18 @@ public X509Certificate2(string fileName, string? password, System.Security.Crypt public static System.Security.Cryptography.X509Certificates.X509ContentType GetCertContentType(string fileName) { throw null; } public System.Security.Cryptography.ECDiffieHellman? GetECDiffieHellmanPrivateKey() { throw null; } public System.Security.Cryptography.ECDiffieHellman? GetECDiffieHellmanPublicKey() { throw null; } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public System.Security.Cryptography.MLDsa? GetMLDsaPrivateKey() { throw null; } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public System.Security.Cryptography.MLDsa? GetMLDsaPublicKey() { throw null; } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public System.Security.Cryptography.MLKem? GetMLKemPrivateKey() { throw null; } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public System.Security.Cryptography.MLKem? GetMLKemPublicKey() { throw null; } public string GetNameInfo(System.Security.Cryptography.X509Certificates.X509NameType nameType, bool forIssuer) { throw null; } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public System.Security.Cryptography.SlhDsa? GetSlhDsaPrivateKey() { throw null; } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public System.Security.Cryptography.SlhDsa? GetSlhDsaPublicKey() { throw null; } [System.ObsoleteAttribute("X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public override void Import(byte[] rawData) { } @@ -3981,10 +3981,10 @@ protected X509SignatureGenerator() { } public System.Security.Cryptography.X509Certificates.PublicKey PublicKey { get { throw null; } } protected abstract System.Security.Cryptography.X509Certificates.PublicKey BuildPublicKey(); public static System.Security.Cryptography.X509Certificates.X509SignatureGenerator CreateForECDsa(System.Security.Cryptography.ECDsa key) { throw null; } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public static System.Security.Cryptography.X509Certificates.X509SignatureGenerator CreateForMLDsa(System.Security.Cryptography.MLDsa key) { throw null; } public static System.Security.Cryptography.X509Certificates.X509SignatureGenerator CreateForRSA(System.Security.Cryptography.RSA key, System.Security.Cryptography.RSASignaturePadding signaturePadding) { throw null; } - [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")] + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] public static System.Security.Cryptography.X509Certificates.X509SignatureGenerator CreateForSlhDsa(System.Security.Cryptography.SlhDsa key) { throw null; } public abstract byte[] GetSignatureAlgorithmIdentifier(System.Security.Cryptography.HashAlgorithmName hashAlgorithm); public abstract byte[] SignData(byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm); diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/MLDsaOpenSsl.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/MLDsaOpenSsl.cs index 956362f571167a..2253fad6888193 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/MLDsaOpenSsl.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/MLDsaOpenSsl.cs @@ -20,7 +20,7 @@ namespace System.Security.Cryptography /// cryptographic libraries. /// /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public sealed partial class MLDsaOpenSsl : MLDsa { private SafeEvpPKeyHandle _key; diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/MLKemOpenSsl.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/MLKemOpenSsl.cs index c16737741cd52e..2cc2f37afbbb26 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/MLKemOpenSsl.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/MLKemOpenSsl.cs @@ -20,7 +20,7 @@ namespace System.Security.Cryptography /// cryptographic libraries. /// /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public sealed partial class MLKemOpenSsl : MLKem { private readonly SafeEvpPKeyHandle _key; diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SlhDsaOpenSsl.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SlhDsaOpenSsl.cs index e9431f62469d48..1b86f62dd7e001 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SlhDsaOpenSsl.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SlhDsaOpenSsl.cs @@ -20,7 +20,7 @@ namespace System.Security.Cryptography /// cryptographic libraries. /// /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public sealed partial class SlhDsaOpenSsl : SlhDsa { private readonly SafeEvpPKeyHandle _key; diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/CertificateRequest.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/CertificateRequest.cs index 7828dc15d6d1d5..28d07f1e26d075 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/CertificateRequest.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/CertificateRequest.cs @@ -192,7 +192,7 @@ public CertificateRequest( /// /// or is . /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public CertificateRequest( string subjectName, MLDsa key) @@ -220,7 +220,7 @@ public CertificateRequest( /// /// or is . /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public CertificateRequest( X500DistinguishedName subjectName, MLDsa key) @@ -248,7 +248,7 @@ public CertificateRequest( /// /// or is . /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public CertificateRequest( string subjectName, SlhDsa key) @@ -276,7 +276,7 @@ public CertificateRequest( /// /// or is . /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public CertificateRequest( X500DistinguishedName subjectName, SlhDsa key) diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/PublicKey.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/PublicKey.cs index 35651a931d1e74..97ef079fa426cb 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/PublicKey.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/PublicKey.cs @@ -69,7 +69,7 @@ public PublicKey(AsymmetricAlgorithm key) : this(key.ExportSubjectPublicKeyInfo( /// must return a /// valid ASN.1-DER encoded X.509 SubjectPublicKeyInfo. /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public PublicKey(MLKem key) : this(key.ExportSubjectPublicKeyInfo()) { } @@ -86,7 +86,7 @@ public PublicKey(MLKem key) : this(key.ExportSubjectPublicKeyInfo()) /// must return a /// valid ASN.1-DER encoded X.509 SubjectPublicKeyInfo. /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public PublicKey(SlhDsa key) : this(key.ExportSubjectPublicKeyInfo()) { } @@ -324,7 +324,7 @@ public static PublicKey CreateFromSubjectPublicKeyInfo(ReadOnlySpan source /// /// The key contents are corrupt or could not be read successfully. /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] [UnsupportedOSPlatform("browser")] public MLKem? GetMLKemPublicKey() { @@ -347,7 +347,7 @@ public static PublicKey CreateFromSubjectPublicKeyInfo(ReadOnlySpan source /// /// The key contents are corrupt or could not be read successfully. /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] [UnsupportedOSPlatform("browser")] public MLDsa? GetMLDsaPublicKey() { @@ -370,7 +370,7 @@ public static PublicKey CreateFromSubjectPublicKeyInfo(ReadOnlySpan source /// /// The key contents are corrupt or could not be read successfully. /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] [UnsupportedOSPlatform("browser")] public SlhDsa? GetSlhDsaPublicKey() => Helpers.IsSlhDsaOid(_oid.Value) diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs index 1062b5869f21ba..b8631973038cf7 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs @@ -791,7 +791,7 @@ public X509Certificate2 CopyWithPrivateKey(ECDiffieHellman privateKey) /// /// The public key was invalid, or otherwise could not be imported. /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public MLKem? GetMLKemPublicKey() { if (MLKemAlgorithm.FromOid(GetKeyAlgorithm()) is null) @@ -812,7 +812,7 @@ public X509Certificate2 CopyWithPrivateKey(ECDiffieHellman privateKey) /// /// An error occurred accessing the private key. /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public MLKem? GetMLKemPrivateKey() { MLKemAlgorithm? algorithm = MLKemAlgorithm.FromOid(GetKeyAlgorithm()); @@ -845,7 +845,7 @@ public X509Certificate2 CopyWithPrivateKey(ECDiffieHellman privateKey) /// /// The certificate already has an associated private key. /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public X509Certificate2 CopyWithPrivateKey(MLKem privateKey) { ArgumentNullException.ThrowIfNull(privateKey); @@ -890,7 +890,7 @@ public X509Certificate2 CopyWithPrivateKey(MLKem privateKey) /// /// The public key was invalid, or otherwise could not be imported. /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public MLDsa? GetMLDsaPublicKey() { MLDsaAlgorithm? algorithm = MLDsaAlgorithm.GetMLDsaAlgorithmFromOid(GetKeyAlgorithm()); @@ -913,7 +913,7 @@ public X509Certificate2 CopyWithPrivateKey(MLKem privateKey) /// /// An error occurred accessing the private key. /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public MLDsa? GetMLDsaPrivateKey() { MLDsaAlgorithm? algorithm = MLDsaAlgorithm.GetMLDsaAlgorithmFromOid(GetKeyAlgorithm()); @@ -946,7 +946,7 @@ public X509Certificate2 CopyWithPrivateKey(MLKem privateKey) /// /// The certificate already has an associated private key. /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public X509Certificate2 CopyWithPrivateKey(MLDsa privateKey) { ArgumentNullException.ThrowIfNull(privateKey); @@ -994,7 +994,7 @@ public X509Certificate2 CopyWithPrivateKey(MLDsa privateKey) /// /// The public key was invalid, or otherwise could not be imported. /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public SlhDsa? GetSlhDsaPublicKey() { if (!Helpers.IsSlhDsaOid(GetKeyAlgorithm())) @@ -1015,7 +1015,7 @@ public X509Certificate2 CopyWithPrivateKey(MLDsa privateKey) /// /// An error occurred accessing the private key. /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public SlhDsa? GetSlhDsaPrivateKey() => Helpers.IsSlhDsaOid(GetKeyAlgorithm()) ? Pal.GetSlhDsaPrivateKey() @@ -1041,7 +1041,7 @@ public X509Certificate2 CopyWithPrivateKey(MLDsa privateKey) /// /// The certificate already has an associated private key. /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public X509Certificate2 CopyWithPrivateKey(SlhDsa privateKey) { ArgumentNullException.ThrowIfNull(privateKey); diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509SignatureGenerator.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509SignatureGenerator.cs index 0de46ce56e198f..3d4e1b9763eed6 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509SignatureGenerator.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509SignatureGenerator.cs @@ -47,7 +47,7 @@ public static X509SignatureGenerator CreateForRSA(RSA key, RSASignaturePadding s /// /// is . /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public static X509SignatureGenerator CreateForMLDsa(MLDsa key) { ArgumentNullException.ThrowIfNull(key); @@ -67,7 +67,7 @@ public static X509SignatureGenerator CreateForMLDsa(MLDsa key) /// /// is . /// - [Experimental(Experimentals.PostQuantumCryptographyDiagId)] + [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)] public static X509SignatureGenerator CreateForSlhDsa(SlhDsa key) { ArgumentNullException.ThrowIfNull(key);