Sponsored Content
Top Forums Shell Programming and Scripting Shell script to create multiple OpenSSL Certificates Post 302548652 by krisarmstrong on Friday 19th of August 2011 02:07:52 AM
Old 08-19-2011
Request Client Certificate

openssl genrsa -out client512.key 512 openssl req -new -key client.key -out client512.csr -config openssl.cnf Sign Certifiicate

openssl x509 -req -days 365 -CA ca512.crt -CAkey ca512.key -CAcreateserial -in client512.csr -out client512512.crt

openssl x509 -req -days 365 -CA ca768.crt -CAkey ca768.key -CAcreateserial -in client512.csr -out client768512.crt

openssl x509 -req -days 365 -CA ca1024.crt -CAkey ca1024.key -CAcreateserial -in client512.csr -out client1024512.crt

And ETC down the list.
Then do the next client Cert of 768 and follow the same procedure and so on.

Hope that helps some.




 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

script to create multiple instances of a user account across LPAR's

My company has about 40 databases with each database in a different logical partition. Presently the SysAdmin person says it is necessary to create a user profile (login and password for each instance of databases on each LPAR. 1. Is it necessary that the user must be created in each LPAR? 2.... (1 Reply)
Discussion started by: kcampbell
1 Replies

2. UNIX Desktop Questions & Answers

trying to create a script with multiple variables...

I have created a script that prompts the user to enter three variables that are seperated by a space as the delimiter. It then performs a command 3 seperate times for each variable entered. I want the script to llow the user to enter as many variables as they may like and the script to... (5 Replies)
Discussion started by: Italy87
5 Replies

3. Shell Programming and Scripting

Need a Shell script to create Multiple User Accounts

Hi All, Am New to shell scripting , Can u please Help me to Create a shell script which Creates Multiple Users (say up to 250 users) ,am using Rehat server 5 enterprise Edition .. I am really in need of this script So tat i can save time and effort for this Job .. KIndly help me Please ... (1 Reply)
Discussion started by: rksubash
1 Replies

4. Shell Programming and Scripting

openssl shell script

HI :) I have a script with an encrypted file that will output the decrypted content. my question is, instead of printing it, how can I pass it to the python parser? I kept trying lots of ways.. no luck :( #!/bin/sh openssl enc -aes-256-cfb8 -a -d -pass pass:mypass<<EOF... (2 Replies)
Discussion started by: skeeter144
2 Replies

5. Shell Programming and Scripting

Need to develop a script to create a report reading multiple server logs

I am currently trying to develop a script to connect to mulltiple servers, reading specifc data from log files on the servers and append the data from each file into a single tab delimited row. So, at the end I am planning to have a report with all the extracted data with each row per server. I am... (5 Replies)
Discussion started by: scriptingnewbie
5 Replies

6. Programming

help need in the perl script that create one xml file form multiple files.

Hi every one, Please excuse me if any grammatical mistakes is there. I have multiple xml files in one directory, I need to create multiple XML files into one XML file.example files like this</p> file1:bvr.xml ... (0 Replies)
Discussion started by: veerubiji
0 Replies

7. Shell Programming and Scripting

Single script to create multiple directories

Hi , I want a script to create a directories at different locations. suppose i am on home/path/zone1. I want to create a directory of current month in this location. Then i want to create the same current month directory in home/path/zone2.like this for 9 diffrent zones. I can do this... (4 Replies)
Discussion started by: sv0081493
4 Replies

8. Shell Programming and Scripting

Need help to create multiple file using shell script

HI, i created the below script to create the multiple files, iam not getting the required output, Please advice. #!/bin/sh v_date=$1 # argument will come as daymonthyear eg : 151112 v_day=`echo $v_date | cut -c 1-2` v_mon=`echo $v_date | cut -c 3-4` v_year=`echo $v_date | cut -c 5-6`... (4 Replies)
Discussion started by: jagguvarma
4 Replies

9. Shell Programming and Scripting

Shell Script for viewing multiple logs from multiple server

I am new to Shell scripting and below is my requirement. I need to search some specific word e.g. "exception" or "transaction" from log file. We have multiple env e.g. Level1 , Level2 etc and each env have Multiple boxes e.g. For Level 1 env we have "test11.test.com" , "test12.test.com". Each... (1 Reply)
Discussion started by: peeyush
1 Replies

10. Shell Programming and Scripting

Create a UNIX script file with multiple commands

Hi Good morning all, I want to create script file with multiple commands. For ex: pmrep connect is one of the command to connect to repository. pmrep objectexport is another command to export objects to a file. These commands should run sequentially.But when i try to execute this, the first... (4 Replies)
Discussion started by: SekhaReddy
4 Replies
OPENSSL_CSR_SIGN(3)							 1						       OPENSSL_CSR_SIGN(3)

openssl_csr_sign - Sign a CSR with another certificate (or itself) and generate a certificate

SYNOPSIS
resource openssl_csr_sign (mixed $csr, mixed $cacert, mixed $priv_key, int $days, [array $configargs], [int $serial]) DESCRIPTION
openssl_csr_sign(3) generates an x509 certificate resource from the given CSR. Note You need to have a valid openssl.cnf installed for this function to operate correctly. See the notes under the installation section for more information. PARAMETERS
o $csr - A CSR previously generated by openssl_csr_new(3). It can also be the path to a PEM encoded CSR when specified as file://path/to/csr or an exported string generated by openssl_csr_export(3). o $cacert - The generated certificate will be signed by $cacert. If $cacert is NULL, the generated certificate will be a self-signed cer- tificate. o $priv_key -$priv_key is the private key that corresponds to $cacert. o $days -$days specifies the length of time for which the generated certificate will be valid, in days. o $configargs - You can finetune the CSR signing by $configargs. See openssl_csr_new(3) for more information about $configargs. o $serial - An optional the serial number of issued certificate. If not specified it will default to 0. RETURN VALUES
Returns an x509 certificate resource on success, FALSE on failure. EXAMPLES
Example #1 openssl_csr_sign(3) example - signing a CSR (how to implement your own CA) <?php // Let's assume that this script is set to receive a CSR that has // been pasted into a textarea from another page $csrdata = $_POST["CSR"]; // We will sign the request using our own "certificate authority" // certificate. You can use any certificate to sign another, but // the process is worthless unless the signing certificate is trusted // by the software/users that will deal with the newly signed certificate // We need our CA cert and its private key $cacert = "file://path/to/ca.crt"; $privkey = array("file://path/to/ca.key", "your_ca_key_passphrase"); $usercert = openssl_csr_sign($csrdata, $cacert, $privkey, 365); // Now display the generated certificate so that the user can // copy and paste it into their local configuration (such as a file // to hold the certificate for their SSL server) openssl_x509_export($usercert, $certout); echo $certout; // Show any errors that occurred here while (($e = openssl_error_string()) !== false) { echo $e . " "; } ?> PHP Documentation Group OPENSSL_CSR_SIGN(3)
All times are GMT -4. The time now is 03:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy