C# Class PayPal.CertificateManager

Manager class for storing X509 certificates.
ファイルを表示 Open project: paypal/PayPal-NET-SDK

Public Methods

Method Description
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

Private Methods

Method Description
CertificateManager ( ) : System

Private constructor prevent direct instantiation

Method Details

GetCertificatesFromUrl() public method

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.
return System.Security.Cryptography.X509Certificates.X509Certificate2Collection

GetTrustedCertificateFromFile() public method

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.
return System.Security.Cryptography.X509Certificates.X509Certificate2

ValidateCertificateChain() public method

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.
return bool

ValidatePayPalClientCertificate() public method

Validates the leaf client cert for the owner to be PayPal
public ValidatePayPalClientCertificate ( X509Certificate2Collection clientCerts ) : bool
clientCerts System.Security.Cryptography.X509Certificates.X509Certificate2Collection
return bool