Esempio n. 1
0
 static string ToHexString(byte[] bytes)
 {
     Preconditions.CheckNotNull(bytes);
     return(BitConverter.ToString(bytes).Replace("-", string.Empty));
 }
Esempio n. 2
0
 internal static X509Certificate2 ParseManifestTrustedBundleCerts(string manifestTrustedCACerts)
 {
     Preconditions.CheckNotNull(manifestTrustedCACerts, nameof(manifestTrustedCACerts));
     return(GetCertificatesFromPem(ParsePemCerts(manifestTrustedCACerts)).FirstOrDefault());
 }
Esempio n. 3
0
 public static void SetLogLevel(string level)
 {
     Preconditions.CheckNonWhiteSpace(level, nameof(level));
     logLevel = LogLevelDictionary.GetOrElse(level.ToLower(), LogEventLevel.Information);
 }
Esempio n. 4
0
 internal static IEnumerable <X509Certificate2> ParseTrustedBundleCerts(string trustedCACerts)
 {
     Preconditions.CheckNotNull(trustedCACerts, nameof(trustedCACerts));
     return(GetCertificatesFromPem(ParsePemCerts(trustedCACerts)));
 }
Esempio n. 5
0
 internal static IEnumerable <X509Certificate2> ParseTrustBundleResponse(TrustBundleResponse response)
 {
     Preconditions.CheckNotNull(response, nameof(response));
     return(ParseTrustedBundleCerts(response.Certificate));
 }