-
-
Save peterkuiper/ed8d382f196f32b9ca2208f2bffea6e7 to your computer and use it in GitHub Desktop.
Revisions
-
rynop revised this gist
Dec 3, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,4 +22,4 @@ USERS_DIR="${SSL_CERTS_DIR}/users" openssl ca -name ${CA_NAME} -revoke ${USERS_DIR}/${USERNAME}.crt -keyfile $SSL_PRIVATE_DIR/ca.key -cert $SSL_CERTS_DIR/ca.crt # Update the Certificate Revocation list for removing 'user certificates.' openssl ca -name ${CA_NAME} -gencrl -keyfile $SSL_PRIVATE_DIR/ca.key -cert $SSL_CERTS_DIR/ca.crt -out $SSL_PRIVATE_DIR/ca.crl -crldays 1095 -
rynop created this gist
Nov 26, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ #!/bin/bash function usage () { echo "$0 [CA section name] [username]" exit 1 } if [ $# -ne 2 ] then usage fi CA_NAME="$1" USERNAME="$2" SSL_DIR="/etc/ssl" SSL_PRIVATE_DIR="$SSL_DIR/${CA_NAME}/private" SSL_CERTS_DIR="$SSL_DIR/${CA_NAME}/certs" USERS_DIR="${SSL_CERTS_DIR}/users" # Revoke a particular user's certificate. openssl ca -name ${CA_NAME} -revoke ${USERS_DIR}/${USERNAME}.crt -keyfile $SSL_PRIVATE_DIR/ca.key -cert $SSL_CERTS_DIR/ca.crt # Update the Certificate Revocation list for removing 'user certificates.' openssl ca -name ${CA_NAME} -gencrl -keyfile $SSL_PRIVATE_DIR/ca.key -cert $SSL_CERTS_DIR/ca.crt -out $SSL_PRIVATE_DIR/ca.crl -crldays 7