9 writes to CertificateContext
System.Net.Security (9)
System\Net\Security\SslAuthenticationOptions.cs (4)
52
CertificateContext
= sslClientAuthenticationOptions.ClientCertificateContext;
115
CertificateContext
= sslServerAuthenticationOptions.ServerCertificateContext;
126
CertificateContext
= SslStreamCertificateContext.Create(certificateWithKey, additionalCertificates: null, offline: false, trust: null, noOcspFetch: !ocspFetch);
138
CertificateContext
= SslStreamCertificateContext.Create(certificateWithKey);
System\Net\Security\SslStream.Protocol.cs (5)
584
_sslAuthenticationOptions.
CertificateContext
??= SslStreamCertificateContext.Create(selectedCert);
643
_sslAuthenticationOptions.
CertificateContext
??= SslStreamCertificateContext.Create(selectedCert!);
650
_sslAuthenticationOptions.
CertificateContext
??= SslStreamCertificateContext.Create(selectedCert!);
661
_sslAuthenticationOptions.
CertificateContext
??= SslStreamCertificateContext.Create(selectedCert);
739
_sslAuthenticationOptions.
CertificateContext
= SslStreamCertificateContext.Create(selectedCert);
39 references to CertificateContext
System.Net.Security (39)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (25)
166
var key = new SslContextCacheKey(protocols, sslAuthenticationOptions.
CertificateContext
?.TargetCertificate.GetCertHash(HashAlgorithmName.SHA256));
180
if (!sslAuthenticationOptions.
CertificateContext
!.SslContexts!.TryGetValue(serverCacheKey, out SafeSslContextHandle? handle))
185
SafeSslContextHandle cached = sslAuthenticationOptions.
CertificateContext
!.SslContexts!.GetOrAdd(serverCacheKey, handle);
278
if (sslAuthenticationOptions.
CertificateContext
!= null && sslAuthenticationOptions.IsServer)
280
SetSslCertificate(sslCtx, sslAuthenticationOptions.
CertificateContext
.CertificateHandle, sslAuthenticationOptions.
CertificateContext
.KeyHandle);
282
if (sslAuthenticationOptions.
CertificateContext
.IntermediateCertificates.Count > 0)
284
if (!Ssl.AddExtraChainCertificates(sslCtx, sslAuthenticationOptions.
CertificateContext
.IntermediateCertificates))
290
if (sslAuthenticationOptions.
CertificateContext
.OcspStaplingAvailable)
314
if (sslAuthenticationOptions.
CertificateContext
== null)
319
Debug.Assert(sslAuthenticationOptions.
CertificateContext
.CertificateHandle != null);
320
Debug.Assert(sslAuthenticationOptions.
CertificateContext
.KeyHandle != null);
322
int retVal = Ssl.SslUseCertificate(ssl, sslAuthenticationOptions.
CertificateContext
.CertificateHandle);
328
retVal = Ssl.SslUsePrivateKey(ssl, sslAuthenticationOptions.
CertificateContext
.KeyHandle);
334
if (sslAuthenticationOptions.
CertificateContext
.IntermediateCertificates.Count > 0)
336
if (!Ssl.AddExtraChainCertificates(ssl, sslAuthenticationOptions.
CertificateContext
.IntermediateCertificates))
361
(sslAuthenticationOptions.
CertificateContext
== null && sslAuthenticationOptions.CertSelectionDelegate != null))
369
Debug.Assert(sslAuthenticationOptions.
CertificateContext
!= null);
370
if (sslAuthenticationOptions.
CertificateContext
== null ||
371
sslAuthenticationOptions.
CertificateContext
.SslContexts == null)
443
if (sslAuthenticationOptions.
CertificateContext
!= null ||
461
if (sslAuthenticationOptions.
CertificateContext
!= null)
463
if (sslAuthenticationOptions.
CertificateContext
.Trust?._sendTrustInHandshake == true)
465
SslCertificateTrust trust = sslAuthenticationOptions.
CertificateContext
!.Trust!;
487
byte[]? ocspResponse = sslAuthenticationOptions.
CertificateContext
.GetOcspResponseNoWaiting();
System\Net\Security\SslStream.IO.cs (1)
579
if (!VerifyRemoteCertificate(_sslAuthenticationOptions.CertValidationDelegate, _sslAuthenticationOptions.
CertificateContext
?.Trust, ref alertToken, out sslPolicyErrors, out chainStatus))
System\Net\Security\SslStream.Protocol.cs (12)
84
return _sslAuthenticationOptions.
CertificateContext
?.TargetCertificate;
323
if (_sslAuthenticationOptions.
CertificateContext
!= null)
333
_selectedClientCertificate = _sslAuthenticationOptions.
CertificateContext
.TargetCertificate;
335
return _sslAuthenticationOptions.
CertificateContext
.TargetCertificate;
699
tempCollection.Add(_sslAuthenticationOptions.
CertificateContext
!.TargetCertificate!);
712
else if (_sslAuthenticationOptions.
CertificateContext
!= null)
714
selectedCert = _sslAuthenticationOptions.
CertificateContext
.TargetCertificate;
742
Debug.Assert(_sslAuthenticationOptions.
CertificateContext
!= null);
747
bool sendTrustedList = _sslAuthenticationOptions.
CertificateContext
!.Trust?._sendTrustInHandshake ?? false;
773
if (sslAuthenticationOptions.
CertificateContext
!= null && cred != null)
782
SslStreamCertificateContext certificateContext = sslAuthenticationOptions.
CertificateContext
;
875
sendTrustList = _sslAuthenticationOptions.
CertificateContext
?.Trust?._sendTrustInHandshake ?? false;
System\Net\Security\SslStreamPal.Unix.cs (1)
199
if (sslAuthenticationOptions.
CertificateContext
== null)