1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#! /bin/bash
cd $(dirname $0)
KEYS_DIR=./keys
if [ "$#" != 1 ]; then
echo "Usage: $0 <profile>"
exit 1
fi
test -d ${KEYS_DIR} || mkdir -p ${KEYS_DIR}
profile=$1
openssl pkey -in ${KEYS_DIR}/"${profile}.pem" -pubout -out ${KEYS_DIR}/"${profile}-pub.pem"
|