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