openssl pkcs12 -in /var/www/html/$3/LibFE/firmarDTE/$1"".p12 -nocerts -out /var/www/html/$3/LibFE/firmarDTE/key.pem -nodes -passin pass:$2
openssl pkcs12 -in /var/www/html/$3/LibFE/firmarDTE/$1"".p12 -nokeys -out /var/www/html/$3/LibFE/firmarDTE/crt.pem -passin pass:$2
openssl rsa -in /var/www/html/$3/LibFE/firmarDTE/key.pem -out /var/www/html/$3/LibFE/firmarDTE/server.key
cp /var/www/html/$3/LibFE/firmarDTE/$1"".p12 /var/www/html/$3/LibFE/firmarDTE/$1"".pfx
rm -f /var/www/html/$3/LibFE/firmarDTE/$1"".p12
