C# Class PayPal.CertificateManager

Manager class for storing X509 certificates.
Afficher le fichier Open project: paypal/PayPal-NET-SDK

Méthodes publiques

Méthode 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

Méthode Description
CertificateManager ( ) : System

Private constructor prevent direct instantiation

Method Details

GetCertificatesFromUrl() public méthode

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.
Résultat System.Security.Cryptography.X509Certificates.X509Certificate2Collection

GetTrustedCertificateFromFile() public méthode

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.
Résultat System.Security.Cryptography.X509Certificates.X509Certificate2

ValidateCertificateChain() public méthode

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.
Résultat bool

ValidatePayPalClientCertificate() public méthode

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