|
@@ -310,34 +310,29 @@ Before you start, make sure that the GPG Agent is running, see
|
|
|
create a CSR with the command:
|
|
|
|
|
|
@example
|
|
|
-$ gpgsm-gencert.sh > floppy-head.p10
|
|
|
-Key type
|
|
|
- [1] RSA
|
|
|
- [2] Existing key
|
|
|
- [3] Direct from card
|
|
|
-Your selection: 3
|
|
|
-You selected: Direct from card
|
|
|
+$ gpgsm --gen-key > floppy-head.csr
|
|
|
+Please select what kind of key you want:
|
|
|
+ (1) RSA
|
|
|
+ (2) Existing key
|
|
|
+ (3) Existing key from card
|
|
|
+Your selection? 3
|
|
|
@end example
|
|
|
|
|
|
As we create a certificate for the OpenPGP Card, the option ``@code{[3]
|
|
|
Direct from card}'' should be selected.
|
|
|
|
|
|
@example
|
|
|
-Card with S/N D27600012401010100010000051B0000 found
|
|
|
-gpg-agent uses OPENPGP.3 as ssh key
|
|
|
-Select key
|
|
|
- [1] OPENPGP.1
|
|
|
- [2] OPENPGP.2
|
|
|
- [3] OPENPGP.3
|
|
|
- [4] back
|
|
|
-Your selection: 3
|
|
|
-You selected: OPENPGP.3
|
|
|
-Key usage
|
|
|
- [1] sign, encrypt
|
|
|
- [2] sign
|
|
|
- [3] encrypt
|
|
|
-Your selection: 2
|
|
|
-You selected: sign
|
|
|
+Serial number of the card: 355F9746499F0D4B4ECEE4928B007D16
|
|
|
+Available keys:
|
|
|
+ (1) D53137B94C38D9BF6A199706EA6D5253 OPENPGP.1
|
|
|
+ (2) B0CD1A9DFC3539A1D6A8B851A11C8665 OPENPGP.2
|
|
|
+ (3) 53DB41052CC590A40B403F3E6350E5DC OPENPGP.3
|
|
|
+Your selection? 3
|
|
|
+Possible actions for a RSA key:
|
|
|
+ (1) sign, encrypt
|
|
|
+ (2) sign
|
|
|
+ (3) encrypt
|
|
|
+Your selection? 2
|
|
|
@end example
|
|
|
|
|
|
The only operation currently supported is client authentication. For
|
|
@@ -347,16 +342,15 @@ sign}'' should be chosen. Note that the key usage is only advisory, and
|
|
|
the CA may assign different capabilities.
|
|
|
|
|
|
@example
|
|
|
-Name (DN)
|
|
|
-> CN=Floppy Head,OU="Webserver Team",O="Snake Oil, Ltd",L="Snake Town",ST="Snake Desert",C=XY
|
|
|
-E-Mail addresses (end with an empty line)
|
|
|
-> floppy.head@@example.com
|
|
|
-E-Mail addresses (end with an empty line)
|
|
|
->
|
|
|
-DNS Names (optional; end with an empty line)
|
|
|
->
|
|
|
-URIs (optional; end with an empty line)
|
|
|
->
|
|
|
+Enter the X.509 subject name: CN=Floppy Head,OU="Webserver Team",O="Snake Oil, Ltd",L="Snake Town",ST="Snake Desert",C=XY
|
|
|
+Enter email addresses (end with an empty line):
|
|
|
+> floppy.head@@example.org
|
|
|
+>
|
|
|
+Enter DNS names (optional; end with an empty line):
|
|
|
+>
|
|
|
+Enter URIs (optional; end with an empty line):
|
|
|
+>
|
|
|
+Create self-signed certificate? (y/N) n
|
|
|
@end example
|
|
|
|
|
|
As a last step, the common name and e-mail address of the key owner need
|
|
@@ -368,18 +362,16 @@ We have now entered all required information and gpgsm will display what
|
|
|
it has gathered and ask whether to create the certificate request:
|
|
|
|
|
|
@example
|
|
|
-Parameters for certificate request to create:
|
|
|
- 1 Key-Type: card:OPENPGP.3
|
|
|
- 2 Key-Length:
|
|
|
- 3 Key-Usage: sign
|
|
|
- 4 Name-DN: CN=Floppy Head,OU="Webserver Team",O="Snake Oil, Ltd",L="Snake Town",ST="Snake Desert",C=XY
|
|
|
- 5 Name-Email: floppy.head@@example.com
|
|
|
-
|
|
|
-Really create such a CSR?
|
|
|
- [1] yes
|
|
|
- [2] no
|
|
|
-Your selection: 1
|
|
|
-You selected: yes
|
|
|
+These parameters are used:
|
|
|
+ Key-Type: card:OPENPGP.3
|
|
|
+ Key-Length: 1024
|
|
|
+ Key-Usage: sign
|
|
|
+ Name-DN: CN=Floppy Head,OU="Webserver Team",O="Snake Oil, Ltd",L="Snake Town",ST="Snake Desert",C=XY
|
|
|
+ Name-Email: floppy.head@@example.org
|
|
|
+
|
|
|
+Proceed with creation? (y/N) y
|
|
|
+Now creating certificate request. This may take a while ...
|
|
|
+gpgsm: about to sign the CSR for key: &53DB41052CC590A40B403F3E6350E5DC
|
|
|
@end example
|
|
|
|
|
|
GPGSM will now start working on creating the request. During this time
|
|
@@ -389,13 +381,14 @@ key on the card. A pop up window will appear to ask for it.
|
|
|
When it is ready, you should see the final notice:
|
|
|
|
|
|
@example
|
|
|
- gpgsm: certificate request created
|
|
|
+gpgsm: certificate request created
|
|
|
+Ready. You should now send this request to your CA.
|
|
|
@end example
|
|
|
|
|
|
Now, you may look at the created request:
|
|
|
|
|
|
@example
|
|
|
-$ cat floppy-head.p10
|
|
|
+$ cat floppy-head.csr
|
|
|
-----BEGIN CERTIFICATE REQUEST-----
|
|
|
MIICCDCCAXECAQAwgYExCzAJBgNVBAYTAlhZMRUwEwYDVQQIEwxTbmFrZSBEZXNl
|
|
|
cnQxEzARBgNVBAcTClNuYWtlIFRvd24xFzAVBgNVBAoTDlNuYWtlIE9pbCwgTHRk
|
|
@@ -424,7 +417,7 @@ certificate will be shown, which you can cut and paste into a new file
|
|
|
|
|
|
Alternatively if, for example, you set up your own CA with OpenSSL, then
|
|
|
you can create your own certificate by issueing a command similar
|
|
|
-@code{openssl ca -in floppy-head.p10 -cert snakeoil-ca-rsa.crt -keyfile
|
|
|
+@code{openssl ca -in floppy-head.csr -cert snakeoil-ca-rsa.crt -keyfile
|
|
|
snakeoil-ca-rsa.key -out floppy-head.crt}. Please see the OpenSSL
|
|
|
documentation for more details on how to set up and administrate a
|
|
|
certificate authority infrastructure.
|