Fix encryption policy error message missing argument (dotnet/corefx#27205)
authorStephen Toub <stoub@microsoft.com>
Fri, 16 Feb 2018 18:20:44 +0000 (13:20 -0500)
committerGitHub <noreply@github.com>
Fri, 16 Feb 2018 18:20:44 +0000 (13:20 -0500)
The message is currently "The '{0}' encryption policy is not supported on this platform." rather than, e.g. "The 'NoEncryption' encryption policy is not supported on this platform."

Commit migrated from https://github.com/dotnet/corefx/commit/e282c38afc12c2ebeb2b411c186758e8a25fa743

src/libraries/System.Net.Security/src/System/Net/Security/Pal.OSX/SafeDeleteSslContext.cs

index 2007763..efdeb06 100644 (file)
@@ -66,7 +66,7 @@ namespace System.Net
                     // let it pass.
                     break;
                 default:
-                    throw new PlatformNotSupportedException(SR.net_encryptionpolicy_notsupported);
+                    throw new PlatformNotSupportedException(SR.Format(SR.net_encryptionpolicy_notsupported, credential.Policy));
             }
 
             SafeSslHandle sslContext = Interop.AppleCrypto.SslCreateContext(isServer ? 1 : 0);