Sponsored Content
Top Forums Shell Programming and Scripting Shell script to create multiple OpenSSL Certificates Post 302548583 by krisarmstrong on Thursday 18th of August 2011 07:51:44 PM
Old 08-18-2011
Question Shell script to create multiple OpenSSL Certificates

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.

Thanks for any and all help on this.
 

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
lprng_certs(1)							lprng_certs command						    lprng_certs(1)

NAME
lprng_certs - lprng SSL certificate management SYNOPSIS
lprng_certs option Options: init - make directory structure newca - make new root CA defaults - set new default values for certs gen - generate user, server, or signing cert index [dir] - index cert files verify [cert] - verify cert file encrypt keyfile - set or change keyfile password DESCRIPTION
The lprng_certs program is used to manage SSL certificates for the LPRng software. There SSL certificate structure consists of a hierarchy of certificates. The LPRng software assumes that the following types of certificates will be used: CA or root A top level or self-signed certificate. signing A certificate that can be used to sign other certificates. This is signed by the root CA or another signing certificate. user A certificate used by a user to identify themselves to the lpd server. server A certificate used by the lpd server to identify themselves to the user or other lpd servers. Signing Certificates All of the signing certificates, including the root certificate (root CA), /etc/lprng/ssl.ca/ca.crt, are in the same directory as the root CA file. Alternately, all of the signing certs can be concatenated and put into a single file, which by convention is assumed to have the same name as the root CA file, /etc/lprng/ssl.ca/ca.crt. The ssl_ca_file, ssl_ca_path, and ssl_ca_key printcap and configuration options can be used to specify the locations of the root CA files, a directory containing the signing certificate files, and the private key file for the root CA file respectively. The root certificate (root CA file) /etc/lprng/ssl.ca/ca.crt has a private key file /etc/lprng/ssl.ca/ca.key as well. By convention, the private keys for the other signing certificate files are stored in the certificate file. The OpenSSL software requires that this directory also contain a set of hash files which are, in effect, links to these files. By default, all signing certificates are assumed to be in the same directory as the root certificate. Server Certificates The certificate used by the lpd server are kept in another directory. These files do not need to have hash links to them. By convention, the private keys for these certificate files are stored in the certificate file. The server certificate file is specified by the ssl_server_cert and has the default value /etc/lprng/ssl.server/server.crt. This file contains the cert and private key. The server cer- tificate password file is specified by the ssl_server_password option with the default value and contains the password used to decrypt the servers private key and use it for authentication. This key file should be read only by the lpd server. User Certificates The certificates used by users are kept in a separate directory in the users home directory. By convention, the private keys for these certificate files are stored in the certificate file. The user certificate file is specified by the LPR_SSL_FILE environment variable, otherwise the ${HOME}/.lpr/client.crt is used. The pass- word is taken from the file specified by the LPR_SSL_PASSWORD environment variable, otherwise the ${HOME}/.lpr/client.pwd file is read. USING LPRNG_CERTS The organization of the SSL certificates used by LPRng is similar to that used by other programs such as the Apache mod_ssl support. The lprng_certs program is used to create the directory structure, create certificates for the root CA, signing, user and servers. In order to make management simple, the following support is provided. lprng_certs init This command creates the directories used by the lpd server. It is useful when setting up a new lpd server. lprng_certs newca This command creates a self-signed certificate, suitable for use as a root CA certificate. It also sets up a set of default values for other certificate creation. lprng_certs defaults This command is used to modify the set of default values. The default values are listed and should be self-explanatory, except for the value of the signer certificate. By default, the root CA can be used to sign certificates. However, a signing certificate can be used as well. This allows delegation of signing authority without compromising the security of the root CA. lprng_certs gen This is used to generate a user, server, or signing certificate. lprng_certs index This is used to create the indexes for the signing certificates. lprng_certs verify [cert] This checks the certificate file using the Openssl openssl verify command. lprng_certs encrypt keyfile This removes all key information from the key file, reencrypts the key information, and the puts the encrypted key information in the file. LPRng OPTIONS Option Purpose ssl_ca_path directory holding the SSL signing certs ssl_ca_file file holding the root CA or all SSL signing certs ssl_server_cert cert file for the server ssl_server_password file containing password for server server ${HOME}/.lpr/client.crt client certificate file ${HOME}/.lpr/client.pwd client certificate private key password ENVIRONMENT VARIABLES
LPR_SSL_FILE client certificate file LPR_SSL_PASSWORD client certificate private key password EXIT STATUS
The following exit values are returned: zero (0) Successful completion. non-zero (!=0) An error occurred. SEE ALSO
lpd.conf(5), lpc(8), lpd(8), checkpc(8), lpr(1), lpq(1), lprm(1), printcap(5), lpd.conf(5), pr(1), lprng_certs(1), lprng_index_certs(1). AUTHOR
Patrick Powell <papowell@lprng.com>. HISTORY
LPRng is a enhanced printer spooler system with functionality similar to the Berkeley LPR software. The LPRng developer mailing list is lprng-devel@lists.sourceforge.net; subscribe by visiting https://lists.sourceforge.net/lists/listinfo/lprng-devel or sending mail to lprng- request@lists.sourceforge.net with the word subscribe in the body. The software is available via http://lprng.sourceforge.net LPRng 2006-12-09 lprng_certs(1)
All times are GMT -4. The time now is 08:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy