You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specs/cmd/certificate.md
+23-17
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,11 @@
4
4
5
5
Use ```notation certificate``` command to add/list/delete certificates in notation's trust store. Updating an existing certificate is not allowed since the thumbprint will be inconsistent, which results in a new certificate.
6
6
7
-
The trust store is in the format of a directory in the filesystem as`x509/<type>/<name>/*.crt|*.cer|*.pem`. Currently two types of trust store are supported:
7
+
The trust store is in the format of a directory in the filesystem as`x509/<type>/<name>/*.crt|*.cer|*.pem`. Currently three types of trust store are supported:
8
8
9
-
*`Certificate Authority`: The directory name is `ca`.
9
+
*`Certificate Authority`: The directory name is `ca`
10
10
*`Signing Authority`: The directory name is `signingAuthority`
11
+
*`Timestamping Authority`: The directory name is `tsa`
11
12
12
13
There could be more trust store types introduced in the future.
In this example, there are two certificates stored in trust store named `acme-rockets` of type `ca`. There is one certificate stored in trust store named `wabbit-networks` of type `signingAuthority`.
36
+
In this example, there are two certificates stored in trust store named `acme-rockets` of type `ca`. There is one certificate stored in trust store named `wabbit-networks` of type `signingAuthority`. And there is one certificate stored in trust store named `trusted-tsa` of type `tsa`.
32
37
33
38
## Outline
34
39
@@ -66,7 +71,7 @@ Usage:
66
71
Flags:
67
72
-h, --help help for add
68
73
-s, --store string specify named store
69
-
-t, --type string specify trust store type, options: ca, signingAuthority
74
+
-t, --type string specify trust store type, options: ca, signingAuthority, tsa
70
75
```
71
76
72
77
### notation certificate list
@@ -84,7 +89,7 @@ Flags:
84
89
-d, --debug debug mode
85
90
-h, --help help for list
86
91
-s, --store string specify named store
87
-
-t, --type string specify trust store type, options: ca, signingAuthority
92
+
-t, --type string specify trust store type, options: ca, signingAuthority, tsa
88
93
-v, --verbose verbose mode
89
94
```
90
95
@@ -100,7 +105,7 @@ Flags:
100
105
-d, --debug debug mode
101
106
-h, --help help for show
102
107
-s, --store string specify named store
103
-
-t, --type string specify trust store type, options: ca, signingAuthority
108
+
-t, --type string specify trust store type, options: ca, signingAuthority, tsa
104
109
-v, --verbose verbose mode
105
110
```
106
111
@@ -116,7 +121,7 @@ Flags:
116
121
-a, --all delete all certificates in the named store
117
122
-h, --help help for delete
118
123
-s, --store string specify named store
119
-
-t, --type string specify trust store type, options: ca, signingAuthority
124
+
-t, --type string specify trust store type, options: ca, signingAuthority, tsa
120
125
-y, --yes do not prompt for confirmation
121
126
```
122
127
@@ -169,11 +174,12 @@ Upon successful listing, all the certificate files in the trust store are printe
169
174
170
175
An example of the output:
171
176
```
172
-
STORE TYPE STORE NAME CERTIFICATE
173
-
ca myStore1 cert1.pem
174
-
ca myStore2 cert2.crt
175
-
signingAuthority myStore1 cert3.crt
177
+
STORE TYPE STORE NAME CERTIFICATE
178
+
ca myStore1 cert1.pem
179
+
ca myStore2 cert2.crt
180
+
signingAuthority myStore1 cert3.crt
176
181
signingAuthority myStore2 cert4.pem
182
+
tsa myTSA tsa.crt
177
183
```
178
184
### List all certificate files of a certain named store
A prompt is displayed, asking the user to confirm the deletion. Upon successful deletion, the specific certificate is deleted from the trust store named `<name>` of type `<type>`. The output message is printed out as following:
234
240
235
241
```text
236
-
Successfully deleted <cert_fileName> from the trust store.
242
+
Successfully deleted <cert_fileName> from the trust store.
237
243
```
238
244
239
245
If users execute the deletion without specifying required flags using `notation cert delete <cert_fileName>`, the deletion fails and the error output message is printed out as follows:
@@ -258,13 +264,13 @@ Use the following command to clean up a test RSA key and its corresponding certi
0 commit comments