diff options
author | Egor Bogatov <egorbo@gmail.com> | 2019-06-05 21:44:47 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2019-06-05 21:44:46 +0300 |
commit | c5ed9bfc0d1b393c1dc6d97fc3caf8b5b09ab443 (patch) | |
tree | df8a7247d92d41252595d47089ebfddecfaa0f66 /mcs/class/referencesource | |
parent | f7042d48a54fe7660a5157f52bed412030c922d5 (diff) |
Reflect recent NS2.1 changes (#14679)
Due to few recent updates to dotnet/standard (NETStandard 2.1) we had 40 apicompat issues.
Mostly copy-pasted from dotnet/corefx.
Didn't implement Cryptography stuff yet.
Checked all profiles.
Implements #14609
Diffstat (limited to 'mcs/class/referencesource')
6 files changed, 59 insertions, 0 deletions
diff --git a/mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDiffieHellman.cs b/mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDiffieHellman.cs index 36e999cb7de..aa794316008 100644 --- a/mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDiffieHellman.cs +++ b/mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDiffieHellman.cs @@ -228,5 +228,13 @@ namespace System.Security.Cryptography { { throw new NotSupportedException(SR.GetString(SR.NotSupported_SubclassOverride)); } + +#if MONO + public virtual byte[] ExportECPrivateKey () => throw new PlatformNotSupportedException (); + + public virtual bool TryExportECPrivateKey (System.Span<byte> destination, out int bytesWritten) => throw new PlatformNotSupportedException (); + + public virtual void ImportECPrivateKey (System.ReadOnlySpan<byte> source, out int bytesRead) => throw new PlatformNotSupportedException (); +#endif } } diff --git a/mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDsa.cs b/mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDsa.cs index f653f221a1f..e2039db29da 100644 --- a/mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDsa.cs +++ b/mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDsa.cs @@ -309,6 +309,12 @@ namespace System.Security.Cryptography { } } } + + public virtual byte[] ExportECPrivateKey () => throw new PlatformNotSupportedException (); + + public virtual bool TryExportECPrivateKey (System.Span<byte> destination, out int bytesWritten) => throw new PlatformNotSupportedException (); + + public virtual void ImportECPrivateKey (System.ReadOnlySpan<byte> source, out int bytesRead) => throw new PlatformNotSupportedException (); #endif } } diff --git a/mcs/class/referencesource/System/compmod/system/diagnostics/CorrelationManager.cs b/mcs/class/referencesource/System/compmod/system/diagnostics/CorrelationManager.cs index 29bfa83755d..ebd541242cd 100644 --- a/mcs/class/referencesource/System/compmod/system/diagnostics/CorrelationManager.cs +++ b/mcs/class/referencesource/System/compmod/system/diagnostics/CorrelationManager.cs @@ -68,6 +68,11 @@ namespace System.Diagnostics { return idStack; } +#else + public Stack LogicalOperationStack => throw new PlatformNotSupportedException (); + public void StartLogicalOperation (object operationId) => throw new PlatformNotSupportedException (); + public void StartLogicalOperation () => throw new PlatformNotSupportedException (); + public void StopLogicalOperation () => throw new PlatformNotSupportedException (); #endif } } diff --git a/mcs/class/referencesource/mscorlib/system/security/claims/ClaimsPrincipal.cs b/mcs/class/referencesource/mscorlib/system/security/claims/ClaimsPrincipal.cs index 7968b5cc697..3eea6104762 100644 --- a/mcs/class/referencesource/mscorlib/system/security/claims/ClaimsPrincipal.cs +++ b/mcs/class/referencesource/mscorlib/system/security/claims/ClaimsPrincipal.cs @@ -540,6 +540,8 @@ namespace System.Security.Claims } } } +#else + public static ClaimsPrincipal Current => throw new PlatformNotSupportedException (); #endif /// <summary> diff --git a/mcs/class/referencesource/mscorlib/system/security/cryptography/asymmetricalgorithm.cs b/mcs/class/referencesource/mscorlib/system/security/cryptography/asymmetricalgorithm.cs index 45cdaa749e6..e3e3552047f 100644 --- a/mcs/class/referencesource/mscorlib/system/security/cryptography/asymmetricalgorithm.cs +++ b/mcs/class/referencesource/mscorlib/system/security/cryptography/asymmetricalgorithm.cs @@ -113,5 +113,31 @@ namespace System.Security.Cryptography { public virtual String ToXmlString(bool includePrivateParameters) { throw new NotImplementedException(); } + +#if MONO + public virtual byte[] ExportEncryptedPkcs8PrivateKey (System.ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) => throw new PlatformNotSupportedException (); + + public virtual byte[] ExportEncryptedPkcs8PrivateKey (System.ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters) => throw new PlatformNotSupportedException (); + + public virtual byte[] ExportPkcs8PrivateKey () => throw new PlatformNotSupportedException (); + + public virtual byte[] ExportSubjectPublicKeyInfo () => throw new PlatformNotSupportedException (); + + public virtual void ImportEncryptedPkcs8PrivateKey (System.ReadOnlySpan<byte> passwordBytes, System.ReadOnlySpan<byte> source, out int bytesRead) => throw new PlatformNotSupportedException (); + + public virtual void ImportEncryptedPkcs8PrivateKey (System.ReadOnlySpan<char> password, System.ReadOnlySpan<byte> source, out int bytesRead) => throw new PlatformNotSupportedException (); + + public virtual void ImportPkcs8PrivateKey (System.ReadOnlySpan<byte> source, out int bytesRead) => throw new PlatformNotSupportedException (); + + public virtual void ImportSubjectPublicKeyInfo (System.ReadOnlySpan<byte> source, out int bytesRead) => throw new PlatformNotSupportedException (); + + public virtual bool TryExportEncryptedPkcs8PrivateKey (System.ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters, System.Span<byte> destination, out int bytesWritten) => throw new PlatformNotSupportedException (); + + public virtual bool TryExportEncryptedPkcs8PrivateKey (System.ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters, System.Span<byte> destination, out int bytesWritten) => throw new PlatformNotSupportedException (); + + public virtual bool TryExportPkcs8PrivateKey (System.Span<byte> destination, out int bytesWritten) => throw new PlatformNotSupportedException (); + + public virtual bool TryExportSubjectPublicKeyInfo (System.Span<byte> destination, out int bytesWritten) => throw new PlatformNotSupportedException (); +#endif } } diff --git a/mcs/class/referencesource/mscorlib/system/security/cryptography/rsa.cs b/mcs/class/referencesource/mscorlib/system/security/cryptography/rsa.cs index 87fdfaae2a1..07d1d49c27d 100644 --- a/mcs/class/referencesource/mscorlib/system/security/cryptography/rsa.cs +++ b/mcs/class/referencesource/mscorlib/system/security/cryptography/rsa.cs @@ -499,6 +499,18 @@ namespace System.Security.Cryptography { public virtual bool VerifyHash(ReadOnlySpan<byte> hash, ReadOnlySpan<byte> signature, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding) => VerifyHash(hash.ToArray(), signature.ToArray(), hashAlgorithm, padding); + + public virtual byte[] ExportRSAPrivateKey () => throw new PlatformNotSupportedException (); + + public virtual byte[] ExportRSAPublicKey () => throw new PlatformNotSupportedException (); + + public virtual void ImportRSAPrivateKey (System.ReadOnlySpan<byte> source, out int bytesRead) => throw new PlatformNotSupportedException (); + + public virtual void ImportRSAPublicKey (System.ReadOnlySpan<byte> source, out int bytesRead) => throw new PlatformNotSupportedException (); + + public virtual bool TryExportRSAPrivateKey (System.Span<byte> destination, out int bytesWritten) => throw new PlatformNotSupportedException (); + + public virtual bool TryExportRSAPublicKey (System.Span<byte> destination, out int bytesWritten) => throw new PlatformNotSupportedException (); #endif } } |