diff options
| author | polz <polz@fri.uni-lj.si> | 2023-12-06 14:49:17 +0100 |
|---|---|---|
| committer | Timotej Lazar <timotej.lazar@araneo.si> | 2024-01-16 21:51:14 +0100 |
| commit | 7d04aa3d86b9564f01242a347e2a861afae7c05d (patch) | |
| tree | f790acd5b8eed6bf405a9d86119d105d27621ac6 /README.md | |
| parent | 89eabe9f87673c23954b547408cb7dfbdcf61916 (diff) | |
Add support for smartcards
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 27 |
1 files changed, 26 insertions, 1 deletions
@@ -4,12 +4,37 @@ Python script to replace [MargTools](https://businessconnect.margis.si/output/#o ## Usage -Create the configuration file `~/.margfools` with the paths to your TLS private key and certificate in PEM format: + +### Configure certificates and sites + +Create the configuration file `~/.margfools`. The contents are described in the sections below. + +#### Certificates in files +If you are using certificate files, add the paths to your TLS private key and certificate in PEM format: [https://gcsign.example.com/BCSign/] user-key = <path/to/key.pem> user-cert = <path/to/cert.pem> +#### Certificates on smartcards +If you have your certificate on a PIV-II smart card (e.g. Yubikey), first determine the slot on your card which contains the certificate you wish to use: + + pkcs11-tool -O + +Look for "ID:" in the output. + +Assuming the ID of your certificate was 07, specify the engine and certificate slot in your config file: + + + [https://gcsign.example.com/BCSign/] + engine=pkcs11 + user-key = 07 + + +You will be asked for your pin during signing. + +### Add URL schema + Section name is the percent-decoded value of `baseURL` in bc-digsign://sign?accessToken=…&baseUrl=https%3a%2f%2fgcsign.example.com%2fBCSign%2f&…' |
