X509Certificate2
Contents
[
Hide
]X509Certificate2 class
Represents X509 certificate. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.
class X509Certificate2 : public System::Security::Cryptography::X509Certificates::X509Certificate
Methods
Method | Description |
---|---|
static SharedPtr<X509Certificate> CreateFromCertFile(const String&) | Creates sertificate from the specified PKCS7 file. |
static SharedPtr<X509Certificate> CreateFromSignedFile(const String&) | Creates sertificate from the specified signed file. |
void Dispose() override | Does nothing. |
bool Equals(SharedPtr<Object>) override | Compares two certificates. |
virtual bool Equals(ptr) | Compares objects using C# Object.Equals semantics. |
static std::enable_if<IsSmartPtr<T1>::value&&IsSmartPtr<T2>::value, bool>::type Equals(T1 const&, T2 const&) | Compares reference type objects in C# style. |
static bool Equals(float const&, float const&) | Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. |
static bool Equals(double const&, double const&) | Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. |
virtual ByteArrayPtr Export(X509ContentType) const | Exports the current object to a byte array using the specified format. NOT IMPLEMENTED. |
virtual ByteArrayPtr Export(X509ContentType, const SecureStringPtr&) const | Exports the current object to a byte array using the specified format. NOT IMPLEMENTED. |
virtual ByteArrayPtr Export(X509ContentType, const String&) const | Exports the current object to a byte array using the specified format. NOT IMPLEMENTED. |
virtual bool FastCast(const Details::FastRttiBase&, void **) const | For internal purposes only. |
bool get_Archived() const | Gets a value indicating that certificate is archived. |
X509ExtensionCollectionPtr get_Extensions() const | Gets collection of extension objects associated with certificate. |
String get_FriendlyName() const | Gets the certificate’s friendly name. |
IntPtr get_Handle() const | Gets a handle to Microsoft Cryptographic API certificate context. |
bool get_HasPrivateKey() const | Checks whether the certificate has private key. |
String get_Issuer() const | Gets name of the certificate authority that issued the X.509v3 certificate. |
SharedPtr<X500DistinguishedName> get_IssuerName() const | Gets the name of party that issued a certificate. |
DateTime get_NotAfter() const | Gets the local date and time after which a certificate is no longer valid. |
DateTime get_NotBefore() const | Gets the local date and time on which a certificate becomes valid. |
SharedPtr<AsymmetricAlgorithm> get_PrivateKey() const | Gets private key associated with certificate. |
SharedPtr<PublicKey> get_PublicKey() const | Gets a sertificate PublicKey object. |
ByteArrayPtr get_RawData() const | Gets certificate raw data. |
String get_SerialNumber() const | Gets the serial number of a certificate. |
SharedPtr<Oid> get_SignatureAlgorithm() const | Gets algorithm used to create signature of a certificate. |
String get_Subject() const | Gets subject distinguished name from certificate. |
SharedPtr<X500DistinguishedName> get_SubjectName() const | Gets the subject name from a certificate. |
String get_Thumbprint() const | Gets the certificate thumbprint. |
int32_t get_Version() const | Gets certificate format version. |
static X509ContentType GetCertContentType(const ByteArrayPtr&) | Gets the type of certificate contained in the specified byte array. |
static X509ContentType GetCertContentType(const String&) | Gets the type of certificate contained in the specified file. |
virtual ByteArrayPtr GetCertHash() const | Gets hash for the current object as an array of bytes. |
virtual ByteArrayPtr GetCertHash(const HashAlgorithmName&) const | Gets hash for the current object as an array of bytes. |
virtual String GetCertHashString() const | Gets SHA1 hash for the current object as a hexadecimal string. |
virtual String GetCertHashString(const HashAlgorithmName&) const | Gets SHA1 hash for the current object as a hexadecimal string. |
Detail::SmartPtrCounter * GetCounter() | Gets reference counter data structure associated with the object. |
SharedPtr<DSA> GetDSAPrivateKey() const | Gets RSA private key;. |
SharedPtr<DSA> GetDSAPublicKey() const | Gets RSA public key. |
SharedPtr<ECDsa> GetECDsaPrivateKey() const | Gets RSA private key;. |
SharedPtr<ECDsa> GetECDsaPublicKey() const | Gets RSA public key. |
virtual String GetEffectiveDateString() const | Gets effective date of the current sertificate. |
virtual String GetExpirationDateString() const | Gets expiration date of the current sertificate. |
virtual String GetFormat() const | Gets name of the certificate format. |
int32_t GetHashCode() const override | Gets certificate hash code. |
virtual String GetIssuerName() const | Gets name of the certification authority that issued the current certificate. |
virtual String GetKeyAlgorithm() const | Gets key information for the current certificate as a string. |
virtual ByteArrayPtr GetKeyAlgorithmParameters() const | Gets key information for the current certificate as an array of bytes. |
virtual String GetKeyAlgorithmParametersString() const | Gets key information for the current certificate as a hexadecimal string. |
virtual String GetName() const | Gets name of the principal to witch the current sertificate was issued. |
String GetNameInfo(X509NameType, bool) const | Gets subject or issuer name from certificate. |
virtual ByteArrayPtr GetPublicKey() const | Gets public key from certificate as array of bytes. |
virtual String GetPublicKeyString() const | Gets public key from certificate as a hexadecimal string. |
virtual ByteArrayPtr GetRawCertData() const | Gets raw data from certificate as array of bytes. |
virtual String GetRawCertDataString() const | Gets raw data from certificate as a hexadecimal string. |
SharedPtr<RSA> GetRSAPrivateKey() const | Gets RSA private key;. |
SharedPtr<RSA> GetRSAPublicKey() const | Gets RSA public key. |
virtual ByteArrayPtr GetSerialNumber() const | Gets serial number from certificate as array of bytes. |
virtual String GetSerialNumberString() const | Gets serial number from certificate as a hexadecimal string. |
virtual const TypeInfo& GetType() const | Gets actual type of object. Analog of C# System.Object.GetType() call. |
void Import(const String&, const SecureStringPtr&, X509KeyStorageFlags) override | Imports information from the specified certificate file. |
void Import(const String&, const String&, X509KeyStorageFlags) override | Imports information from the specified certificate file. |
void Import(const ByteArrayPtr&, const SecureStringPtr&, X509KeyStorageFlags) override | Imports information from the specified certificate data. |
void Import(const ByteArrayPtr&, const String&, X509KeyStorageFlags) override | Imports information from the specified certificate data. |
void Import(const String&) override | Imports information from the specified certificate file. |
void Import(const ByteArrayPtr&) override | Imports information from the specified certificate data. |
virtual bool Is(const TypeInfo&) const | Check if object represents an instance of type described by targetType. Analog of C# ‘is’ operator. |
void Lock() | Implements C# lock() statement locking. Call directly or use LockContext sentry object. |
virtual ptr MemberwiseClone() const | Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. |
Object() | Creates object. Initializes all internal data structures. |
Object(Object const&) | Copy constructor. Doesn’t copy anything, really, just initializes new object and enables copy constructing subclasses. |
X509Certificate& operator=(const X509Certificate&) | |
Object& operator=(Object const&) | Assignment operator. Doesn’t copy anything, really, just initializes new object and enables copy constructing subclasses. |
static bool ReferenceEquals(ptr const&, ptr const&) | Compares objects by reference. |
static std::enable_if<!IsSmartPtr<T>::value, bool>::type ReferenceEquals(T const&, T const&) | Compares objects by reference. |
static std::enable_if<!IsSmartPtr<T>::value, bool>::type ReferenceEquals(T const&, std::nullptr_t) | Reference-compares value type object with nullptr. |
bool ReferenceEquals(String const&, std::nullptr_t) | Specialization of Object::ReferenceEquals for case of string and nullptr. |
bool ReferenceEquals(String const&, String const&) | Specialization of Object::ReferenceEquals for case of strings. |
int RemovedSharedRefs(int) | Decreases shared reference count by specified value. |
void Reset() override | Resets the certificate state. |
void set_Archived(bool) const | Sets a value indicating that certificate is archived. |
void set_FriendlyName(const String&) | Sets the certificate’s friendly name. |
void set_PrivateKey(const SharedPtr<AsymmetricAlgorithm>&) | Sets or clears private key associated with certificate. |
virtual void SetTemplateWeakPtr(uint32_t) | Set n’th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. |
int SharedCount() const | Gets current value of shared reference counter. |
Object * SharedRefAdded() | Increments shared reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector. |
int SharedRefRemovedSafe() | Decrements and returns shared reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector. |
String ToString(bool) const override | Returns the certificate information in text format. |
String ToString() const override | Returns the certificate information in text format. |
static const TypeInfo& Type() | Implements C# typeof(System.Object) construct. |
void Unlock() | Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. |
bool Verify() const | Verifies certificate chain. |
Detail::SmartPtrCounter * WeakRefAdded() | Increments weak reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector. |
void WeakRefRemoved() | Decrements weak reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector. |
X509Certificate(const X509Certificate&) | |
X509Certificate() | Constructor. |
X509Certificate(const ByteArrayPtr&) | Constructor. |
X509Certificate(const String&) | Constructor. |
X509Certificate(const SharedPtr<X509Certificate>&) | Constructor. |
X509Certificate(const ByteArrayPtr&, const String&) | Constructor. |
X509Certificate(const ByteArrayPtr&, const SecureStringPtr&) | Constructor. |
X509Certificate(const String&, const String&) | Constructor. |
X509Certificate(const String&, const SecureStringPtr&) | Constructor. |
X509Certificate(const ByteArrayPtr&, const String&, X509KeyStorageFlags) | Constructor. |
X509Certificate(const ByteArrayPtr&, const SecureStringPtr&, X509KeyStorageFlags) | Constructor. |
X509Certificate(const String&, const String&, X509KeyStorageFlags) | Constructor. |
X509Certificate(const String&, const SecureStringPtr&, X509KeyStorageFlags) | Constructor. |
X509Certificate(const ByteArrayPtr&, const ByteArrayPtr&, X509KeyStorageFlags) | Constructor. |
X509Certificate2() | Constructs empty X509Certificate2. |
X509Certificate2(const String&) | Constructor. |
X509Certificate2(const SharedPtr<X509Certificate>&) | Constructor. |
X509Certificate2(const ByteArrayPtr&) | Constructor. |
X509Certificate2(const ByteArrayPtr&, const String&) | Constructor. |
X509Certificate2(const ByteArrayPtr&, const SecureStringPtr&) | Constructor. |
X509Certificate2(const ByteArrayPtr&, const String&, X509KeyStorageFlags) | Constructor. |
X509Certificate2(const ByteArrayPtr&, const SecureStringPtr&, X509KeyStorageFlags) | Constructor. |
X509Certificate2(const String&, const String&) | Constructor. |
X509Certificate2(const String&, const SecureStringPtr&) | Constructor. |
X509Certificate2(const String&, const String&, X509KeyStorageFlags) | Constructor. |
X509Certificate2(const String&, const SecureStringPtr&, X509KeyStorageFlags) | Constructor. |
X509Certificate2(const ByteArrayPtr&, const ByteArrayPtr&, X509KeyStorageFlags) | Constructor. |
virtual ~Object() | Destroys object. Frees all internal data structures. |
See Also
- Class X509Certificate
- Namespace System::Security::Cryptography::X509Certificates
- Library Aspose.Slides