summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk@omgwallhack.org>2011-12-08 19:43:54 -0800
committerJoe Rayhawk <jrayhawk@omgwallhack.org>2011-12-08 19:43:54 -0800
commit4afcbf84726868ef35da6aaf7d50a841e6275d95 (patch)
treed3a48efcff31146eea23a6d4fee701a9bbb7de03
parent9f1ba206a6e5fb68680934b244f1a9377e894682 (diff)
downloadcash-4afcbf84726868ef35da6aaf7d50a841e6275d95.tar.gz
cash-4afcbf84726868ef35da6aaf7d50a841e6275d95.zip
SPKAC HTTP provisioning.
-rwxr-xr-xmailcert.sh2
-rwxr-xr-xsigncsr.sh4
2 files changed, 4 insertions, 2 deletions
diff --git a/mailcert.sh b/mailcert.sh
index 13c30f6..2e68bfd 100755
--- a/mailcert.sh
+++ b/mailcert.sh
@@ -88,7 +88,7 @@ $USERCERTNAME is your user certificate.
$CACERTNAME is the certificate authority certificate.
--$BOUNDARY
-Content-Type: application/x-x509-ca-cert
+Content-Type: application/x-x509-user-cert
Content-Disposition: attachment; filename="$USERCERTNAME"
$(cat "$USERCERT")
diff --git a/signcsr.sh b/signcsr.sh
index ca50b22..b48ad45 100755
--- a/signcsr.sh
+++ b/signcsr.sh
@@ -38,5 +38,7 @@ fi
if [ -e "$CA"/certs/"$SERIAL".pem ]; then # openssl lacks useful exit status codes, so we check to see if it actually did anything instead.
mv -i "$1" "$CA"/signed/$NAME.csr
ln "$CA"/certs/"$SERIAL".pem "$CA"/signed/"$NAME".crt # so we can find the certificate by name as well as serial
- echo "Use ./mailcert.sh $NAME [emailaddress] to use sendmail to deliver the CA and user certificate."
+ openssl x509 -in "$CA"/certs/"$SERIAL".pem -outform DER -out "$CA"/signed/"$NAME".der # Chrome compatible
+ echo "* Web: $CA/signed/$NAME.der with Content-type: application/x-x509-user-cert is suggested."
+ echo "* Email: use ./mailcert.sh $NAME [emailaddress] to use sendmail to deliver the CA and user certificate as PEM MIME attachments."
fi