Commit ac6abac0 authored by Sara Bertocco's avatar Sara Bertocco
Browse files

Key creation example added

parent 65aac860
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -2,4 +2,25 @@
The key can be generated using
core/cadc-util/src/main/java/ca/nrc/cadc/util/RsaSignatureGenerator.java
check comments online.

Usage example:

cd my_dir
git clone https://github.com/opencadc/core
export JAVA_HOME=/usr/lib/jvm/java-openjdk
cd core/cadc-util
gradle build
cd ../cadc-log
gradle build
$] export CLASSPATH=/root/lib/cadc-util.jar:/root/lib/log4j-1.2.17.jar
$] mkdir my_key_dir
$] java ca.nrc.cadc.util.RsaSignatureGenerator my_key_dir
Done
$] ls -al my_key_dir/
total 16
drwxr-xr-x   2 root root   59 Feb  1 13:08 .
dr-xr-x---. 34 root root 4096 Feb  1 13:08 ..
-rw-r--r--   1 root root  914 Feb  1 13:08 RsaSignaturePriv.key
-rw-r--r--   1 root root  271 Feb  1 13:08 RsaSignaturePub.key

-----END PRIVATE KEY-----
+21 −0
Original line number Diff line number Diff line
@@ -2,4 +2,25 @@
The key can be generated using
core/cadc-util/src/main/java/ca/nrc/cadc/util/RsaSignatureGenerator.java
check comments online.

Usage example:

cd my_dir
git clone https://github.com/opencadc/core
export JAVA_HOME=/usr/lib/jvm/java-openjdk
cd core/cadc-util
gradle build
cd ../cadc-log
gradle build
$] export CLASSPATH=/root/lib/cadc-util.jar:/root/lib/log4j-1.2.17.jar
$] mkdir my_key_dir
$] java ca.nrc.cadc.util.RsaSignatureGenerator my_key_dir
Done
$] ls -al my_key_dir/
total 16
drwxr-xr-x   2 root root   59 Feb  1 13:08 .
dr-xr-x---. 34 root root 4096 Feb  1 13:08 ..
-rw-r--r--   1 root root  914 Feb  1 13:08 RsaSignaturePriv.key
-rw-r--r--   1 root root  271 Feb  1 13:08 RsaSignaturePub.key

-----END PUBLIC KEY-----