C# Класс PayPal.CertificateManager

Manager class for storing X509 certificates.
Показать файл Открыть проект

Открытые методы

Метод Описание
GetCertificatesFromUrl ( string certUrl ) : X509Certificate2Collection

Gets the certificate corresponding to the specified URL from the cache of certificates. If the cache doesn't contain the certificate, it is downloaded and verified.

GetTrustedCertificateFromFile ( string>.Dictionary config ) : X509Certificate2

Gets the trusted certificate to be used in validating a certificate chain.

ValidateCertificateChain ( X509Certificate2 trustedCert, X509Certificate2Collection clientCerts ) : bool

Validates the certificate chain for the specified client certificate using a known, trusted certificate.

ValidatePayPalClientCertificate ( X509Certificate2Collection clientCerts ) : bool

Validates the leaf client cert for the owner to be PayPal

Приватные методы

Метод Описание
CertificateManager ( ) : System

Private constructor prevent direct instantiation

Описание методов

GetCertificatesFromUrl() публичный Метод

Gets the certificate corresponding to the specified URL from the cache of certificates. If the cache doesn't contain the certificate, it is downloaded and verified.
Thrown if the downloaded certificate cannot be verified.
public GetCertificatesFromUrl ( string certUrl ) : X509Certificate2Collection
certUrl string The URL pointing to the certificate.
Результат System.Security.Cryptography.X509Certificates.X509Certificate2Collection

GetTrustedCertificateFromFile() публичный Метод

Gets the trusted certificate to be used in validating a certificate chain.
public GetTrustedCertificateFromFile ( string>.Dictionary config ) : X509Certificate2
config string>.Dictionary Config containing an optional path to the trusted certificate file to use.
Результат System.Security.Cryptography.X509Certificates.X509Certificate2

ValidateCertificateChain() публичный Метод

Validates the certificate chain for the specified client certificate using a known, trusted certificate.
public ValidateCertificateChain ( X509Certificate2 trustedCert, X509Certificate2Collection clientCerts ) : bool
trustedCert System.Security.Cryptography.X509Certificates.X509Certificate2 Trusted certificate to use in validating the chain.
clientCerts System.Security.Cryptography.X509Certificates.X509Certificate2Collection Client certificates to use in validating the chain.
Результат bool

ValidatePayPalClientCertificate() публичный Метод

Validates the leaf client cert for the owner to be PayPal
public ValidatePayPalClientCertificate ( X509Certificate2Collection clientCerts ) : bool
clientCerts System.Security.Cryptography.X509Certificates.X509Certificate2Collection
Результат bool