コード例 #1
0
        public static void CopyFrom_ReadSerialNumberFirst()
        {
            X509AuthorityKeyIdentifierExtension ext = new X509AuthorityKeyIdentifierExtension();

            ext.CopyFrom(GetFullyValuedExtension());

            ReadOnlyMemory <byte>?serial = ext.SerialNumber;

            Assert.Equal("00EE7B", serial.GetValueOrDefault().ByteArrayToHex());
        }
コード例 #2
0
        public static void CopyFrom_ReadKeyIdentifierFirst()
        {
            X509AuthorityKeyIdentifierExtension ext = new X509AuthorityKeyIdentifierExtension();

            ext.CopyFrom(GetFullyValuedExtension());

            ReadOnlyMemory <byte>?keyIdentifier = ext.KeyIdentifier;

            Assert.Equal("000000000000000880", keyIdentifier.GetValueOrDefault().ByteArrayToHex());
        }
コード例 #3
0
        public static void CopyFrom_ReadRawIssuerFirst()
        {
            X509AuthorityKeyIdentifierExtension ext = new X509AuthorityKeyIdentifierExtension();

            ext.CopyFrom(GetFullyValuedExtension());

            ReadOnlyMemory <byte>?rawIssuer = ext.RawIssuer;

            Assert.Equal(
                "A114A4123010310E300C0603550403130548656C6C6F",
                rawIssuer.GetValueOrDefault().ByteArrayToHex());
        }