I need to create a script that will generate a bunch of OpenSSL Certificates signed by my own CA. The certificates being generated are for testing purposes only. But what I need is the following
Root CA
512
768
1024
1280
1536
1792
2048
4096
I need basically 64 combinations. Each root CA must sign each possible client CA of 512, 768, 1024, 1280, 1536, 1792, 2048 and 4096. for example
ROOT CA 512 to Client CA 512, 768, etc
ROOT CA 768 to Client CA 512, 768 etc
I'm not sure how to go about the script. Suggestions at this point would be of great help. Bash, or Perl would be fine.
Can you give an example for step by step certification creation in normal scenario without any script? That would help better to understand requirement and feasibility of script.
Thanks
Ok thanks for the reply. So I decided to try and automate the creation of the ROOT CA as well. Then I will continue on with the Clients Certs. Please take a look below its almost there but not quite working.
There errors are
./Root_CA_Create.sh
./Root_CA_Create.sh: line 2: 768: command not found
./Root_CA_Create.sh: line 3: 768: command not found
./Root_CA_Create.sh: line 5: /home/kris/Certs/Root-CA/private: Is a directory
./Root_CA_Create.sh: line 6: /home/kris/Certs/Root-CA: Is a directory
./Root_CA_Create.sh: line 7: /home/kris/Certs/Client/private: Is a directory
./Root_CA_Create.sh: line 8: /home/kris/Certs/Client: Is a directory
./Root_CA_Create.sh: line 9: /home/kris/Certs/Root-CA/conf: Is a directory
./Root_CA_Create.sh: line 15: `$RootCA': not a valid identifier
./Root_CA_Create.sh: line 16: syntax error near unexpected token `done'
./Root_CA_Create.sh: line 16: `done'
---------- Post updated at 02:47 PM ---------- Previous update was at 12:23 PM ----------
Ok I'm very close here. The script is now creating all the RootCA certificates but it only creats 8 of the client certificates. Because its only signing them with the last RootCA of 4096. I need it to sign each one with each RootCA as well. I see why its happening just not sure how to fix it. I followed the logic so I get why it happens just not sure how to correct yet.