Fix up whitespace in 1.0 as well.

This commit is contained in:
Andy Brody 2013-05-22 14:30:40 -07:00
parent 4236454f93
commit 988f5e39a9
14 changed files with 85 additions and 85 deletions

View File

@ -5,9 +5,9 @@
# #
if test $KEY_DIR; then if test $KEY_DIR; then
cd $KEY_DIR && \ cd $KEY_DIR && \
openssl req -days 3650 -nodes -new -x509 -keyout ca.key -out ca.crt -config $KEY_CONFIG && \ openssl req -days 3650 -nodes -new -x509 -keyout ca.key -out ca.crt -config $KEY_CONFIG && \
chmod 0600 ca.key chmod 0600 ca.key
else else
echo you must define KEY_DIR echo you must define KEY_DIR
fi fi

View File

@ -6,14 +6,14 @@
# #
if test $# -ne 1; then if test $# -ne 1; then
echo "usage: build-inter <name>"; echo "usage: build-inter <name>";
exit 1 exit 1
fi fi
if test $KEY_DIR; then if test $KEY_DIR; then
cd $KEY_DIR && \ cd $KEY_DIR && \
openssl req -days 3650 -nodes -new -keyout $1.key -out $1.csr -config $KEY_CONFIG && \ openssl req -days 3650 -nodes -new -keyout $1.key -out $1.csr -config $KEY_CONFIG && \
openssl ca -extensions v3_ca -days 3650 -out $1.crt -in $1.csr -config $KEY_CONFIG openssl ca -extensions v3_ca -days 3650 -out $1.crt -in $1.csr -config $KEY_CONFIG
else else
echo you must define KEY_DIR echo you must define KEY_DIR
fi fi

View File

@ -6,15 +6,15 @@
# #
if test $# -ne 1; then if test $# -ne 1; then
echo "usage: build-key <name>"; echo "usage: build-key <name>";
exit 1 exit 1
fi fi
if test $KEY_DIR; then if test $KEY_DIR; then
cd $KEY_DIR && \ cd $KEY_DIR && \
openssl req -days 3650 -nodes -new -keyout $1.key -out $1.csr -config $KEY_CONFIG && \ openssl req -days 3650 -nodes -new -keyout $1.key -out $1.csr -config $KEY_CONFIG && \
openssl ca -days 3650 -out $1.crt -in $1.csr -config $KEY_CONFIG && \ openssl ca -days 3650 -out $1.crt -in $1.csr -config $KEY_CONFIG && \
chmod 0600 $1.key chmod 0600 $1.key
else else
echo you must define KEY_DIR echo you must define KEY_DIR
fi fi

View File

@ -6,15 +6,15 @@
# #
if test $# -ne 1; then if test $# -ne 1; then
echo "usage: build-key-pass <name>"; echo "usage: build-key-pass <name>";
exit 1 exit 1
fi fi
if test $KEY_DIR; then if test $KEY_DIR; then
cd $KEY_DIR && \ cd $KEY_DIR && \
openssl req -days 3650 -new -keyout $1.key -out $1.csr -config $KEY_CONFIG && \ openssl req -days 3650 -new -keyout $1.key -out $1.csr -config $KEY_CONFIG && \
openssl ca -days 3650 -out $1.crt -in $1.csr -config $KEY_CONFIG && \ openssl ca -days 3650 -out $1.crt -in $1.csr -config $KEY_CONFIG && \
chmod 0600 $1.key chmod 0600 $1.key
else else
echo you must define KEY_DIR echo you must define KEY_DIR
fi fi

View File

@ -6,16 +6,16 @@
# the CA certificate as well. # the CA certificate as well.
if test $# -ne 1; then if test $# -ne 1; then
echo "usage: build-key-pkcs12 <name>"; echo "usage: build-key-pkcs12 <name>";
exit 1 exit 1
fi fi
if test $KEY_DIR; then if test $KEY_DIR; then
cd $KEY_DIR && \ cd $KEY_DIR && \
openssl req -days 3650 -nodes -new -keyout $1.key -out $1.csr -config $KEY_CONFIG && \ openssl req -days 3650 -nodes -new -keyout $1.key -out $1.csr -config $KEY_CONFIG && \
openssl ca -days 3650 -out $1.crt -in $1.csr -config $KEY_CONFIG && \ openssl ca -days 3650 -out $1.crt -in $1.csr -config $KEY_CONFIG && \
openssl pkcs12 -export -inkey $1.key -in $1.crt -certfile ca.crt -out $1.p12 && \ openssl pkcs12 -export -inkey $1.key -in $1.crt -certfile ca.crt -out $1.p12 && \
chmod 0600 $1.key $1.p12 chmod 0600 $1.key $1.p12
else else
echo you must define KEY_DIR echo you must define KEY_DIR
fi fi

View File

