217 references to SR
System.Net.Security (217)
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)
163
SR
.Format(
SR
.net_ssl_encryptionpolicy_notsupported, sslAuthenticationOptions.EncryptionPolicy));
173
SR
.Format(
SR
.net_ssl_encryptionpolicy_notsupported, sslAuthenticationOptions.EncryptionPolicy));
217
throw CreateSslException(
SR
.net_allocate_ssl_context_failed);
227
throw new SslException(
SR
.Format(
SR
.net_ssl_encryptionpolicy_notsupported, sslAuthenticationOptions.EncryptionPolicy));
243
throw new PlatformNotSupportedException(
SR
.Format(
SR
.net_ssl_encryptionpolicy_notsupported, sslAuthenticationOptions.EncryptionPolicy));
291
throw CreateSslException(
SR
.net_ssl_use_cert_failed);
330
throw CreateSslException(
SR
.net_ssl_use_cert_failed);
336
throw CreateSslException(
SR
.net_ssl_use_private_key_failed);
343
throw CreateSslException(
SR
.net_ssl_use_cert_failed);
399
throw CreateSslException(
SR
.net_allocate_ssl_context_failed);
439
throw CreateSslException(
SR
.net_alpn_config_failed);
633
throw CreateSslException(
SR
.Format(
SR
.net_ssl_set_sigalgs_failed, "server"));
639
throw CreateSslException(
SR
.Format(
SR
.net_ssl_set_sigalgs_failed, "client"));
703
handshakeException = new SslException(
SR
.Format(
SR
.net_ssl_handshake_failed_error, errorCode), innerError);
771
throw new SslException(
SR
.Format(
SR
.net_ssl_encrypt_failed, errorCode), GetSslError(retVal, errorCode));
826
throw new SslException(
SR
.Format(
SR
.net_ssl_decrypt_failed, errorCode), GetSslError(retVal, errorCode));
855
throw CreateSslException(
SR
.net_ssl_get_channel_binding_token_failed);
1005
throw CreateSslException(
SR
.net_ssl_read_bio_failed_error);
1015
throw CreateSslException(
SR
.net_ssl_write_bio_failed_error);
1057
throw CreateSslException(
SR
.net_ssl_use_cert_failed);
1064
throw CreateSslException(
SR
.net_ssl_use_private_key_failed);
1072
throw CreateSslException(
SR
.net_ssl_check_private_key_failed);
1081
string msg =
SR
.Format(message, Utf8StringMarshaller.ConvertToManaged(Crypto.ErrReasonErrorString(errorVal)));
1108
: this(
SR
.Format(
SR
.net_generic_operation_failed, error))
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Ssl.cs (2)
98
throw Interop.OpenSsl.CreateSslException(
SR
.net_ssl_get_default_sigalgs_failed);
244
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);
src\libraries\Common\src\System\Security\Cryptography\Asn1Reader\AsnValueReader.cs (2)
233
throw new CryptographicException(
SR
.Cryptography_Der_Invalid_Encoding, e);
247
throw new CryptographicException(
SR
.Cryptography_Der_Invalid_Encoding, e);
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)
240
if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(null,
SR
.net_ntlm_not_possible_default_cred);
766
throw new InvalidOperationException(
SR
.net_auth_noauth);
786
throw new InvalidOperationException(
SR
.net_auth_noauth);
815
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)
122
throw new PlatformNotSupportedException(
SR
.net_nego_server_not_supported);
205
if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this,
SR
.net_ntlm_not_possible_default_cred);
206
throw new Interop.NetSecurityNative.GssApiException(Interop.NetSecurityNative.Status.GSS_S_NO_CRED, 0,
SR
.net_ntlm_not_possible_default_cred);
210
if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this,
SR
.net_nego_not_supported_empty_target_with_defaultcreds);
211
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);
41
throw OpenSsl.CreateSslException(
SR
.net_allocate_ssl_context_failed);
143
throw new PlatformNotSupportedException(
SR
.net_ssl_ciphersuites_policy_not_supported);
164
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)
33
throw new InvalidOperationException(
SR
.Format(
SR
.net_conflicting_options, nameof(RemoteCertificateValidationCallback)));
43
throw new InvalidOperationException(
SR
.Format(
SR
.net_conflicting_options, nameof(LocalCertificateSelectionCallback)));
65
throw new PlatformNotSupportedException(
SR
.net_ssl_allow_rsa_padding_not_supported);
96
throw new NotSupportedException(
SR
.net_ssl_io_no_server_cert);
104
throw new InvalidOperationException(
SR
.Format(
SR
.net_conflicting_options, nameof(ServerCertificateSelectionCallback)));
115
throw new InvalidOperationException(
SR
.Format(
SR
.net_conflicting_options, nameof(RemoteCertificateValidationCallback)));
135
throw new PlatformNotSupportedException(
SR
.net_ssl_allow_rsa_padding_not_supported);
161
throw new AuthenticationException(
SR
.net_ssl_io_no_server_cert);
System\Net\Security\SslCertificateTrust.cs (2)
29
throw new PlatformNotSupportedException(
SR
.net_ssl_trust_handshake);
53
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));
679
set => throw new NotSupportedException(
SR
.net_noseek);
684
public override long Seek(long offset, SeekOrigin origin) => throw new NotSupportedException(
SR
.net_noseek);
698
throw new InvalidOperationException(
SR
.net_ssl_certificate_exist);
748
throw new NotSupportedException(
SR
.Format(
SR
.net_io_invalidnestedcall, "read"));
955
throw new InvalidOperationException(
SR
.net_ssl_io_already_shutdown);
962
throw new InvalidOperationException(
SR
.net_auth_noauth);
System\Net\Security\SslStream.IO.cs (33)
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);
622
SendAuthResetSignal(new ReadOnlySpan<byte>(alertToken.Payload), ExceptionDispatchInfo.Capture(new AuthenticationException(
SR
.net_ssl_io_cert_custom_validation, null)));
627
SendAuthResetSignal(new ReadOnlySpan<byte>(alertToken.Payload), ExceptionDispatchInfo.Capture(new AuthenticationException(
SR
.Format(
SR
.net_ssl_io_cert_chain_validation, chainStatus), null)));
632
SendAuthResetSignal(new ReadOnlySpan<byte>(alertToken.Payload), ExceptionDispatchInfo.Capture(new AuthenticationException(
SR
.Format(
SR
.net_ssl_io_cert_validation, sslPolicyErrors), null)));
680
return ValueTask.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(new IOException(
SR
.net_io_encrypt, SslStreamPal.GetException(token.Status))));
715
throw new IOException(
SR
.net_io_encrypt, SslStreamPal.GetException(token.Status));
786
throw new IOException(
SR
.net_io_eof);
855
throw new NotSupportedException(
SR
.Format(
SR
.net_io_invalidnestedcall, "read"));
923
throw new IOException(
SR
.net_ssl_io_renego);
934
throw new IOException(
SR
.net_io_decrypt, SslStreamPal.GetException(status));
983
throw new IOException(
SR
.net_io_read, e);
1005
throw new NotSupportedException(
SR
.Format(
SR
.net_io_invalidnestedcall, "write"));
1031
throw new IOException(
SR
.net_io_write, e);
1063
throw new IOException(
SR
.net_ssl_io_frame);
1069
throw new AuthenticationException(
SR
.net_frame_read_size);
System\Net\Security\SslStream.Protocol.cs (7)
690
throw new AuthenticationException(
SR
.net_ssl_io_no_server_cert);
706
throw new NotSupportedException(
SR
.net_ssl_io_no_server_cert);
725
throw new NotSupportedException(
SR
.net_ssl_io_no_server_cert);
735
throw new NotSupportedException(
SR
.net_ssl_io_no_server_cert);
1306
NetEventSource.Log.RemoteCertificateError(this,
SR
.net_log_remote_cert_has_errors);
1309
NetEventSource.Log.RemoteCertificateError(this,
SR
.net_log_remote_cert_not_available);
1314
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 (2)
127
throw Interop.OpenSsl.CreateSslException(
SR
.net_ssl_invalid_certificate);
227
token.Status = new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, Interop.OpenSsl.CreateSslException(
SR
.net_alpn_failed));
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));