Skip to content

Commit

Permalink
Add script to generate Java-compatible RSA Key Pair
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregor Billing committed Oct 1, 2020
1 parent 470ade8 commit 4e1ed13
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ tnoodle_pruning_cache/
version.tnoodle
*.hprof
gradle.properties
**/*.pkcs8.pem

.idea/
.vscode/
12 changes: 12 additions & 0 deletions genrsa.sh
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

0 comments on commit 4e1ed13

Please sign in to comment.