@@ -29,36 +29,37 @@ Import-Module .\Az.CodeSigning.psd1
29
29
```
30
30
4 . Optionally you can create a ` metadata.json ` file:
31
31
```
32
- Endpoint "https://scus .codesigning.azure.net/"
33
- CodeSigningAccountName "youracsaccount"
34
- CertificateProfileName "youracscertprofile"
32
+ " Endpoint": "https://xxx .codesigning.azure.net/"
33
+ "TrustedSigningAccountName": "<Trusted Signing Account Name>",
34
+ " CertificateProfileName": "<Certificate Profile Name>",
35
35
```
36
+
36
37
5 . [ Get the root certificate] ( https://learn.microsoft.com/powershell/module/az.codesigning/get-azcodesigningrootcert ) to be added to the trust store
37
38
```
38
39
Get-AzCodeSigningRootCert -AccountName TestAccount -ProfileName TestCertProfile -EndpointUrl https://xxx.codesigning.azure.net/ -Destination c:\temp\root.cer
39
40
```
40
41
Or using a metadata.json
41
42
```
42
- Get-AzCodeSigningRootCert -MetadataFilePath C:\temp\metadata.sample.scus.privateci. json https://xxx.codesigning.azure.net/ -Destination c:\temp\root.cer
43
+ Get-AzCodeSigningRootCert -MetadataFilePath C:\temp\metadata.json https://xxx.codesigning.azure.net/ -Destination c:\temp\root.cer
43
44
```
44
45
6 . To get the EKU (Extended Key Usage) to insert into your policy:
45
46
```
46
- Get-AzCodeSigningCustomerEku -AccountName acstestcanary -ProfileName acstestcanaryCert1 -EndpointUrl https://xxx.codesigning.azure.net/
47
+ Get-AzCodeSigningCustomerEku -AccountName TestAccount -ProfileName TestCertProfile -EndpointUrl https://xxx.codesigning.azure.net/
47
48
```
48
49
Or
49
50
50
51
```
51
- Get-AzCodeSigningCustomerEku -MetadataFilePath C:\temp\metadata.sample.scus.privateci. json
52
+ Get-AzCodeSigningCustomerEku -MetadataFilePath C:\temp\metadata.json
52
53
```
53
54
7 . To sign your policy, you run the invoke command:
54
55
```
55
- Invoke-AzCodeSigningCIPolicySigning -accountName acstestcanary -profileName acstestcanaryCert1 -endpointurl "https://xxx.codesigning.azure.net/" -Path C:\Temp\defaultpolicy.bin -Destination C:\Temp\defaultpolicy_signed.bin -TimeStamperUrl: http://timestamp.acs.microsoft.com
56
+ Invoke-AzCodeSigningCIPolicySigning -accountName TestAccount -profileName TestCertProfile -endpointurl "https://xxx.codesigning.azure.net/" -Path C:\Temp\defaultpolicy.bin -Destination C:\Temp\defaultpolicy_signed.bin -TimeStamperUrl: http://timestamp.acs.microsoft.com
56
57
```
57
58
58
59
Or use a ` metadata.json ` file and the following command:
59
60
60
61
```
61
- Invoke-AzCodeSigningCIPolicySigning -MetadataFilePath C:\temp\metadata.sample.scus.privateci. json -Path C:\Temp\defaultpolicy.bin -Destination C:\Temp\defaultpolicy_signed.bin -TimeStamperUrl: http://timestamp.acs.microsoft.com
62
+ Invoke-AzCodeSigningCIPolicySigning -MetadataFilePath C:\temp\metadata.json -Path C:\Temp\defaultpolicy.bin -Destination C:\Temp\defaultpolicy_signed.bin -TimeStamperUrl: http://timestamp.acs.microsoft.com
62
63
```
63
64
64
65
## Creating and Deploying a CI Policy
0 commit comments