54 references to Crypto
System.Net.Security (54)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Crypto.cs (3)
143
throw Interop.
Crypto
.CreateOpenSslCryptographicException();
153
throw Interop.
Crypto
.CreateOpenSslCryptographicException();
162
throw Interop.
Crypto
.CreateOpenSslCryptographicException();
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OCSP.cs (2)
107
Interop.
Crypto
.OcspRequestDestroy(handle);
122
Interop.
Crypto
.OcspResponseDestroy(handle);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (14)
233
Crypto
.ErrClearError();
416
Crypto
.ErrClearError();
524
throw
Crypto
.CreateOpenSslCryptographicException();
546
int sendCount =
Crypto
.BioCtrlPending(context.OutputBio!);
563
Crypto
.ErrClearError();
615
int capacityNeeded =
Crypto
.BioCtrlPending(context.OutputBio!);
622
Crypto
.ErrClearError();
839
int bytes =
Crypto
.BioRead(bio, buffer);
865
Crypto
.ErrPeekError() != 0 ?
Crypto
.CreateOpenSslCryptographicException() : // crypto error queue not empty
873
innerError = Interop.
Crypto
.CreateOpenSslCryptographicException();
916
ulong errorVal =
Crypto
.ErrPeekLastError();
917
Crypto
.ErrClearError();
918
string msg = SR.Format(message, Marshal.PtrToStringUTF8(
Crypto
.ErrReasonErrorString(errorVal)));
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Ssl.cs (7)
286
SafeX509Handle dupCertHandle =
Crypto
.X509UpRef(chain[i].Handle);
287
Crypto
.CheckValidOpenSslHandle(dupCertHandle);
290
Crypto
.ErrClearError();
309
Crypto
.CheckValidOpenSslHandle(ssl);
385
SafeBioHandle readBio = Interop.
Crypto
.CreateMemoryBio();
386
SafeBioHandle writeBio = Interop.
Crypto
.CreateMemoryBio();
483
Interop.
Crypto
.ErrClearError();
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.SslCtx.cs (3)
52
SafeX509Handle dupCertHandle =
Crypto
.X509UpRef(chain[i].Handle);
53
Crypto
.CheckValidOpenSslHandle(dupCertHandle);
56
Crypto
.ErrClearError();
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Stack.cs (1)
73
Interop.
Crypto
.RecursiveFreeX509Stack(handle);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509StoreCtx.cs (1)
86
Interop.
Crypto
.X509StoreCtxDestroy(handle);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\Asn1SafeHandles.Unix.cs (2)
18
Interop.
Crypto
.Asn1ObjectFree(handle);
38
Interop.
Crypto
.Asn1OctetStringFree(handle);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBioHandle.Unix.cs (1)
34
return Interop.
Crypto
.BioDestroy(h);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeX509Handles.Unix.cs (3)
37
Interop.
Crypto
.X509Destroy(handle);
57
Interop.
Crypto
.X509CrlDestroy(handle);
77
Interop.
Crypto
.X509StoreDestroy(handle);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\X509ExtensionSafeHandles.Unix.cs (1)
19
Interop.
Crypto
.X509ExtensionDestroy(handle);
src\libraries\Common\src\System\Net\Security\CertificateValidation.Unix.cs (4)
37
using (SafeX509Handle certHandle = Interop.
Crypto
.X509UpRef(remoteCertificate.Handle))
43
hostNameMatch = Interop.
Crypto
.CheckX509IpAddress(certHandle, addressBytes, addressBytes.Length, hostName, hostName.Length);
51
hostNameMatch = Interop.
Crypto
.CheckX509Hostname(certHandle, matchName, matchName.Length);
55
throw Interop.
Crypto
.CreateOpenSslCryptographicException();
System\Net\CertificateValidationPal.Unix.cs (6)
62
int count = Interop.
Crypto
.GetX509StackFieldCount(chainStack);
66
IntPtr certPtr = Interop.
Crypto
.GetX509StackField(chainStack, i);
90
Interop.
Crypto
.X509Destroy(remoteCertificate);
148
int nameCount = Interop.
Crypto
.GetX509NameStackFieldCount(names);
159
using (SafeSharedX509NameHandle nameHandle = Interop.
Crypto
.GetX509NameStackField(names, i))
161
X500DistinguishedName dn = Interop.
Crypto
.LoadX500Name(nameHandle);
System\Net\Security\SslStreamCertificateContext.Linux.cs (5)
102
CertificateHandle = Interop.
Crypto
.X509UpRef(target.Handle);
299
using SafeOcspRequestHandle ocspRequest = Interop.
Crypto
.X509BuildOcspRequest(subject, issuer);
300
byte[] rentedBytes = ArrayPool<byte>.Shared.Rent(Interop.
Crypto
.GetOcspRequestDerSize(ocspRequest));
301
int encodingSize = Interop.
Crypto
.EncodeOcspRequest(ocspRequest, rentedBytes);
314
if (!Interop.
Crypto
.X509DecodeOcspToExpiration(ret, ocspRequest, subject, issuerHandles.AsSpan(0, _privateIntermediateCertificates.Length + 1), out DateTimeOffset expiration))
System\Net\Security\SslStreamPal.Unix.cs (1)
273
return new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, Interop.
Crypto
.CreateOpenSslCryptographicException());