8 private bool m_critical;
32 CAPIBase.CERT_EXTENSION cERT_EXTENSION = (CAPIBase.CERT_EXTENSION)
Marshal.
PtrToStructure(pExtension, typeof(CAPIBase.CERT_EXTENSION));
33 m_critical = cERT_EXTENSION.fCritical;
34 string pszObjId = cERT_EXTENSION.pszObjId;
36 byte[] array =
new byte[cERT_EXTENSION.Value.cbData];
37 if (cERT_EXTENSION.Value.pbData !=
IntPtr.
Zero)
39 Marshal.
Copy(cERT_EXTENSION.Value.pbData, array, 0, array.Length);
64 : this(encodedExtension.
Oid, encodedExtension.
RawData, critical)
80 if (base.Oid ==
null || base.Oid.Value ==
null)
84 if (base.Oid.Value.Length == 0)
88 m_critical = critical;
99 if (asnEncodedData ==
null)
104 if (x509Extension ==
null)
106 throw new ArgumentException(SR.GetString(
"Cryptography_X509_ExtensionMismatch"));
108 base.CopyFrom(asnEncodedData);
109 m_critical = x509Extension.
Critical;
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
Represents Abstract Syntax Notation One (ASN.1)-encoded data.
Oid Oid
Gets or sets the T:System.Security.Cryptography.Oid value for an T:System.Security....
Represents a cryptographic object identifier. This class cannot be inherited.
The Windows group that is represented by CRYPT_EXT_OR_ATTR_OID_GROUP_ID.
X509Extension(Oid oid, byte[] rawData, bool critical)
Initializes a new instance of the T:System.Security.Cryptography.X509Certificates....
Represents an X509 extension.
X509Extension(AsnEncodedData encodedExtension, bool critical)
Initializes a new instance of the T:System.Security.Cryptography.X509Certificates....
X509Extension()
Initializes a new instance of the T:System.Security.Cryptography.X509Certificates....
static void Copy(int[] source, int startIndex, IntPtr destination, int length)
Copies data from a one-dimensional, managed 32-bit signed integer array to an unmanaged memory pointe...
bool Critical
Gets a Boolean value indicating whether the extension is critical.
byte [] RawData
Gets or sets the Abstract Syntax Notation One (ASN.1)-encoded data represented in a byte array.
A platform-specific type that is used to represent a pointer or a handle.
Provides a collection of methods for allocating unmanaged memory, copying unmanaged memory blocks,...
X509Extension(string oid, byte[] rawData, bool critical)
Initializes a new instance of the T:System.Security.Cryptography.X509Certificates....
The exception that is thrown when one of the arguments provided to a method is not valid.
static void PtrToStructure(IntPtr ptr, object structure)
Marshals data from an unmanaged block of memory to a managed object.
static readonly IntPtr Zero
A read-only field that represents a pointer or handle that has been initialized to zero.
override void CopyFrom(AsnEncodedData asnEncodedData)
Copies the extension properties of the specified T:System.Security.Cryptography.AsnEncodedData object...