261 references to SR
System.Net.Security (261)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Net.Security.Native\Interop.GssApiException.cs (8)
55SR.Format(SR.net_gssapi_operation_failed_detailed, majorError, minorError) : 56SR.Format(SR.net_gssapi_operation_failed, majorStatus.ToString("x"), minorStatus.ToString("x")); 61SR.Format(SR.net_gssapi_operation_failed_detailed_majoronly, majorError) : 62SR.Format(SR.net_gssapi_operation_failed_majoronly, majorStatus.ToString("x"));
src\runtime\src\libraries\Common\src\Interop\Unix\System.Net.Security.Native\Interop.GssBuffer.cs (2)
34throw new NetSecurityNative.GssApiException(SR.Format(SR.net_context_buffer_too_small, sourceLength, destinationAvailable));
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (34)
173SR.Format(SR.net_ssl_encryptionpolicy_notsupported, sslAuthenticationOptions.EncryptionPolicy)); 183SR.Format(SR.net_ssl_encryptionpolicy_notsupported, sslAuthenticationOptions.EncryptionPolicy)); 227throw CreateSslException(SR.net_allocate_ssl_context_failed); 239throw new SslException(SR.Format(SR.net_ssl_encryptionpolicy_notsupported, sslAuthenticationOptions.EncryptionPolicy)); 255throw new PlatformNotSupportedException(SR.Format(SR.net_ssl_encryptionpolicy_notsupported, sslAuthenticationOptions.EncryptionPolicy)); 303throw CreateSslException(SR.net_ssl_use_cert_failed); 342throw CreateSslException(SR.net_ssl_use_cert_failed); 348throw CreateSslException(SR.net_ssl_use_private_key_failed); 355throw CreateSslException(SR.net_ssl_use_cert_failed); 421throw CreateSslException(SR.net_allocate_ssl_context_failed); 454throw CreateSslException(SR.net_alpn_config_failed); 657throw CreateSslException(SR.Format(SR.net_ssl_set_sigalgs_failed, "server")); 663throw CreateSslException(SR.Format(SR.net_ssl_set_sigalgs_failed, "client")); 782handshakeException = new SslException(SR.Format(SR.net_ssl_handshake_failed_error, errorCode), innerError); 874throw new SslException(SR.Format(SR.net_ssl_encrypt_failed, errorCode), GetSslError(retVal, errorCode)); 991throw new SslException(SR.Format(SR.net_ssl_decrypt_failed, errorCode), GetSslError(retVal, errorCode)); 1020throw CreateSslException(SR.net_ssl_get_channel_binding_token_failed); 1353throw CreateSslException(SR.net_ssl_read_bio_failed_error); 1363throw CreateSslException(SR.net_ssl_write_bio_failed_error); 1405throw CreateSslException(SR.net_ssl_use_cert_failed); 1412throw CreateSslException(SR.net_ssl_use_private_key_failed); 1420throw CreateSslException(SR.net_ssl_check_private_key_failed); 1429string msg = SR.Format(message, Utf8StringMarshaller.ConvertToManaged(Crypto.ErrReasonErrorString(errorVal))); 1456: this(SR.Format(SR.net_generic_operation_failed, error))
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Ssl.cs (4)
96throw Interop.OpenSsl.CreateSslException(SR.net_ssl_get_default_sigalgs_failed); 332throw new ArgumentException(SR.net_ssl_app_protocols_invalid, nameof(applicationProtocols)); 339throw new ArgumentException(SR.net_ssl_app_protocols_invalid, nameof(applicationProtocols)); 589throw Interop.OpenSsl.CreateSslException(SR.net_allocate_ssl_context_failed);
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\GssSafeHandles.cs (1)
101SR.net_gssapi_ntlm_missing_plugin);
System\Net\CertificateValidationPal.cs (2)
81NetEventSource.Error(null, SR.Format(SR.net_log_open_store_failed, storeLocation, exception));
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (4)
307if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(null, SR.net_ntlm_not_possible_default_cred); 842throw new InvalidOperationException(SR.net_auth_noauth); 862throw new InvalidOperationException(SR.net_auth_noauth); 891throw new InvalidOperationException(SR.net_auth_noauth);
System\Net\NegotiateAuthenticationPal.ManagedSpnego.cs (5)
420throw new InvalidOperationException(SR.net_auth_noauth); 430throw new InvalidOperationException(SR.net_auth_noauth); 440throw new InvalidOperationException(SR.net_auth_noauth); 450throw new InvalidOperationException(SR.net_auth_noauth); 460throw new InvalidOperationException(SR.net_auth_noauth);
System\Net\NegotiateAuthenticationPal.Unix.cs (5)
117throw new PlatformNotSupportedException(SR.net_nego_server_not_supported); 200if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, SR.net_ntlm_not_possible_default_cred); 201throw new Interop.NetSecurityNative.GssApiException(Interop.NetSecurityNative.Status.GSS_S_NO_CRED, 0, SR.net_ntlm_not_possible_default_cred); 205if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, SR.net_nego_not_supported_empty_target_with_defaultcreds); 206throw 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)
24throw new ArgumentException(SR.net_io_must_be_rw_stream, nameof(innerStream));
System\Net\Security\CipherSuitesPolicyPal.Linux.cs (5)
27throw new PlatformNotSupportedException(SR.net_ssl_ciphersuites_policy_not_supported); 34throw OpenSsl.CreateSslException(SR.net_allocate_ssl_context_failed); 43throw OpenSsl.CreateSslException(SR.net_allocate_ssl_context_failed); 145throw new PlatformNotSupportedException(SR.net_ssl_ciphersuites_policy_not_supported); 166throw new PlatformNotSupportedException(SR.net_ssl_ciphersuites_policy_not_supported);
System\Net\Security\NegotiateAuthentication.cs (19)
64throw new PlatformNotSupportedException(SR.net_extprotection_not_supported); 184throw new InvalidOperationException(SR.net_auth_noauth); 228throw new InvalidOperationException(SR.net_auth_noauth); 333throw new InvalidOperationException(SR.net_auth_noauth); 360throw new InvalidOperationException(SR.net_auth_noauth); 388throw new InvalidOperationException(SR.net_auth_noauth); 412throw new InvalidOperationException(SR.net_auth_noauth); 437throw new InvalidOperationException(SR.net_auth_noauth); 449if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, SR.net_log_listener_no_spn_kerberos); 455if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, SR.net_log_listener_no_spn_disabled); 461if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, SR.net_log_listener_no_spn_cbt); 467if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, SR.net_log_listener_no_spns); 477if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, SR.net_log_listener_no_spn_whensupported); 482if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, SR.net_log_listener_spn_failed_always); 487if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, SR.net_log_listener_spn, clientSpn); 494NetEventSource.Info(this, SR.net_log_listener_spn_passed); 498NetEventSource.Info(this, SR.net_log_listener_spn_failed); 502NetEventSource.Info(this, SR.net_log_listener_spn_failed_empty); 506NetEventSource.Info(this, SR.net_log_listener_spn_failed_dump);
System\Net\Security\NegotiateStream.cs (38)
281set => throw new NotSupportedException(SR.net_noseek); 288throw new NotSupportedException(SR.net_noseek); 342throw new NotSupportedException(SR.Format(SR.net_io_invalidnestedcall, "read")); 376throw new IOException(SR.net_frame_read_size); 422throw new IOException(SR.net_io_read); 445throw new IOException(SR.net_io_read, e); 460throw new IOException(SR.net_io_eof); 516throw new NotSupportedException(SR.Format(SR.net_io_invalidnestedcall, "write")); 546throw new IOException(SR.net_io_encrypt); 559throw new IOException(SR.net_io_write, e); 613throw new ArgumentException(SR.net_auth_must_specify_extended_protection_scheme, nameof(policy)); 642throw new InvalidOperationException(SR.net_auth_reauth); 652throw new ArgumentOutOfRangeException(nameof(impersonationLevel), impersonationLevel.ToString(), SR.net_auth_supported_impl_levels); 657throw new InvalidOperationException(SR.net_auth_client_server); 723throw new InvalidOperationException(SR.net_auth_noauth); 735throw new InvalidOperationException(SR.Format(SR.net_io_invalidnestedcall, "authenticate")); 775new AuthenticationException(SR.net_auth_bad_client_creds_or_target_mismatch), 777new AuthenticationException(SR.net_auth_bad_client_creds_or_target_mismatch), 779new AuthenticationException(SR.Format(SR.net_auth_context_expectation, _expectedImpersonationLevel.ToString(), PrivateImpersonationLevel.ToString())), 781new AuthenticationException(SR.Format(SR.net_auth_context_expectation, _context.ProtectionLevel.ToString(), _expectedProtectionLevel.ToString())), 840new InvalidCredentialException(IsServer ? SR.net_auth_bad_client_creds : SR.net_auth_bad_client_creds_or_target_mismatch, win32Exception), 841_ => new AuthenticationException(SR.net_auth_SSPI, win32Exception) 874throw new AuthenticationException(SR.net_auth_eof); 887throw new AuthenticationException(SR.net_auth_alert); 905throw new AuthenticationException(SR.Format(SR.net_io_header_id, nameof(FrameHeader.MessageId), _framer.ReadHeader.MessageId, FrameHeader.HandshakeId)); 913throw new AuthenticationException(SR.Format(SR.net_io_header_id, nameof(FrameHeader.MessageId), _framer.ReadHeader.MessageId, FrameHeader.HandshakeDoneId)); 942(int)SecurityStatusPalErrorCode.LogonDenied => new InvalidCredentialException(SR.net_auth_bad_client_creds, e), 943(int)Interop.SECURITY_STATUS.LogonDenied => new InvalidCredentialException(SR.net_auth_bad_client_creds, e), 944ERROR_TRUST_FAILURE => new AuthenticationException(SR.net_auth_context_expectation_remote, e), 945_ => new AuthenticationException(SR.net_auth_alert, e)
System\Net\Security\SslApplicationProtocol.cs (1)
34throw new ArgumentException(SR.net_ssl_app_protocol_invalid, nameof(protocol));
System\Net\Security\SslAuthenticationOptions.cs (12)
47throw new InvalidOperationException(SR.Format(SR.net_conflicting_options, nameof(RemoteCertificateValidationCallback))); 57throw new InvalidOperationException(SR.Format(SR.net_conflicting_options, nameof(LocalCertificateSelectionCallback))); 79throw new PlatformNotSupportedException(SR.net_ssl_allow_rsa_padding_not_supported); 110throw new NotSupportedException(SR.net_ssl_io_no_server_cert); 118throw new InvalidOperationException(SR.Format(SR.net_conflicting_options, nameof(ServerCertificateSelectionCallback))); 129throw new InvalidOperationException(SR.Format(SR.net_conflicting_options, nameof(RemoteCertificateValidationCallback))); 149throw new PlatformNotSupportedException(SR.net_ssl_allow_rsa_padding_not_supported); 181throw new AuthenticationException(SR.net_ssl_io_no_server_cert);
System\Net\Security\SslCertificateTrust.cs (2)
26throw new PlatformNotSupportedException(SR.net_ssl_trust_handshake); 50throw new PlatformNotSupportedException(SR.net_ssl_trust_handshake);
System\Net\Security\SslClientAuthenticationOptions.cs (4)
57throw new ArgumentException(SR.Format(SR.net_invalid_enum, nameof(X509RevocationMode)), nameof(value)); 72throw new ArgumentException(SR.Format(SR.net_invalid_enum, nameof(EncryptionPolicy)), nameof(value));
System\Net\Security\SslConnectionInfo.Linux.cs (1)
42throw Interop.OpenSsl.CreateSslException(SR.net_ssl_get_connection_info_failed);
System\Net\Security\SslServerAuthenticationOptions.cs (4)
59throw new ArgumentException(SR.Format(SR.net_invalid_enum, nameof(X509RevocationMode)), nameof(value)); 74throw new ArgumentException(SR.Format(SR.net_invalid_enum, nameof(EncryptionPolicy)), nameof(value));
System\Net\Security\SslStream.cs (9)
211throw new ArgumentException(SR.Format(SR.net_invalid_enum, "EncryptionPolicy"), nameof(encryptionPolicy)); 684set => throw new NotSupportedException(SR.net_noseek); 689public override long Seek(long offset, SeekOrigin origin) => throw new NotSupportedException(SR.net_noseek); 703throw new InvalidOperationException(SR.net_ssl_certificate_exist); 753throw new NotSupportedException(SR.Format(SR.net_io_invalidnestedcall, "read")); 965throw new InvalidOperationException(SR.net_ssl_io_already_shutdown); 972throw new InvalidOperationException(SR.net_auth_noauth);
System\Net\Security\SslStream.IO.cs (34)
180throw new InvalidOperationException(SR.Format(SR.net_io_invalidnestedcall, "authenticate")); 186throw new NotSupportedException(SR.Format(SR.net_io_invalidnestedcall, "read")); 193throw new NotSupportedException(SR.Format(SR.net_io_invalidnestedcall, "write")); 202throw new InvalidOperationException(SR.net_ssl_renegotiate_buffer); 276throw new InvalidOperationException(SR.Format(SR.net_io_invalidnestedcall, "authenticate")); 347throw new AuthenticationException(SR.net_auth_SSPI, token.GetException()); 397throw new AuthenticationException(SR.Format(SR.net_auth_tls_alert, _lastFrame.AlertDescription.ToString()), token.GetException()); 408throw new AuthenticationException(SR.net_auth_SSPI, token.GetException()); 455throw new IOException(SR.net_io_eof); 527throw new InvalidOperationException(SR.net_ssl_renegotiate_data); 544throw new AuthenticationException(SR.net_ssl_io_frame); 570throw new AuthenticationException(SR.net_frame_read_size); 697return ExceptionDispatchInfo.SetCurrentStackTrace(new AuthenticationException(SR.net_ssl_io_cert_custom_validation, null)); 702return ExceptionDispatchInfo.SetCurrentStackTrace(new AuthenticationException(SR.Format(SR.net_ssl_io_cert_chain_validation, chainStatus), null)); 707return ExceptionDispatchInfo.SetCurrentStackTrace(new AuthenticationException(SR.Format(SR.net_ssl_io_cert_validation, sslPolicyErrors), null)); 754return ValueTask.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(new IOException(SR.net_io_encrypt, SslStreamPal.GetException(token.Status)))); 789throw new IOException(SR.net_io_encrypt, SslStreamPal.GetException(token.Status)); 861throw new IOException(SR.net_io_eof); 891throw new NotSupportedException(SR.Format(SR.net_io_invalidnestedcall, "read")); 965throw new IOException(SR.net_ssl_io_renego); 976throw new IOException(SR.net_io_decrypt, SslStreamPal.GetException(status)); 1034throw new IOException(SR.net_io_read, e); 1056throw new NotSupportedException(SR.Format(SR.net_io_invalidnestedcall, "write")); 1082throw new IOException(SR.net_io_write, e); 1115throw new AuthenticationException(SR.net_frame_read_size);
System\Net\Security\SslStream.Protocol.cs (7)
668throw new AuthenticationException(SR.net_ssl_io_no_server_cert); 684throw new NotSupportedException(SR.net_ssl_io_no_server_cert); 703throw new NotSupportedException(SR.net_ssl_io_no_server_cert); 713throw new NotSupportedException(SR.net_ssl_io_no_server_cert); 1477NetEventSource.Log.RemoteCertificateError(sender, SR.net_log_remote_cert_has_errors); 1480NetEventSource.Log.RemoteCertificateError(sender, SR.net_log_remote_cert_not_available); 1485NetEventSource.Log.RemoteCertificateError(sender, SR.net_log_remote_cert_name_mismatch);
System\Net\Security\SslStreamCertificateContext.cs (1)
44throw new NotSupportedException(SR.net_ssl_io_no_server_cert);
System\Net\Security\SslStreamCertificateContext.Linux.cs (1)
109throw new NotSupportedException(SR.net_ssl_io_no_server_cert);
System\Net\Security\SslStreamPal.Unix.cs (1)
140throw Interop.OpenSsl.CreateSslException(SR.net_ssl_invalid_certificate);
System\Net\Security\TlsSession.cs (35)
339SR.Format(SR.net_tlssession_validation_not_pending, nameof(AcceptWithDefaultValidation))); 416SR.Format(SR.net_tlssession_validation_not_pending, nameof(SetRemoteCertificateValidationResult))); 466_externalValidationFault = new AuthenticationException(SR.net_ssl_io_cert_validation); 480_externalValidationFault = new AuthenticationException(SR.net_ssl_io_cert_validation); 632throw new InvalidOperationException(SR.net_tlssession_setcontext_server_only); 636throw new ArgumentException(SR.net_tlssession_context_must_be_server, nameof(context)); 640throw new InvalidOperationException(SR.net_tlssession_server_options_already_supplied); 644throw new InvalidOperationException(SR.net_tlssession_setcontext_needs_context_first); 705throw new InvalidOperationException(SR.net_tlssession_setclientcert_client_only); 752SR.net_tlssession_validation_result_not_recorded); 867throw new InvalidOperationException(SR.net_tlssession_handshake_already_complete); 902throw new IOException(SR.net_io_decrypt); 1027throw new AuthenticationException(SR.net_auth_SSPI, selStatus.Exception); 1064Exception authExc = new AuthenticationException(SR.net_auth_SSPI, token.GetException()); 1160throw new InvalidOperationException(SR.net_tlssession_handshake_not_complete); 1190throw new IOException(SR.net_io_encrypt, SslStreamPal.GetException(token.Status)); 1230throw new InvalidOperationException(SR.net_tlssession_handshake_not_complete); 1254throw new IOException(SR.net_io_decrypt); 1289SR.Format(SR.net_tlssession_plaintext_buffer_too_small, needed, plaintext.Length)); 1325throw new IOException(SR.net_io_decrypt, SslStreamPal.GetException(status)); 1371SR.Format(SR.net_tlssession_plaintext_buffer_too_small, produced, plaintext.Length)); 1418throw new InvalidOperationException(SR.net_tlssession_request_client_cert_server_only); 1423throw new InvalidOperationException(SR.net_tlssession_handshake_not_complete); 1436throw new AuthenticationException(SR.net_auth_SSPI, token.GetException()); 1488throw new IOException(SR.net_io_encrypt, SslStreamPal.GetException(status)); 1589throw new InvalidOperationException(SR.net_ssl_tlssession_context_not_set); 1648throw new AuthenticationException(SR.net_ssl_io_no_server_cert); 1654throw new AuthenticationException(SR.net_ssl_io_no_server_cert); 1905throw new InvalidOperationException(SR.net_tlssession_not_socket_bound); 2063throw new InvalidOperationException(SR.net_tlssession_handshake_not_complete); 2142throw new InvalidOperationException(SR.net_tlssession_handshake_not_complete);
System\Net\Security\TlsSession.OpenSsl.cs (8)
135throw Interop.OpenSsl.CreateSslException(SR.net_ssl_read_bio_failed_error); 150throw new IOException(SR.net_ssl_read_bio_failed_error); 158throw new IOException(SR.net_io_decrypt); 232result = MapSslError(err, ret, SR.net_ssl_handshake_failed_error); 256result = MapSslError(err, ret, SR.net_ssl_decrypt_failed); 280result = MapSslError(err, ret, SR.net_ssl_encrypt_failed); 310_ => throw new AuthenticationException(SR.net_auth_SSPI, CreateDiagnosticSslException(error, result, sslErrorTemplate)), 318return new Interop.OpenSsl.SslException(SR.Format(sslErrorTemplate, error), detail);
System\Net\StreamFramer.cs (10)
44throw new IOException(SR.Format(SR.net_io_readfailure, SR.net_io_connectionclosed)); 50throw new InvalidOperationException(SR.Format(SR.net_frame_size, 63throw new IOException(SR.Format(SR.net_io_readfailure, SR.net_io_connectionclosed)); 108throw new ArgumentException(SR.Format(SR.net_frame_max_size, MaxMessageSize, value), nameof(PayloadSize));
System\Security\Authentication\ExtendedProtection\ExtendedProtectionPolicy.cs (3)
29throw new ArgumentException(SR.security_ExtendedProtectionPolicy_UseDifferentConstructorForNever, nameof(policyEnforcement)); 34throw new ArgumentException(SR.security_ExtendedProtectionPolicy_NoEmptyServiceNameCollection, nameof(customServiceNames)); 55throw new ArgumentException(SR.security_ExtendedProtectionPolicy_UseDifferentConstructorForNever, nameof(policyEnforcement));