216 references to SR
System.Net.Security (216)
src\libraries\Common\src\Interop\Unix\System.Net.Security.Native\Interop.GssApiException.cs (8)
55
SR
.Format(
SR
.net_gssapi_operation_failed_detailed, majorError, minorError) :
56
SR
.Format(
SR
.net_gssapi_operation_failed, majorStatus.ToString("x"), minorStatus.ToString("x"));
61
SR
.Format(
SR
.net_gssapi_operation_failed_detailed_majoronly, majorError) :
62
SR
.Format(
SR
.net_gssapi_operation_failed_majoronly, majorStatus.ToString("x"));
src\libraries\Common\src\Interop\Unix\System.Net.Security.Native\Interop.GssBuffer.cs (2)
34
throw new NetSecurityNative.GssApiException(
SR
.Format(
SR
.net_context_buffer_too_small, sourceLength, destinationAvailable));
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (34)
164
SR
.Format(
SR
.net_ssl_encryptionpolicy_notsupported, sslAuthenticationOptions.EncryptionPolicy));
174
SR
.Format(
SR
.net_ssl_encryptionpolicy_notsupported, sslAuthenticationOptions.EncryptionPolicy));
218
throw CreateSslException(
SR
.net_allocate_ssl_context_failed);
230
throw new SslException(
SR
.Format(
SR
.net_ssl_encryptionpolicy_notsupported, sslAuthenticationOptions.EncryptionPolicy));
246
throw new PlatformNotSupportedException(
SR
.Format(
SR
.net_ssl_encryptionpolicy_notsupported, sslAuthenticationOptions.EncryptionPolicy));
294
throw CreateSslException(
SR
.net_ssl_use_cert_failed);
333
throw CreateSslException(
SR
.net_ssl_use_cert_failed);
339
throw CreateSslException(
SR
.net_ssl_use_private_key_failed);
346
throw CreateSslException(
SR
.net_ssl_use_cert_failed);
399
throw CreateSslException(
SR
.net_allocate_ssl_context_failed);
432
throw CreateSslException(
SR
.net_alpn_config_failed);
627
throw CreateSslException(
SR
.Format(
SR
.net_ssl_set_sigalgs_failed, "server"));
633
throw CreateSslException(
SR
.Format(
SR
.net_ssl_set_sigalgs_failed, "client"));
705
handshakeException = new SslException(
SR
.Format(
SR
.net_ssl_handshake_failed_error, errorCode), innerError);
773
throw new SslException(
SR
.Format(
SR
.net_ssl_encrypt_failed, errorCode), GetSslError(retVal, errorCode));
828
throw new SslException(
SR
.Format(
SR
.net_ssl_decrypt_failed, errorCode), GetSslError(retVal, errorCode));
857
throw CreateSslException(
SR
.net_ssl_get_channel_binding_token_failed);
1165
throw CreateSslException(
SR
.net_ssl_read_bio_failed_error);
1175
throw CreateSslException(
SR
.net_ssl_write_bio_failed_error);
1214
throw CreateSslException(
SR
.net_ssl_use_cert_failed);
1221
throw CreateSslException(
SR
.net_ssl_use_private_key_failed);
1229
throw CreateSslException(
SR
.net_ssl_check_private_key_failed);
1238
string msg =
SR
.Format(message, Utf8StringMarshaller.ConvertToManaged(Crypto.ErrReasonErrorString(errorVal)));
1265
: this(
SR
.Format(
SR
.net_generic_operation_failed, error))
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Ssl.cs (3)
98
throw Interop.OpenSsl.CreateSslException(
SR
.net_ssl_get_default_sigalgs_failed);
257
throw new ArgumentException(
SR
.net_ssl_app_protocols_invalid, nameof(applicationProtocols));
264
throw new ArgumentException(
SR
.net_ssl_app_protocols_invalid, nameof(applicationProtocols));
src\libraries\Common\src\Microsoft\Win32\SafeHandles\GssSafeHandles.cs (1)
101
SR
.net_gssapi_ntlm_missing_plugin);
System\Net\CertificateValidationPal.cs (2)
81
NetEventSource.Error(null,
SR
.Format(
SR
.net_log_open_store_failed, storeLocation, exception));
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (4)
307
if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(null,
SR
.net_ntlm_not_possible_default_cred);
820
throw new InvalidOperationException(
SR
.net_auth_noauth);
840
throw new InvalidOperationException(
SR
.net_auth_noauth);
869
throw new InvalidOperationException(
SR
.net_auth_noauth);
System\Net\NegotiateAuthenticationPal.ManagedSpnego.cs (5)
408
throw new InvalidOperationException(
SR
.net_auth_noauth);
418
throw new InvalidOperationException(
SR
.net_auth_noauth);
428
throw new InvalidOperationException(
SR
.net_auth_noauth);
438
throw new InvalidOperationException(
SR
.net_auth_noauth);
448
throw new InvalidOperationException(
SR
.net_auth_noauth);
System\Net\NegotiateAuthenticationPal.Unix.cs (5)
117
throw new PlatformNotSupportedException(
SR
.net_nego_server_not_supported);
200
if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this,
SR
.net_ntlm_not_possible_default_cred);
201
throw new Interop.NetSecurityNative.GssApiException(Interop.NetSecurityNative.Status.GSS_S_NO_CRED, 0,
SR
.net_ntlm_not_possible_default_cred);
205
if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this,
SR
.net_nego_not_supported_empty_target_with_defaultcreds);
206
throw new Interop.NetSecurityNative.GssApiException(Interop.NetSecurityNative.Status.GSS_S_BAD_NAME, 0,
SR
.net_nego_not_supported_empty_target_with_defaultcreds);
System\Net\Security\AuthenticatedStream.cs (1)
24
throw new ArgumentException(
SR
.net_io_must_be_rw_stream, nameof(innerStream));
System\Net\Security\CipherSuitesPolicyPal.Linux.cs (5)
27
throw new PlatformNotSupportedException(
SR
.net_ssl_ciphersuites_policy_not_supported);
34
throw OpenSsl.CreateSslException(
SR
.net_allocate_ssl_context_failed);
43
throw OpenSsl.CreateSslException(
SR
.net_allocate_ssl_context_failed);
145
throw new PlatformNotSupportedException(
SR
.net_ssl_ciphersuites_policy_not_supported);
166
throw new PlatformNotSupportedException(
SR
.net_ssl_ciphersuites_policy_not_supported);
System\Net\Security\NegotiateAuthentication.cs (18)
168
throw new InvalidOperationException(
SR
.net_auth_noauth);
212
throw new InvalidOperationException(
SR
.net_auth_noauth);
294
throw new InvalidOperationException(
SR
.net_auth_noauth);
321
throw new InvalidOperationException(
SR
.net_auth_noauth);
349
throw new InvalidOperationException(
SR
.net_auth_noauth);
373
throw new InvalidOperationException(
SR
.net_auth_noauth);
398
throw new InvalidOperationException(
SR
.net_auth_noauth);
410
if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this,
SR
.net_log_listener_no_spn_kerberos);
416
if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this,
SR
.net_log_listener_no_spn_disabled);
422
if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this,
SR
.net_log_listener_no_spn_cbt);
428
if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this,
SR
.net_log_listener_no_spns);
438
if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this,
SR
.net_log_listener_no_spn_whensupported);
443
if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this,
SR
.net_log_listener_spn_failed_always);
448
if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this,
SR
.net_log_listener_spn, clientSpn);
455
NetEventSource.Info(this,
SR
.net_log_listener_spn_passed);
459
NetEventSource.Info(this,
SR
.net_log_listener_spn_failed);
463
NetEventSource.Info(this,
SR
.net_log_listener_spn_failed_empty);
467
NetEventSource.Info(this,
SR
.net_log_listener_spn_failed_dump);
System\Net\Security\NegotiateStream.cs (38)
284
set => throw new NotSupportedException(
SR
.net_noseek);
291
throw new NotSupportedException(
SR
.net_noseek);
345
throw new NotSupportedException(
SR
.Format(
SR
.net_io_invalidnestedcall, "read"));
379
throw new IOException(
SR
.net_frame_read_size);
420
throw new IOException(
SR
.net_io_read);
440
throw new IOException(
SR
.net_io_read, e);
455
throw new IOException(
SR
.net_io_eof);
511
throw new NotSupportedException(
SR
.Format(
SR
.net_io_invalidnestedcall, "write"));
541
throw new IOException(
SR
.net_io_encrypt);
554
throw new IOException(
SR
.net_io_write, e);
608
throw new ArgumentException(
SR
.net_auth_must_specify_extended_protection_scheme, nameof(policy));
637
throw new InvalidOperationException(
SR
.net_auth_reauth);
647
throw new ArgumentOutOfRangeException(nameof(impersonationLevel), impersonationLevel.ToString(),
SR
.net_auth_supported_impl_levels);
652
throw new InvalidOperationException(
SR
.net_auth_client_server);
717
throw new InvalidOperationException(
SR
.net_auth_noauth);
729
throw new InvalidOperationException(
SR
.Format(
SR
.net_io_invalidnestedcall, "authenticate"));
769
new AuthenticationException(
SR
.net_auth_bad_client_creds_or_target_mismatch),
771
new AuthenticationException(
SR
.net_auth_bad_client_creds_or_target_mismatch),
773
new AuthenticationException(
SR
.Format(
SR
.net_auth_context_expectation, _expectedImpersonationLevel.ToString(), PrivateImpersonationLevel.ToString())),
775
new AuthenticationException(
SR
.Format(
SR
.net_auth_context_expectation, _context.ProtectionLevel.ToString(), _expectedProtectionLevel.ToString())),
834
new InvalidCredentialException(IsServer ?
SR
.net_auth_bad_client_creds :
SR
.net_auth_bad_client_creds_or_target_mismatch, win32Exception),
835
_ => new AuthenticationException(
SR
.net_auth_SSPI, win32Exception)
868
throw new AuthenticationException(
SR
.net_auth_eof);
881
throw new AuthenticationException(
SR
.net_auth_alert);
899
throw new AuthenticationException(
SR
.Format(
SR
.net_io_header_id, nameof(FrameHeader.MessageId), _framer.ReadHeader.MessageId, FrameHeader.HandshakeId));
907
throw new AuthenticationException(
SR
.Format(
SR
.net_io_header_id, nameof(FrameHeader.MessageId), _framer.ReadHeader.MessageId, FrameHeader.HandshakeDoneId));
936
(int)SecurityStatusPalErrorCode.LogonDenied => new InvalidCredentialException(
SR
.net_auth_bad_client_creds, e),
937
(int)Interop.SECURITY_STATUS.LogonDenied => new InvalidCredentialException(
SR
.net_auth_bad_client_creds, e),
938
ERROR_TRUST_FAILURE => new AuthenticationException(
SR
.net_auth_context_expectation_remote, e),
939
_ => new AuthenticationException(
SR
.net_auth_alert, e)
System\Net\Security\SslApplicationProtocol.cs (1)
34
throw new ArgumentException(
SR
.net_ssl_app_protocol_invalid, nameof(protocol));
System\Net\Security\SslAuthenticationOptions.cs (12)
32
throw new InvalidOperationException(
SR
.Format(
SR
.net_conflicting_options, nameof(RemoteCertificateValidationCallback)));
42
throw new InvalidOperationException(
SR
.Format(
SR
.net_conflicting_options, nameof(LocalCertificateSelectionCallback)));
64
throw new PlatformNotSupportedException(
SR
.net_ssl_allow_rsa_padding_not_supported);
95
throw new NotSupportedException(
SR
.net_ssl_io_no_server_cert);
103
throw new InvalidOperationException(
SR
.Format(
SR
.net_conflicting_options, nameof(ServerCertificateSelectionCallback)));
114
throw new InvalidOperationException(
SR
.Format(
SR
.net_conflicting_options, nameof(RemoteCertificateValidationCallback)));
134
throw new PlatformNotSupportedException(
SR
.net_ssl_allow_rsa_padding_not_supported);
159
throw new AuthenticationException(
SR
.net_ssl_io_no_server_cert);
System\Net\Security\SslCertificateTrust.cs (2)
26
throw new PlatformNotSupportedException(
SR
.net_ssl_trust_handshake);
50
throw new PlatformNotSupportedException(
SR
.net_ssl_trust_handshake);
System\Net\Security\SslClientAuthenticationOptions.cs (4)
57
throw new ArgumentException(
SR
.Format(
SR
.net_invalid_enum, nameof(X509RevocationMode)), nameof(value));
72
throw new ArgumentException(
SR
.Format(
SR
.net_invalid_enum, nameof(EncryptionPolicy)), nameof(value));
System\Net\Security\SslConnectionInfo.Linux.cs (1)
42
throw Interop.OpenSsl.CreateSslException(
SR
.net_ssl_get_connection_info_failed);
System\Net\Security\SslServerAuthenticationOptions.cs (4)
59
throw new ArgumentException(
SR
.Format(
SR
.net_invalid_enum, nameof(X509RevocationMode)), nameof(value));
74
throw new ArgumentException(
SR
.Format(
SR
.net_invalid_enum, nameof(EncryptionPolicy)), nameof(value));
System\Net\Security\SslStream.cs (9)
211
throw new ArgumentException(
SR
.Format(
SR
.net_invalid_enum, "EncryptionPolicy"), nameof(encryptionPolicy));
683
set => throw new NotSupportedException(
SR
.net_noseek);
688
public override long Seek(long offset, SeekOrigin origin) => throw new NotSupportedException(
SR
.net_noseek);
702
throw new InvalidOperationException(
SR
.net_ssl_certificate_exist);
752
throw new NotSupportedException(
SR
.Format(
SR
.net_io_invalidnestedcall, "read"));
964
throw new InvalidOperationException(
SR
.net_ssl_io_already_shutdown);
971
throw new InvalidOperationException(
SR
.net_auth_noauth);
System\Net\Security\SslStream.IO.cs (34)
198
throw new InvalidOperationException(
SR
.Format(
SR
.net_io_invalidnestedcall, "authenticate"));
204
throw new NotSupportedException(
SR
.Format(
SR
.net_io_invalidnestedcall, "read"));
211
throw new NotSupportedException(
SR
.Format(
SR
.net_io_invalidnestedcall, "write"));
220
throw new InvalidOperationException(
SR
.net_ssl_renegotiate_buffer);
294
throw new InvalidOperationException(
SR
.Format(
SR
.net_io_invalidnestedcall, "authenticate"));
342
throw new AuthenticationException(
SR
.net_auth_SSPI, token.GetException());
392
throw new AuthenticationException(
SR
.Format(
SR
.net_auth_tls_alert, _lastFrame.AlertDescription.ToString()), token.GetException());
395
throw new AuthenticationException(
SR
.net_auth_SSPI, token.GetException());
442
throw new IOException(
SR
.net_io_eof);
503
throw new InvalidOperationException(
SR
.net_ssl_renegotiate_data);
520
throw new AuthenticationException(
SR
.net_ssl_io_frame);
667
return ExceptionDispatchInfo.SetCurrentStackTrace(new AuthenticationException(
SR
.net_ssl_io_cert_custom_validation, null));
672
return ExceptionDispatchInfo.SetCurrentStackTrace(new AuthenticationException(
SR
.Format(
SR
.net_ssl_io_cert_chain_validation, chainStatus), null));
677
return ExceptionDispatchInfo.SetCurrentStackTrace(new AuthenticationException(
SR
.Format(
SR
.net_ssl_io_cert_validation, sslPolicyErrors), null));
724
return ValueTask.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(new IOException(
SR
.net_io_encrypt, SslStreamPal.GetException(token.Status))));
759
throw new IOException(
SR
.net_io_encrypt, SslStreamPal.GetException(token.Status));
830
throw new IOException(
SR
.net_io_eof);
899
throw new NotSupportedException(
SR
.Format(
SR
.net_io_invalidnestedcall, "read"));
967
throw new IOException(
SR
.net_ssl_io_renego);
978
throw new IOException(
SR
.net_io_decrypt, SslStreamPal.GetException(status));
1027
throw new IOException(
SR
.net_io_read, e);
1049
throw new NotSupportedException(
SR
.Format(
SR
.net_io_invalidnestedcall, "write"));
1075
throw new IOException(
SR
.net_io_write, e);
1107
throw new IOException(
SR
.net_ssl_io_frame);
1113
throw new AuthenticationException(
SR
.net_frame_read_size);
System\Net\Security\SslStream.Protocol.cs (7)
659
throw new AuthenticationException(
SR
.net_ssl_io_no_server_cert);
675
throw new NotSupportedException(
SR
.net_ssl_io_no_server_cert);
694
throw new NotSupportedException(
SR
.net_ssl_io_no_server_cert);
704
throw new NotSupportedException(
SR
.net_ssl_io_no_server_cert);
1315
NetEventSource.Log.RemoteCertificateError(this,
SR
.net_log_remote_cert_has_errors);
1318
NetEventSource.Log.RemoteCertificateError(this,
SR
.net_log_remote_cert_not_available);
1323
NetEventSource.Log.RemoteCertificateError(this,
SR
.net_log_remote_cert_name_mismatch);
System\Net\Security\SslStreamCertificateContext.cs (1)
44
throw new NotSupportedException(
SR
.net_ssl_io_no_server_cert);
System\Net\Security\SslStreamCertificateContext.Linux.cs (1)
109
throw new NotSupportedException(
SR
.net_ssl_io_no_server_cert);
System\Net\Security\SslStreamPal.Unix.cs (1)
128
throw Interop.OpenSsl.CreateSslException(
SR
.net_ssl_invalid_certificate);
System\Net\StreamFramer.cs (10)
44
throw new IOException(
SR
.Format(
SR
.net_io_readfailure,
SR
.net_io_connectionclosed));
50
throw new InvalidOperationException(
SR
.Format(
SR
.net_frame_size,
63
throw new IOException(
SR
.Format(
SR
.net_io_readfailure,
SR
.net_io_connectionclosed));
108
throw new ArgumentException(
SR
.Format(
SR
.net_frame_max_size, MaxMessageSize, value), nameof(PayloadSize));
System\Security\Authentication\ExtendedProtection\ExtendedProtectionPolicy.cs (3)
29
throw new ArgumentException(
SR
.security_ExtendedProtectionPolicy_UseDifferentConstructorForNever, nameof(policyEnforcement));
34
throw new ArgumentException(
SR
.security_ExtendedProtectionPolicy_NoEmptyServiceNameCollection, nameof(customServiceNames));
55
throw new ArgumentException(
SR
.security_ExtendedProtectionPolicy_UseDifferentConstructorForNever, nameof(policyEnforcement));