/// <summary>
    /// Get the value of an extension oid.
    /// </summary>
    private static Asn1Object GetExtensionValue(IX509Extension extension, DerObjectIdentifier oid)
    {
        Asn1OctetString asn1Octet = extension.GetExtensionValue(oid);

        if (asn1Octet != null)
        {
            return(X509ExtensionUtilities.FromExtensionValue(asn1Octet));
        }
        return(null);
    }
Exemplo n.º 2
0
        internal static Asn1Object GetExtensionValue(IX509Extension ext, DerObjectIdentifier oid)
        {
            Asn1OctetString extensionValue = ext.GetExtensionValue(oid);

            if (extensionValue == null)
            {
                return(null);
            }
            return(X509ExtensionUtilities.FromExtensionValue(extensionValue));
        }
Exemplo n.º 3
0
        private static Asn1Object GetExtensionValue(IX509Extension ext, DerObjectIdentifier oid)
        {
            Asn1OctetString bytes = ext.GetExtensionValue(oid);

            if (bytes == null)
            {
                return(null);
            }

            return(Org.BouncyCastle.X509.Extension.X509ExtensionUtilities.FromExtensionValue(bytes));
        }
		/// <summary>
		/// Extract the value of the given extension, if it exists.
		/// </summary>
		/// <param name="ext">The extension object.</param>
		/// <param name="oid">The object identifier to obtain.</param>
		/// <returns>Asn1Object</returns>
		/// <exception cref="Exception">if the extension cannot be read.</exception>
		internal static Asn1Object GetExtensionValue(
			IX509Extension		ext,
			DerObjectIdentifier	oid)
		{
			Asn1OctetString bytes = ext.GetExtensionValue(oid);

			if (bytes == null)
				return null;

			return X509ExtensionUtilities.FromExtensionValue(bytes);
		}