예제 #1
0
        internal static string GetX509VerifyCertErrorString(X509VerifyStatusCode n)
        {
            IntPtr ptr = X509VerifyCertErrorString(n);

            return(ptr != null?
                   Marshal.PtrToStringAnsi(ptr) :
                       null);
        }
예제 #2
0
        internal static string X509_verify_cert_error_string(X509VerifyStatusCode n)
        {
            IntPtr ptr = X509_verify_cert_error_string_private(n);

            return(ptr != null?
                   Marshal.PtrToStringAnsi(ptr) :
                       null);
        }
예제 #3
0
        internal static X509VerifyStatusCode X509ChainGetCachedOcspStatus(SafeX509StoreCtxHandle ctx, string cachePath, int chainDepth)
        {
            X509VerifyStatusCode response = (X509VerifyStatusCode)CryptoNative_X509ChainGetCachedOcspStatus(ctx, cachePath, chainDepth);

            if (response.Code < 0)
            {
                Debug.Fail($"Unexpected response from X509ChainGetCachedOcspSuccess: {response}");
                throw new CryptographicException();
            }

            return(response);
        }
예제 #4
0
        internal static X509VerifyStatusCode X509ChainVerifyOcsp(
            SafeX509StoreCtxHandle ctx,
            SafeOcspRequestHandle req,
            SafeOcspResponseHandle resp,
            string cachePath)
        {
            X509VerifyStatusCode response = CryptoNative_X509ChainVerifyOcsp(ctx, req, resp, cachePath);

            if (response < 0)
            {
                Debug.Fail($"Unexpected response from X509ChainGetCachedOcspSuccess: {response}");
                throw new CryptographicException();
            }

            return(response);
        }
예제 #5
0
 internal static extern string X509_verify_cert_error_string(X509VerifyStatusCode n);
예제 #6
0
 private static extern IntPtr X509VerifyCertErrorString(X509VerifyStatusCode n);
예제 #7
0
 internal static string GetX509VerifyCertErrorString(X509VerifyStatusCode n)
 {
     return(Marshal.PtrToStringAnsi(X509VerifyCertErrorString(n)));
 }
예제 #8
0
 private static extern IntPtr X509_verify_cert_error_string_private(X509VerifyStatusCode n);
예제 #9
0
 private static extern IntPtr X509VerifyCertErrorString(X509VerifyStatusCode n);
예제 #10
0
 internal static string GetX509VerifyCertErrorString(X509VerifyStatusCode n)
 {
     return Marshal.PtrToStringAnsi(X509VerifyCertErrorString(n));
 }
예제 #11
0
 internal static extern string X509_verify_cert_error_string(X509VerifyStatusCode n);
예제 #12
0
 private static extern IntPtr X509_verify_cert_error_string_private(X509VerifyStatusCode n);
예제 #13
0
 internal static string X509_verify_cert_error_string(X509VerifyStatusCode n)
 {
     IntPtr ptr = X509_verify_cert_error_string_private(n);
     return ptr != null ?
         Marshal.PtrToStringAnsi(ptr) :
         null;
 }
예제 #14
0
 internal static string GetX509VerifyCertErrorString(X509VerifyStatusCode n)
 {
     IntPtr ptr = X509VerifyCertErrorString(n);
     return ptr != null ?
         Marshal.PtrToStringAnsi(ptr) :
         null;
 }