未验证 提交 f55247d0 编写于 作者: K Kevin Jones 提交者: GitHub

Improve text for OpenSsl primitives when OpenSSL is not available (#89046)

* Improve text for OpenSsl primitives when OpenSSL is not available

* Update src/libraries/System.Security.Cryptography/src/Resources/Strings.resx
Co-authored-by: NStephen Toub <stoub@microsoft.com>

---------
Co-authored-by: NStephen Toub <stoub@microsoft.com>
上级 c2bd0c9e
......@@ -810,6 +810,9 @@
<data name="PlatformNotSupported_CryptographyOpenSSL" xml:space="preserve">
<value>OpenSSL is not supported on this platform.</value>
</data>
<data name="PlatformNotSupported_CryptographyOpenSSLNotFound" xml:space="preserve">
<value>OpenSSL is required for algorithm '{0}' but could not be found or loaded.</value>
</data>
<data name="Security_AccessDenied" xml:space="preserve">
<value>Access is denied.</value>
</data>
......
......@@ -113,7 +113,7 @@ public SafeEvpPKeyHandle DuplicateKeyHandle()
{
if (!Interop.OpenSslNoInit.OpenSslIsAvailable)
{
throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(DSAOpenSsl)));
throw new PlatformNotSupportedException(SR.Format(SR.PlatformNotSupported_CryptographyOpenSSLNotFound, nameof(DSAOpenSsl)));
}
}
}
......
......@@ -101,7 +101,7 @@ public SafeEvpPKeyHandle DuplicateKeyHandle()
{
if (!Interop.OpenSslNoInit.OpenSslIsAvailable)
{
throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(ECDiffieHellmanOpenSsl)));
throw new PlatformNotSupportedException(SR.Format(SR.PlatformNotSupported_CryptographyOpenSSLNotFound, nameof(ECDiffieHellmanOpenSsl)));
}
}
}
......
......@@ -102,7 +102,7 @@ public SafeEvpPKeyHandle DuplicateKeyHandle()
{
if (!Interop.OpenSslNoInit.OpenSslIsAvailable)
{
throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(ECDsaOpenSsl)));
throw new PlatformNotSupportedException(SR.Format(SR.PlatformNotSupported_CryptographyOpenSSLNotFound, nameof(ECDsaOpenSsl)));
}
}
}
......
......@@ -94,7 +94,7 @@ public SafeEvpPKeyHandle DuplicateKeyHandle()
{
if (!Interop.OpenSslNoInit.OpenSslIsAvailable)
{
throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(RSAOpenSsl)));
throw new PlatformNotSupportedException(SR.Format(SR.PlatformNotSupported_CryptographyOpenSSLNotFound, nameof(RSAOpenSsl)));
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册