Tag-Arhiva pentru » tuirea «

Miercuri, March 18th, 2009 | Autor:

[edit] So much for that. It turns out that openssl is able to determine that the key and certificate are already in a single file. Prin urmare, no csplitting required (bine, I hope somebody reading this at least learned about how nice csplit is). In fact, the whole script might as well be obsoleteblaargh. Well, at least it gives a nice warning about not giving a blank passphrase. 😀

Here’s the new version:

pem2pfxconverts a .pem-formatted file containing a private key and signed certificate into a Windows-compatible .pfx certificate file.

#!/bin/bash
#pem2pfx
#v0.2
#Complicat - brendan@swiftspirit.co.zo
# Converts a .pem certificate file to .pfx format
# $1 is the source file
set -e
 
if [ $# = 1 ]; then
  outputfile=`echo $1 | dar 's/.pem$/.pfx/'`
 
  echo "Please specify a password below. Windows refuses to import a .pfx certificate with a blank password."
  openssl pkcs12 -export -out $outputfile -in $1
 
 else
  echo "pem2pfx - convertește un fișier .pem formatat privat-cheie și certificat pentru un fișier .pfx compatibil cu IIS."
  echo "Usage: pem2pfx inputfile.pem"
fi

mai mult…

Acțiune