Skip to content

Commit

Permalink
Improve text for OpenSsl primitives when OpenSSL is not available (#8…
Browse files Browse the repository at this point in the history
…9046)

* Improve text for OpenSsl primitives when OpenSSL is not available

* Update src/libraries/System.Security.Cryptography/src/Resources/Strings.resx

Co-authored-by: Stephen Toub <[email protected]>

---------

Co-authored-by: Stephen Toub <[email protected]>
  • Loading branch information
vcsjones and stephentoub committed Jul 18, 2023
1 parent c2bd0c9 commit f55247d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static partial void ThrowIfNotSupported()
{
if (!Interop.OpenSslNoInit.OpenSslIsAvailable)
{
throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(DSAOpenSsl)));
throw new PlatformNotSupportedException(SR.Format(SR.PlatformNotSupported_CryptographyOpenSSLNotFound, nameof(DSAOpenSsl)));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ static partial void ThrowIfNotSupported()
{
if (!Interop.OpenSslNoInit.OpenSslIsAvailable)
{
throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(ECDiffieHellmanOpenSsl)));
throw new PlatformNotSupportedException(SR.Format(SR.PlatformNotSupported_CryptographyOpenSSLNotFound, nameof(ECDiffieHellmanOpenSsl)));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static partial void ThrowIfNotSupported()
{
if (!Interop.OpenSslNoInit.OpenSslIsAvailable)
{
throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(ECDsaOpenSsl)));
throw new PlatformNotSupportedException(SR.Format(SR.PlatformNotSupported_CryptographyOpenSSLNotFound, nameof(ECDsaOpenSsl)));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static partial void ThrowIfNotSupported()
{
if (!Interop.OpenSslNoInit.OpenSslIsAvailable)
{
throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(RSAOpenSsl)));
throw new PlatformNotSupportedException(SR.Format(SR.PlatformNotSupported_CryptographyOpenSSLNotFound, nameof(RSAOpenSsl)));
}
}
}
Expand Down

0 comments on commit f55247d

Please sign in to comment.