X509Certificate
Contents
[
Hide
]X509Certificate class
X.509 v.3 certificate. Encrypted certificates are not supported. Only X509KeyStorageFlags::DefaultKeySet flag is supported. 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 X509Certificate : public virtual System::Object,
public System::IDisposable
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. |
| IntPtr get_Handle() const | Gets a handle to Microsoft Cryptographic API certificate context. |
| String get_Issuer() const | Gets name of the certificate authority that issued the X.509v3 certificate. |
| String get_Subject() const | Gets subject distinguished name from certificate. |
| 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. |
| 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. |
| 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. |
| 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. |
| virtual void Import(const String&, const SecureStringPtr&, X509KeyStorageFlags) | Imports information from the specified certificate file. NOT IMPLEMENTED. |
| virtual void Import(const String&, const String&, X509KeyStorageFlags) | Imports information from the specified certificate file. NOT IMPLEMENTED. |
| virtual void Import(const ByteArrayPtr&, const SecureStringPtr&, X509KeyStorageFlags) | Imports information from the specified certificate data. NOT IMPLEMENTED. |
| virtual void Import(const ByteArrayPtr&, const String&, X509KeyStorageFlags) | Imports information from the specified certificate data. NOT IMPLEMENTED. |
| virtual void Import(const String&) | Imports information from the specified certificate file. NOT IMPLEMENTED. |
| virtual void Import(const ByteArrayPtr&) | Imports information from the specified certificate data. NOT IMPLEMENTED. |
| 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. |
| virtual void Reset() | Resets the certificate state. |
| 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. |
| virtual String ToString(bool) const | 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. |
| 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. |
| virtual ~Object() | Destroys object. Frees all internal data structures. |
Typedefs
| Typedef | Description |
|---|---|
| Ptr | Pointer type. |
See Also
- Class Object
- Class IDisposable
- Namespace System::Security::Cryptography::X509Certificates
- Library Aspose.Slides