@ -8,15 +8,15 @@
# extension in the openssl.cnf file. # extension in the openssl.cnf file.
if test $# -ne 1; then if test $# -ne 1; then
echo "usage: build-key-server <name>"; echo "usage: build-key-server <name>";
exit 1 exit 1
fi fi
if test $KEY_DIR; then if test $KEY_DIR; then
cd $KEY_DIR && \ cd $KEY_DIR && \
openssl req -days 3650 -nodes -new -keyout $1.key -out $1.csr -extensions server -config $KEY_CONFIG && \ openssl req -days 3650 -nodes -new -keyout $1.key -out $1.csr -extensions server -config $KEY_CONFIG && \
openssl ca -days 3650 -out $1.crt -in $1.csr -extensions server -config $KEY_CONFIG && \ openssl ca -days 3650 -out $1.crt -in $1.csr -extensions server -config $KEY_CONFIG && \
chmod 0600 $1.key chmod 0600 $1.key
else else
echo you must define KEY_DIR echo you must define KEY_DIR
fi fi

View File

@ -8,7 +8,7 @@
if test $# -ne 1; then if test $# -ne 1; then
echo "usage: build-req <name>"; echo "usage: build-req <name>";
exit 1 exit 1
fi fi
if test $KEY_DIR; then if test $KEY_DIR; then
cd $KEY_DIR && \ cd $KEY_DIR && \

View File

@ -8,7 +8,7 @@
if test $# -ne 1; then if test $# -ne 1; then
echo "usage: build-req-pass <name>"; echo "usage: build-req-pass <name>";
exit 1 exit 1
fi fi
if test $KEY_DIR; then if test $KEY_DIR; then
cd $KEY_DIR && \ cd $KEY_DIR && \

View File

@ -9,11 +9,11 @@
d=$KEY_DIR d=$KEY_DIR
if test $d; then if test $d; then
rm -rf $d rm -rf $d
mkdir $d && \ mkdir $d && \
chmod go-rwx $d && \ chmod go-rwx $d && \
touch $d/index.txt && \ touch $d/index.txt && \
echo 01 >$d/serial echo 01 >$d/serial
else else
echo you must define KEY_DIR echo you must define KEY_DIR
fi fi

View File

@ -6,13 +6,13 @@
# #
if test $# -ne 1; then if test $# -ne 1; then
echo "usage: list-crl <crlfile.pem>"; echo "usage: list-crl <crlfile.pem>";
exit 1 exit 1
fi fi
if test $KEY_DIR; then if test $KEY_DIR; then
cd $KEY_DIR && \ cd $KEY_DIR && \
openssl crl -text -noout -in $1 openssl crl -text -noout -in $1
else else
echo you must define KEY_DIR echo you must define KEY_DIR
fi fi

View File

@ -6,13 +6,13 @@
# #
if test $# -ne 1; then if test $# -ne 1; then
echo "usage: make-crl <crlfile.pem>"; echo "usage: make-crl <crlfile.pem>";
exit 1 exit 1
fi fi
if test $KEY_DIR; then if test $KEY_DIR; then
cd $KEY_DIR && \ cd $KEY_DIR && \
openssl ca -gencrl -out $1 -config $KEY_CONFIG openssl ca -gencrl -out $1 -config $KEY_CONFIG
else else
echo you must define KEY_DIR echo you must define KEY_DIR
fi fi

View File

@ -6,13 +6,13 @@
# #
if test $# -ne 1; then if test $# -ne 1; then
echo "usage: revoke-crt <file.crt>"; echo "usage: revoke-crt <file.crt>";
exit 1 exit 1
fi fi
if test $KEY_DIR; then if test $KEY_DIR; then
cd $KEY_DIR && \ cd $KEY_DIR && \
openssl ca -revoke $1 -config $KEY_CONFIG openssl ca -revoke $1 -config $KEY_CONFIG
else else
echo you must define KEY_DIR echo you must define KEY_DIR
fi fi

View File

@ -7,23 +7,23 @@ CRL=crl.pem
RT=revoke-test.pem RT=revoke-test.pem
if test $# -ne 1; then if test $# -ne 1; then
echo "usage: revoke-full <name>"; echo "usage: revoke-full <name>";
exit 1 exit 1
fi fi
if test $KEY_DIR; then if test $KEY_DIR; then
cd $KEY_DIR cd $KEY_DIR
rm -f $RT rm -f $RT
# revoke key and generate a new CRL # revoke key and generate a new CRL
openssl ca -revoke $1.crt -config $KEY_CONFIG openssl ca -revoke $1.crt -config $KEY_CONFIG
# generate a new CRL # generate a new CRL
openssl ca -gencrl -out $CRL -config $KEY_CONFIG openssl ca -gencrl -out $CRL -config $KEY_CONFIG
cat ca.crt $CRL >$RT cat ca.crt $CRL >$RT
# verify the revocation # verify the revocation
openssl verify -CAfile $RT -crl_check $1.crt openssl verify -CAfile $RT -crl_check $1.crt
else else
echo you must define KEY_DIR echo you must define KEY_DIR
fi fi

View File

@ -6,13 +6,13 @@
# #
if test $# -ne 1; then if test $# -ne 1; then
echo "usage: sign-req <name>"; echo "usage: sign-req <name>";
exit 1 exit 1
fi fi
if test $KEY_DIR; then if test $KEY_DIR; then
cd $KEY_DIR && \ cd $KEY_DIR && \
openssl ca -days 3650 -out $1.crt -in $1.csr -config $KEY_CONFIG openssl ca -days 3650 -out $1.crt -in $1.csr -config $KEY_CONFIG
else else
echo you must define KEY_DIR echo you must define KEY_DIR
fi fi