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)
162
var key = new SslContextCacheKey(protocols, sslAuthenticationOptions.
CertificateContext
?.TargetCertificate.GetCertHash(HashAlgorithmName.SHA256));
176
if (!sslAuthenticationOptions.
CertificateContext
!.SslContexts!.TryGetValue(serverCacheKey, out SafeSslContextHandle? handle))
181
SafeSslContextHandle cached = sslAuthenticationOptions.
CertificateContext
!.SslContexts!.GetOrAdd(serverCacheKey, handle);
272
if (sslAuthenticationOptions.
CertificateContext
!= null && sslAuthenticationOptions.IsServer)
274
SetSslCertificate(sslCtx, sslAuthenticationOptions.
CertificateContext
.CertificateHandle, sslAuthenticationOptions.
CertificateContext
.KeyHandle);
276
if (sslAuthenticationOptions.
CertificateContext
.IntermediateCertificates.Count > 0)
278
if (!Ssl.AddExtraChainCertificates(sslCtx, sslAuthenticationOptions.
CertificateContext
.IntermediateCertificates))
284
if (sslAuthenticationOptions.
CertificateContext
.OcspStaplingAvailable)
308
if (sslAuthenticationOptions.
CertificateContext
== null)
313
Debug.Assert(sslAuthenticationOptions.
CertificateContext
.CertificateHandle != null);
314
Debug.Assert(sslAuthenticationOptions.
CertificateContext
.KeyHandle != null);
316
int retVal = Ssl.SslUseCertificate(ssl, sslAuthenticationOptions.
CertificateContext
.CertificateHandle);
322
retVal = Ssl.SslUsePrivateKey(ssl, sslAuthenticationOptions.
CertificateContext
.KeyHandle);
328
if (sslAuthenticationOptions.
CertificateContext
.IntermediateCertificates.Count > 0)
330
if (!Ssl.AddExtraChainCertificates(ssl, sslAuthenticationOptions.
CertificateContext
.IntermediateCertificates))
354
(sslAuthenticationOptions.
CertificateContext
== null && sslAuthenticationOptions.CertSelectionDelegate != null))
362
Debug.Assert(sslAuthenticationOptions.
CertificateContext
!= null);
363
if (sslAuthenticationOptions.
CertificateContext
== null ||
364
sslAuthenticationOptions.
CertificateContext
.SslContexts == null)
436
if (sslAuthenticationOptions.
CertificateContext
!= null ||
454
if (sslAuthenticationOptions.
CertificateContext
!= null)
456
if (sslAuthenticationOptions.
CertificateContext
.Trust?._sendTrustInHandshake == true)
458
SslCertificateTrust trust = sslAuthenticationOptions.
CertificateContext
!.Trust!;
480
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)