-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '[4] branding_special_chars'
- Loading branch information
Showing
17 changed files
with
51 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Build with: docker build -t yubiset_arch . | ||
# Run with: docker run -it yubiset_arch /bin/bash | ||
# Remove Container(s) on Windows: for /F "tokens=*" %i in ('docker ps -aqf "ancestor=yubiset_arch"') do docker rm -f %i | ||
# Remove Container(s) on Unix: docker rm -f $(docker ps -aqf "ancestor=yubiset_arch") | ||
# Remove with: docker image rm -f yubiset_arch | ||
|
||
FROM archlinux:latest | ||
|
||
RUN groupadd -r usergroup && useradd --no-log-init -r -g usergroup user | ||
RUN mkdir /home/user | ||
ADD yubiset /home/user/yubiset | ||
RUN find /home/user/yubiset -exec chown user:usergroup {} \; | ||
#rw-r--r-- | ||
RUN find /home/user/yubiset -type f -iname "*" -exec chmod 0644 {} \; | ||
#rwx-r--r-- | ||
RUN find /home/user/yubiset -type f -iname "*.sh" -exec chmod 740 {} \; | ||
USER user | ||
WORKDIR /home/user/yubiset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,9 @@ It generates ["the perfect key pair"](https://blog.eleven-labs.com/en/openpgp-al | |
|
||
The Yubikey is also provided with user info and PIN setup. | ||
|
||
The scripts do also feature a fully automatic heuristic for finding and setting up the correct (Windows) smart card slot device in case gpg does not find your Yubikey automatically. | ||
The scripts do also feature a fully automatic heuristic for finding and setting up the correct (Windows) smart card slot device in case gpg does not find your Yubikey automatically. | ||
|
||
*Remember:* On most installations, scripts may be interrupted by pressing Ctrl+C. | ||
|
||
- [YUBISET](#yubiset) | ||
- [What does it do?](#what-does-it-do) | ||
|
@@ -39,7 +41,7 @@ The scripts do also feature a fully automatic heuristic for finding and setting | |
* [README.md Table of Contents](#readmemd-table-of-contents) | ||
|
||
# Supported Environments | ||
* Windows (Batch) | ||
* Windows (CMD) | ||
* Windows ([git-bash](https://gitforwindows.org)) | ||
* Unix (Bash) | ||
|
||
|
@@ -72,7 +74,7 @@ The file is accompanied by the [SHA-512](https://en.wikipedia.org/wiki/SHA-2) ha | |
``` | ||
# This makes sure, you downloaded an exact copy of the release from GitHub. | ||
sha512sum -c yubiset_vt.t.t.test.201907042021.sha512 | ||
yubiset_vt.t.t.test.201907042021.zip: OK # This is the expected output. | ||
yubiset_vt.t.t.test.201907042021.zip: OK # This is the supposed output. | ||
``` | ||
|
||
|
@@ -100,7 +102,7 @@ gpg --import JanMosigItemisGitHub.asc | |
|
||
### Start here: Key generation & Yubikey setup (all in one script) | ||
``` | ||
cd windows\batch | ||
cd windows\cmd | ||
yubiset.bat | ||
``` | ||
In case your Yubikey does only support subkeys of 2048bit length (like the NEO), use `yubiset.bat 4` instead. | ||
|
@@ -110,7 +112,7 @@ The main script will use Powershell if it is available in order to hide the pass | |
The following scripts may be used standalone but are also called from the `yubiset` main script: | ||
#### Move PGP keys to Yubikey only | ||
``` | ||
cd windows\batch | ||
cd windows\cmd | ||
setupyubi.bat "Given Name Surname" "[email protected]" "PGP key id" "passphrase" | ||
``` | ||
|
||
|
@@ -119,18 +121,18 @@ If ```passphrase``` is omitted, it will be prompted for. The prompt will be hidd | |
#### Reset Yubikey's OpenPGP module | ||
**BE AWARE:** Only tested with Yubikey 4 NEO and Yubikey 5 | ||
``` | ||
cd windows\batch | ||
cd windows\cmd | ||
resetyubi.bat | ||
``` | ||
|
||
#### Find Yubikey Slot | ||
``` | ||
cd windows/batch | ||
cd windows\cmd | ||
findyubi.bat | ||
``` | ||
|
||
### Key Branding | ||
It is possible to "brand" your generated keys, i. e. give the user name and the comment a custom touch e. g. for your company. This can be controlled by editing the file `windows/batch/lib/branding.bat`. | ||
It is possible to "brand" your generated keys, i. e. give the user name and the comment a custom touch e. g. for your company. This can be controlled by editing the file `windows\cmd\lib\branding.bat`. | ||
|
||
The default will produce a key like this: | ||
|
||
|
@@ -162,6 +164,8 @@ sec rsa4096/0x94AF5E3D1575AC6A 2019-07-01 [C] [expires: 2020-06-30] | |
Key fingerprint = 3B90 7B16 76E6 9F6F 59D1 D103 94AF 5E3D 1575 AC6A | ||
uid [ultimate] Max Muster (itemis AG) (Vocational OpenPGP key of itemis AG's Max Muster) <[email protected]> | ||
``` | ||
|
||
*Be aware:* GPG does not support arbitrary charaters in key comments. Especially parantheses '(' and ')' will cause problems. On Windows some additional characters may cause trouble, e. g. * ? & or %. Don't use them. | ||
|
||
## Unix | ||
|
||
|
@@ -216,6 +220,8 @@ sec rsa4096/0x94AF5E3D1575AC6A 2019-07-01 [C] [expires: 2020-06-30] | |
uid [ultimate] Max Muster (itemis AG) (Vocational OpenPGP key of itemis AG's Max Muster) <[email protected]> | ||
``` | ||
|
||
*Be aware:* GPG does not support arbitrary charaters in key comments. Especially parantheses '(' and ')' will cause problems. Don't use them. | ||
|
||
### Override GPG Binaries | ||
Since the original bash scripts have been developed on Windows with git-bash and gpg4win, it was necessary to override the gpg binaries provided by git-bash with those of gpg4win. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
declare -r branded_user_name="${user_name}" | ||
declare -r branded_user_comment="" | ||
# Be aware: GPG does not support arbitrary charaters in key comments. Especially parantheses '(' and ')' will cause problems. Don't use them. | ||
declare -r branded_user_comment= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters