Skip to content

Conversation

@YipingXiongTG
Copy link
Contributor

@YipingXiongTG YipingXiongTG commented Feb 16, 2023

ssl_generate.sh
image

if command is empty:
image

  1. generate root CA
    image

  2. generate keystore
    image

  3. generate truststore
    image

  4. generate subordinate CA
    image

ssl_import.sh
image

  1. import privateKey-ca pair to keystore
    image

  2. import certificate to truststore
    image

@shuxiny
Copy link

shuxiny commented Feb 16, 2023

--import_to_keystore import CA to keystore

Unlike truststore (which just need root-CA certificate), we need to import private-key and certificate-chain (bundled together) into keystore.

--gen_CARoot generate CA and private key
private-key -> its' private-key, "private key" has many occurrences. It would be nice to explictly say this private key is about the root CA.

@shuxiny
Copy link

shuxiny commented Feb 16, 2023

As to subordninate CA generation, it does not have to be signed by root-CA. In the case of multiple intermediate CA, the subordinate CA is signed by supervior CA, which isn't not necessarilly root-CA.

Overall the interface LGTM.

Copy link

@dadongwang-tg dadongwang-tg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ssl_generate.sh: only generate CA (root, sub), key-store, or trust store
ssl_import.sh: only import key/trust store

help_flag=""

opt_string="hip:c:s:o:n:"
opt_long_string="help,gen_CARoot,gen_subCA,gen_keystore,gen_truststore,passphrase:,output:,storepass:,storetype:,cer:,cerKey:,CN:,name:"
Copy link

@dadongwang-tg dadongwang-tg Feb 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if user don't provide any options, it is default behavior as below:
(1) ./ssl_generate.sh
<==>
./ssl_generate.sh --gen_CARoot --gen_keystore --gen_truststore

(2) ./ssl_generate.sh --CN <DN name>
./ssl_generate.sh --gen_CARoot --CN <DN name> --gen_keystore --gen_truststore

Copy link

@dadongwang-tg dadongwang-tg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add one more file ssl_generate_import_examples.sh:
e.g. 1. [WARN] clean up, ...
step 1. ./ssl_generate.sh
step 2. ./ssl_import.sh from default SSL_files
[step 3. check the outputs ]

e.g. 2, ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants