-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script to generate Java-compatible RSA Key Pair
- Loading branch information
Gregor Billing
committed
Oct 1, 2020
1 parent
470ade8
commit 4e1ed13
Showing
2 changed files
with
13 additions
and
0 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 |
---|---|---|
|
@@ -22,6 +22,7 @@ tnoodle_pruning_cache/ | |
version.tnoodle | ||
*.hprof | ||
gradle.properties | ||
**/*.pkcs8.pem | ||
|
||
.idea/ | ||
.vscode/ |
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,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
openssl genrsa -out tnoodle_private.pem 4096 | ||
openssl rsa -pubout -in tnoodle_private.pem -out tnoodle_public.pem | ||
openssl pkcs8 -topk8 -in tnoodle_private.pem -inform pem -out tnoodle_private.pkcs8.pem -outform pem -nocrypt | ||
|
||
mv tnoodle_public.pem tnoodle-server/src/main/resources/rsa/ | ||
rm tnoodle_private.pem | ||
|
||
grep -v "^wca.wst.signature-private-key" gradle.properties > gradle.properties.tmp | ||
echo "wca.wst.signature-private-key=tnoodle_private.pkcs8.pem" >> gradle.properties.tmp | ||
mv gradle.properties.tmp gradle.properties |