217 references to SR
System.Net.Security (217)
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\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\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (34)
163SR.Format(SR.net_ssl_encryptionpolicy_notsupported, sslAuthenticationOptions.EncryptionPolicy)); 173SR.Format(SR.net_ssl_encryptionpolicy_notsupported, sslAuthenticationOptions.EncryptionPolicy)); 217throw CreateSslException(SR.net_allocate_ssl_context_failed); 227throw new SslException(SR.Format(SR.net_ssl_encryptionpolicy_notsupported, sslAuthenticationOptions.EncryptionPolicy)); 243throw new PlatformNotSupportedException(SR.Format(SR.net_ssl_encryptionpolicy_notsupported, sslAuthenticationOptions.EncryptionPolicy)); 291throw CreateSslException(SR.net_ssl_use_cert_failed); 330throw CreateSslException(SR.net_ssl_use_cert_failed); 336throw CreateSslException(SR.net_ssl_use_private_key_failed); 343throw CreateSslException(SR.net_ssl_use_cert_failed); 399throw CreateSslException(SR.net_allocate_ssl_context_failed); 439throw CreateSslException(SR.net_alpn_config_failed); 633throw CreateSslException(SR.Format(SR.net_ssl_set_sigalgs_failed, "server")); 639throw CreateSslException(SR.Format(SR.net_ssl_set_sigalgs_failed, "client")); 703handshakeException = new SslException(SR.Format(SR.net_ssl_handshake_failed_error, errorCode), innerError); 771throw new SslException(SR.Format(SR.net_ssl_encrypt_failed, errorCode), GetSslError(retVal, errorCode)); 826throw new SslException(SR.Format(SR.net_ssl_decrypt_failed, errorCode), GetSslError(retVal, errorCode)); 855throw CreateSslException(SR.net_ssl_get_channel_binding_token_failed); 1005throw CreateSslException(SR.net_ssl_read_bio_failed_error); 1015throw CreateSslException(SR.net_ssl_write_bio_failed_error); 1057throw CreateSslException(SR.net_ssl_use_cert_failed); 1064throw CreateSslException(SR.net_ssl_use_private_key_failed); 1072throw CreateSslException(SR.net_ssl_check_private_key_failed); 1081string 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)
98throw Interop.OpenSsl.CreateSslException(SR.net_ssl_get_default_sigalgs_failed); 244throw new ArgumentException(SR.net_ssl_app_protocols_invalid, nameof(applicationProtocols));
src\libraries\Common\src\Microsoft\Win32\SafeHandles\GssSafeHandles.cs (1)
101SR.net_gssapi_ntlm_missing_plugin);
src\libraries\Common\src\System\Security\Cryptography\Asn1Reader\AsnValueReader.cs (2)
233throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 247throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
System\Net\CertificateValidationPal.cs (2)
81NetEventSource.Error(null, SR.Format(SR.net_log_open_store_failed, storeLocation, exception));
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (4)
240if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(null, SR.net_ntlm_not_possible_default_cred); 766throw new InvalidOperationException(SR.net_auth_noauth); 786throw new InvalidOperationException(SR.net_auth_noauth); 815throw new InvalidOperationException(SR.net_auth_noauth);
System\Net\NegotiateAuthenticationPal.ManagedSpnego.cs (5)
408throw new InvalidOperationException(SR.net_auth_noauth); 418throw new InvalidOperationException(SR.net_auth_noauth); 428throw new InvalidOperationException(SR.net_auth_noauth); 438throw new InvalidOperationException(SR.net_auth_noauth); 448throw new InvalidOperationException(SR.net_auth_noauth);
System\Net\NegotiateAuthenticationPal.Unix.cs (5)
122throw new PlatformNotSupportedException(SR.net_nego_server_not_supported); 205if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, SR.net_ntlm_not_possible_default_cred); 206throw new Interop.NetSecurityNative.GssApiException(Interop.NetSecurityNative.Status.GSS_S_NO_CRED, 0, SR.net_ntlm_not_possible_default_cred); 210if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, SR.net_nego_not_supported_empty_target_with_defaultcreds); 211throw 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); 41throw OpenSsl.CreateSslException(SR.net_allocate_ssl_context_failed); 143throw new PlatformNotSupportedException(SR.net_ssl_ciphersuites_policy_not_supported); 164throw new PlatformNotSupportedException(SR.net_ssl_ciphersuites_policy_not_supported);
System\Net\Security\NegotiateAuthentication.cs (18)
168throw new InvalidOperationException(SR.net_auth_noauth); 212throw new InvalidOperationException(SR.net_auth_noauth); 294throw new InvalidOperationException(SR.net_auth_noauth); 321throw new InvalidOperationException(SR.net_auth_noauth); 349throw new InvalidOperationException(SR.net_auth_noauth); 373throw new InvalidOperationException(SR.net_auth_noauth); 398throw new InvalidOperationException(SR.net_auth_noauth); 410if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, SR.net_log_listener_no_spn_kerberos); 416if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, SR.net_log_listener_no_spn_disabled); 422if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, SR.net_log_listener_no_spn_cbt); 428if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, SR.net_log_listener_no_spns); 438if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, SR.net_log_listener_no_spn_whensupported); 443if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, SR.net_log_listener_spn_failed_always); 448if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, SR.net_log_listener_spn, clientSpn); 455NetEventSource.Info(this, SR.net_log_listener_spn_passed); 459NetEventSource.Info(this, SR.net_log_listener_spn_failed); 463NetEventSource.Info(this, SR.net_log_listener_spn_failed_empty); 467NetEventSource.Info(this, SR.net_log_listener_spn_failed_dump);
System\Net\Security\NegotiateStream.cs (38)
284set => throw new NotSupportedException(SR.net_noseek); 291throw new NotSupportedException(SR.net_noseek); 345throw new NotSupportedException(SR.Format(SR.net_io_invalidnestedcall, "read")); 379throw new IOException(SR.net_frame_read_size); 420throw new IOException(SR.net_io_read); 440throw new IOException(SR.net_io_read, e); 455throw new IOException(SR.net_io_eof); 511throw new NotSupportedException(SR.Format(SR.net_io_invalidnestedcall, "write")); 541throw new IOException(SR.net_io_encrypt); 554throw new IOException(SR.net_io_write, e); 608throw new ArgumentException(SR.net_auth_must_specify_extended_protection_scheme, nameof(policy)); 637throw new InvalidOperationException(SR.net_auth_reauth); 647throw new ArgumentOutOfRangeException(nameof(impersonationLevel), impersonationLevel.ToString(), SR.net_auth_supported_impl_levels); 652throw new InvalidOperationException(SR.net_auth_client_server); 717throw new InvalidOperationException(SR.net_auth_noauth); 729throw new InvalidOperationException(SR.Format(SR.net_io_invalidnestedcall, "authenticate")); 769new AuthenticationException(SR.net_auth_bad_client_creds_or_target_mismatch), 771new AuthenticationException(SR.net_auth_bad_client_creds_or_target_mismatch), 773new AuthenticationException(SR.Format(SR.net_auth_context_expectation, _expectedImpersonationLevel.ToString(), PrivateImpersonationLevel.ToString())), 775new AuthenticationException(SR.Format(SR.net_auth_context_expectation, _context.ProtectionLevel.ToString(), _expectedProtectionLevel.ToString())), 834new 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) 868throw new AuthenticationException(SR.net_auth_eof); 881throw new AuthenticationException(SR.net_auth_alert); 899throw new AuthenticationException(SR.Format(SR.net_io_header_id, nameof(FrameHeader.MessageId), _framer.ReadHeader.MessageId, FrameHeader.HandshakeId)); 907throw 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), 938ERROR_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)
34throw new ArgumentException(SR.net_ssl_app_protocol_invalid, nameof(protocol));
System\Net\Security\SslAuthenticationOptions.cs (12)
33throw new InvalidOperationException(SR.Format(SR.net_conflicting_options, nameof(RemoteCertificateValidationCallback))); 43throw new InvalidOperationException(SR.Format(SR.net_conflicting_options, nameof(LocalCertificateSelectionCallback))); 65throw new PlatformNotSupportedException(SR.net_ssl_allow_rsa_padding_not_supported); 96throw new NotSupportedException(SR.net_ssl_io_no_server_cert); 104throw new InvalidOperationException(SR.Format(SR.net_conflicting_options, nameof(ServerCertificateSelectionCallback))); 115throw new InvalidOperationException(SR.Format(SR.net_conflicting_options, nameof(RemoteCertificateValidationCallback))); 135throw new PlatformNotSupportedException(SR.net_ssl_allow_rsa_padding_not_supported); 161throw new AuthenticationException(SR.net_ssl_io_no_server_cert);
System\Net\Security\SslCertificateTrust.cs (2)
29throw new PlatformNotSupportedException(SR.net_ssl_trust_handshake); 53throw 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)); 679set => throw new NotSupportedException(SR.net_noseek); 684public override long Seek(long offset, SeekOrigin origin) => throw new NotSupportedException(SR.net_noseek); 698throw new InvalidOperationException(SR.net_ssl_certificate_exist); 748throw new NotSupportedException(SR.Format(SR.net_io_invalidnestedcall, "read")); 955throw new InvalidOperationException(SR.net_ssl_io_already_shutdown); 962throw new InvalidOperationException(SR.net_auth_noauth);
System\Net\Security\SslStream.IO.cs (33)
198throw new InvalidOperationException(SR.Format(SR.net_io_invalidnestedcall, "authenticate")); 204throw new NotSupportedException(SR.Format(SR.net_io_invalidnestedcall, "read")); 211throw new NotSupportedException(SR.Format(SR.net_io_invalidnestedcall, "write")); 220throw new InvalidOperationException(SR.net_ssl_renegotiate_buffer); 294throw new InvalidOperationException(SR.Format(SR.net_io_invalidnestedcall, "authenticate")); 342throw new AuthenticationException(SR.net_auth_SSPI, token.GetException()); 392throw new AuthenticationException(SR.Format(SR.net_auth_tls_alert, _lastFrame.AlertDescription.ToString()), token.GetException()); 395throw new AuthenticationException(SR.net_auth_SSPI, token.GetException()); 442throw new IOException(SR.net_io_eof); 503throw new InvalidOperationException(SR.net_ssl_renegotiate_data); 622SendAuthResetSignal(new ReadOnlySpan<byte>(alertToken.Payload), ExceptionDispatchInfo.Capture(new AuthenticationException(SR.net_ssl_io_cert_custom_validation, null))); 627SendAuthResetSignal(new ReadOnlySpan<byte>(alertToken.Payload), ExceptionDispatchInfo.Capture(new AuthenticationException(SR.Format(SR.net_ssl_io_cert_chain_validation, chainStatus), null))); 632SendAuthResetSignal(new ReadOnlySpan<byte>(alertToken.Payload), ExceptionDispatchInfo.Capture(new AuthenticationException(SR.Format(SR.net_ssl_io_cert_validation, sslPolicyErrors), null))); 680return ValueTask.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(new IOException(SR.net_io_encrypt, SslStreamPal.GetException(token.Status)))); 715throw new IOException(SR.net_io_encrypt, SslStreamPal.GetException(token.Status)); 786throw new IOException(SR.net_io_eof); 855throw new NotSupportedException(SR.Format(SR.net_io_invalidnestedcall, "read")); 923throw new IOException(SR.net_ssl_io_renego); 934throw new IOException(SR.net_io_decrypt, SslStreamPal.GetException(status)); 983throw new IOException(SR.net_io_read, e); 1005throw new NotSupportedException(SR.Format(SR.net_io_invalidnestedcall, "write")); 1031throw new IOException(SR.net_io_write, e); 1063throw new IOException(SR.net_ssl_io_frame); 1069throw new AuthenticationException(SR.net_frame_read_size);
System\Net\Security\SslStream.Protocol.cs (7)
690throw new AuthenticationException(SR.net_ssl_io_no_server_cert); 706throw new NotSupportedException(SR.net_ssl_io_no_server_cert); 725throw new NotSupportedException(SR.net_ssl_io_no_server_cert); 735throw new NotSupportedException(SR.net_ssl_io_no_server_cert); 1306NetEventSource.Log.RemoteCertificateError(this, SR.net_log_remote_cert_has_errors); 1309NetEventSource.Log.RemoteCertificateError(this, SR.net_log_remote_cert_not_available); 1314NetEventSource.Log.RemoteCertificateError(this, 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 (2)
127throw Interop.OpenSsl.CreateSslException(SR.net_ssl_invalid_certificate); 227token.Status = new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, Interop.OpenSsl.CreateSslException(SR.net_alpn_failed));
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));