コード例 #1
0
        internal static X509Certificate2 LoadKeyVaultCertificate(string secretName)
        {
            KeyVaultWrapper  kvw         = KeyVaultWrapper.GetTestInfraKeyVaultWrapper();
            string           keyVaultUri = KeyVaultWrapper.GetTestInfraKeyVaultUri();
            X509Certificate2 cert        = kvw.GetCertificateFromSecret(keyVaultUri, secretName);
            var certBytes = cert.Export(X509ContentType.Pfx);

            return(new X509Certificate2(certBytes));
        }
コード例 #2
0
ファイル: TestUtility.cs プロジェクト: zmyer/service-fabric
        public static string GetXStoreTestResourcesConnectionString()
        {
            var keyVaultUri = KeyVaultWrapper.GetTestInfraKeyVaultUri();
            var kvw         = KeyVaultWrapper.GetTestInfraKeyVaultWrapper();
            var storageKey  = kvw.GetSecret(keyVaultUri, TestUtility.TestResourcesStorageAccountKeyName);

            return(string.Format(
                       CultureInfo.InvariantCulture,
                       "DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1}",
                       TestUtility.TestResourcesStorageAccountName,
                       storageKey));
        }
コード例 #3
0
        private static string GetTestStorageAccountKey()
        {
            var kvw = KeyVaultWrapper.GetTestInfraKeyVaultWrapper();

            return(kvw.GetSecret(KeyVaultWrapper.GetTestInfraKeyVaultUri(), WinFabCitStoreAccountKeySecretName));
        }