CA.sh: change the output dir of p12 files to pki/pkcs

This commit is contained in:
Li Chen 2013-11-29 04:03:41 +01:00
parent 703da3eadf
commit b3fdeb0586

View File

@ -36,6 +36,7 @@ case $1 in
mkdir -p ${TOP_DIR}/crl
mkdir -p ${TOP_DIR}/newcerts
mkdir -p ${TOP_DIR}/private
mkdir -p ${TOP_DIR}/pkcs
touch ${TOP_DIR}/index.txt
ESCAPED=$(echo "${TOP_DIR}" | sed 's/[\/\.]/\\&/g')
@ -123,7 +124,7 @@ case $1 in
fi
# echo -e "${GREEN}Export the Client files to pkcs12${COLOR_RST}"
openssl pkcs12 -export -inkey ${2}.key -in ${2}.crt -name ${2} \
-passin pass:$pass -out ${2}.p12 -passout pass:$pass
-passin pass:$pass -out ${TOP_DIR}/pkcs/${2}.p12 -passout pass:$pass
if [ $? -ne 0 ]; then
echo -e "${RED}pkcs12 export failed${COLOR_RST} for $2"
exit 4