/// <sumary>Convert the value of the passed in extension to an object.</sumary> /// <param name="ext">The extension to parse.</param> /// <returns>The object the value string contains.</returns> /// <exception cref="ArgumentException">If conversion is not possible.</exception> public static Asn1Object ConvertValueToObject( X509Extension ext) { try { return Asn1Object.FromByteArray(ext.Value.GetOctets()); } catch (Exception e) { throw new ArgumentException("can't convert extension", e); } }