The Certificate type exposes the following members.

Constructors

  NameDescription
Public methodCertificate(IntPtr)
Initializes a new Certificate instance from a handle.
Public methodCertificate(Certificate)
Duplicates a given certificate.
Public methodCertificate(IntPtr, Boolean)
Initializes a new Certificate instance from a handle.

Methods

  NameDescription
Public methodAssociateWithPrivateKey(String, String)
Associates the certificate with a private key from a PVK file.
Public methodAssociateWithPrivateKey(String, String, Boolean)
Associates the certificate with a private key from a PVK file.
Public methodClone
Creates a copy of this Certificate.
Public methodStatic memberCreateFromBase64String
Creates a new Certificate from a string representation.
Public methodStatic memberCreateFromCerFile(array<Byte>[]()[][])
Creates a new instance of the Certificate class by reading a certificate from a certificate blob.
Public methodStatic memberCreateFromCerFile(String)
Creates a new instance of the Certificate class by opening a certificate file and retrieving the first certificate from it.
Public methodStatic memberCreateFromCerFile(array<Byte>[]()[][], Int32, Int32)
Creates a new instance of the Certificate class by reading a certificate from a certificate blob.
Public methodStatic memberCreateFromPemFile(array<Byte>[]()[][])
Creates a new instance of the Certificate class by reading a certificate from a PEM encoded file.
Public methodStatic memberCreateFromPemFile(String)
Creates a new instance of the Certificate class by reading a certificate from a PEM encoded file.
Public methodStatic memberCreateFromPfxFile(array<Byte>[]()[][], String)
Creates a new instance of the Certificate class by opening a PFX file and retrieving the first certificate from it.
Public methodStatic memberCreateFromPfxFile(String, String)
Creates a new instance of the Certificate class by opening a PFX file and retrieving the first certificate from it.
Public methodStatic memberCreateFromPfxFile(array<Byte>[]()[][], String, Boolean)
Creates a new instance of the Certificate class by opening a PFX file and retrieving the first certificate from it.
Public methodStatic memberCreateFromPfxFile(String, String, Boolean)
Creates a new instance of the Certificate class by opening a PFX file and retrieving the first certificate from it.
Public methodStatic memberCreateFromPfxFile(array<Byte>[]()[][], String, Boolean, KeysetLocation)
Creates a new instance of the Certificate class by opening a PFX file and retrieving the first certificate from it.
Public methodStatic memberCreateFromPfxFile(String, String, Boolean, KeysetLocation)
Creates a new instance of the Certificate class by opening a PFX file and retrieving the first certificate from it.
Public methodStatic memberCreateFromX509Certificate
Creates a new instance of the Certificate class by duplicating an existing X509Certificate instance.
Public methodStatic memberDecodeExtension(Extension, Int32, Type)
Decodes the specified extension and returns an object of the specified type that is instantiated with the decoded bytes.
Protected methodStatic memberDecodeExtension(Extension, IntPtr, Type)
Decodes the specified extension and returns an object of the specified type that is instantiated with the decoded bytes.
Public methodStatic memberDecodeExtension(Extension, String, Type)
Decodes the specified extension and returns an object of the specified type that is instantiated with the decoded bytes.
Public methodEquals(Object)
Compares two Certificate objects for equality.
(Overrides Object..::..Equals(Object).)
Public methodEquals(X509Certificate)
Compares a Certificate object and an X509Certificate object for equality.
Public methodEquals(Certificate)
Compares two Certificate objects for equality.
Public methodExportPrivateKey
Exports the private key of this certificate to a PVK file.
Protected methodFinalize
Disposes of the certificate and frees unmanaged resources.
(Overrides Object..::..Finalize()()()().)
Public methodFindExtension
Searches for a certificate extension.
Public methodGetCertHash()()()()
Returns the hash value for the X.509v3 certificate as an array of bytes.
Public methodGetCertHash(HashType)
Returns the hash value for the X.509v3 certificate as an array of bytes.
Public methodGetCertHashString()()()()
Returns the hash value for the X.509v3 certificate as a hexadecimal string.
Public methodGetCertHashString(HashType)
Returns the hash value for the X.509v3 certificate as a hexadecimal string.
Public methodGetCertificateChain
Returns a CertificateChain where the leaf certificate corresponds to this Certificate.
Public methodGetDistinguishedName
Returns a list of attributes of the X.509v3 certificate.
Public methodGetEffectiveDate
Returns the effective date of this X.509v3 certificate.
Public methodGetEnhancedKeyUsage
Returns a list of enhanced key usages of the X.509v3 certificate.
Public methodGetExpirationDate
Returns the expiration date of this X.509v3 certificate.
Public methodGetExtensions
Returns a list of extensions of the X.509v3 certificate.
Public methodGetFormat
Returns the name of the format of this X.509v3 certificate.
Public methodGetHashCode
Returns the hash code for the X.509v3 certificate as an integer.
(Overrides Object..::..GetHashCode()()()().)
Public methodGetIntendedKeyUsage
Returns a list of intended key usages of the X.509v3 certificate.
Public methodGetIssuerName
Returns the name of the certification authority that issued the X.509v3 certificate.
Public methodGetKeyAlgorithmParameters
Returns the key algorithm parameters for the X.509v3 certificate.
Public methodGetKeyAlgorithmParametersString
Returns the key algorithm parameters for the X.509v3 certificate.
Public methodGetKeyIdentifier
Gets the unique identifier associated with the key.
Public methodGetPublicKey
Returns the public key for the X.509v3 certificate.
Public methodGetPublicKeyLength
Returns the length of the public key of the X.509v3 certificate.
Public methodGetPublicKeyString
Returns the public key for the X.509v3 certificate.
Public methodGetRawCertData
Returns the raw data for the entire X.509v3 certificate.
Public methodGetRawCertDataString
Returns the raw data for the entire X.509v3 certificate.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberGetValidUsages
Returns an array of usages consisting of the intersection of the valid usages for all certificates in an array of certificates.
Public methodHasPrivateKey
Checks whether the Certificate has a private key associated with it.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToBase64String
Returns a Base64-encoded representation of the certificate.
Public methodToCerBuffer
Saves the Certificate as an encoded buffer.
Public methodToCerFile
Saves the Certificate as an encoded file.
Public methodToPemBuffer
Converts the Certificate to a PEM encoded buffer.
Public methodToPfxBuffer
Saves the Certificate as a PFX encoded buffer.
Public methodToPfxFile
Saves the Certificate as a PFX encoded file.
Public methodToString()()()()
Returns a string representation of the current Certificate object.
(Overrides Object..::..ToString()()()().)
Public methodToString(Boolean)
Returns a string representation of the current X509Certificate object, with extra information, if specified.
Public methodToX509
Returns an X509Certificate object that corresponds to this Certificate.
Public methodVerifyRevocation
Verifies whether this certificate has been revoked or not.

Properties

  NameDescription
Public propertyHandle
Gets the handle of the Certificate.
Public propertyIsCurrent
Gets a value indicating whether the certificate is current, that is, has not expired.
Public propertyKeyAlgorithm
Returns the key algorithm information for this X.509v3 certificate.
Public propertyName
Returns the name of the current principal.
Public propertyPrivateKey
Gets the private key for the certificate.
Public propertyPublicKey
Gets the public key derived from the certificate's data. This key cannot be used to sign or decrypt data.
Public propertySerialNumber
Returns the serial number of the X.509v3 certificate.
Public propertySerialNumberString
Returns the serial number of the X.509v3 certificate.
Public propertySupportsDataEncryption
Gets a value indicating whether the certificate can be used for encrypting and decrypting messages.
Public propertySupportsDigitalSignature
Gets a value indicating whether the certificate can be used for digital signatures.

See Also