コード例 #1
0
 public static void PrintName(TestContext ctx, BtlsX509Name name)
 {
     ctx.LogMessage("STRING: {0}", name.GetString());
     ctx.LogMessage("HASH: {0:x}", name.GetHash());
     ctx.LogMessage("HASH OLD: {0:x}", name.GetHashOld());
     ctx.LogBufferAsCSharp("rawData", "\t\t", name.GetRawData(false));
     ctx.LogBufferAsCSharp("rawDataCanon", "\t\t", name.GetRawData(true));
 }
コード例 #2
0
 public static void TestName(TestContext ctx, BtlsX509Name actual, CertificateNameInfo expected, string label)
 {
     ctx.Expect(actual.GetString(), Is.EqualTo(expected.String), label + ".String");
     ctx.Expect(actual.GetHash(), Is.EqualTo(expected.Hash), label + ".Hash");
     ctx.Expect(actual.GetHashOld(), Is.EqualTo(expected.HashOld), label + ".HashOld");
     ctx.Expect(actual.GetRawData(false), Is.EqualTo(expected.RawData), label + ".RawData");
     ctx.Expect(actual.GetRawData(true), Is.EqualTo(expected.RawDataCanon), label + ".RawDataCanon");
 }
コード例 #3
0
 public static void PrintName(TestContext ctx, string prefix, BtlsX509Name name)
 {
     ctx.LogMessage("{0} string: {1}", prefix, name.GetString());
     ctx.LogMessage("{0} hash: {1:x}", prefix, name.GetHash());
     ctx.LogMessage("{0} hash old: {1:x}", prefix, name.GetHashOld());
     ctx.LogBufferAsCSharp(prefix + "_rawData", "\t\t", name.GetRawData(false));
     ctx.LogBufferAsCSharp(prefix + "_rawDataCanon", "\t\t", name.GetRawData(true));
 }