Beispiel #1
0
        static void SignFilesWithAzureSignTool(
            ICollection<string> files,
            string vaultUrl,
            string vaultAppId,
            string vaultAppSecret,
            string vaultTenantId,
            string vaultCertificateName,
            string display = "",
            string displayUrl = "")
        {
            Log.Information("Signing {FilesCount} files using Azure Sign Tool", files.Count);

            TrySignTaskWithEachTimestampUrlUntilSuccess(url =>
                AzureSignToolTasks.AzureSignTool(_ =>
                    _.SetKeyVaultUrl(vaultUrl)
                     .SetKeyVaultClientId(vaultAppId)
                     .SetKeyVaultClientSecret(vaultAppSecret)
                     .SetKeyVaultTenantId(vaultTenantId)
                     .SetKeyVaultCertificateName(vaultCertificateName)
                     .SetFileDigest("sha256")
                     .SetDescription(display)
                     .SetDescriptionUrl(displayUrl)
                     .SetTimestampRfc3161Url(url)
                     .SetTimestampDigest(AzureSignToolDigestAlgorithm.sha256)
                     .SetFiles(files)));

            Log.Information("Finished signing {FilesCount} files", files.Count);
        }
Beispiel #2
0
    void SignWithAzureSignTool(AbsolutePath[] files, string timestampUrl)
    {
        Log.Information("Signing files using azuresigntool and the production code signing certificate.");

        AzureSignToolTasks.AzureSignTool(settings => settings
                                         .SetKeyVaultUrl(AzureKeyVaultUrl)
                                         .SetKeyVaultClientId(AzureKeyVaultAppId)
                                         .SetKeyVaultClientSecret(AzureKeyVaultAppSecret)
                                         .SetKeyVaultCertificateName(AzureKeyVaultCertificateName)
                                         .SetKeyVaultTenantId(AzureKeyVaultTenantId)
                                         .SetDescription("Octopus Client Library")
                                         .SetDescriptionUrl("https://octopus.com")
                                         .SetFileDigest(AzureSignToolDigestAlgorithm.sha256)
                                         .SetTimestampRfc3161Url(timestampUrl)
                                         .SetTimestampDigest(AzureSignToolDigestAlgorithm.sha256)
                                         .SetFiles(files.Select(x => x.ToString())));
    }