2016-04-05 00:19:21 +00:00
|
|
|
#!/usr/bin/env bash
|
2016-06-12 17:48:33 +00:00
|
|
|
|
|
|
|
set -e;
|
|
|
|
|
2016-04-05 00:19:21 +00:00
|
|
|
BASEDIR="$(dirname $(realpath $0))/../";
|
2016-06-12 17:48:33 +00:00
|
|
|
cd "${BASEDIR}";
|
|
|
|
STORAGE="$(realpath "${BASEDIR}/storage/ca")";
|
2016-04-05 00:19:21 +00:00
|
|
|
|
2016-06-12 17:48:33 +00:00
|
|
|
mkdir -p "${STORAGE}/certs";
|
2016-04-05 00:19:21 +00:00
|
|
|
|
2016-06-12 17:48:33 +00:00
|
|
|
echo 01 > "${STORAGE}/serial";
|
|
|
|
echo 01 > "${STORAGE}/crl_serial";
|
|
|
|
touch "${STORAGE}/database";
|
|
|
|
touch "${STORAGE}/database.attr";
|
2016-04-05 00:19:21 +00:00
|
|
|
|
2016-06-12 17:48:33 +00:00
|
|
|
"${BASEDIR}/bin/create-ca" $1;
|
|
|
|
"${BASEDIR}/bin/create-crl";
|