Ich habe das Script für die Client-Zertifikat erstellung angepasst, damit man ganz einfach weitere Zertifikate erstellen kann.
BITTE BEACHTEN DIE ZERTIFIKATE DIE HIERMIT ERSTELLT WERDEN GELTEN NUR 360 TAGE
Sonst bitte den Wert
auf -
setzen
Code
@echo off
@echo off
rem Edit this variable to point to
rem the openssl.cnf file included
rem with easy-rsa.
set HOME=%ProgramFiles%\OpenVPN\easy-rsa
set KEY_CONFIG=openssl.cnf
rem Edit this variable to point to
rem your soon-to-be-created key
rem directory.
rem
rem WARNING: clean-all will do
rem a rm -rf on this directory
rem so make sure you define
rem it correctly!
set KEY_DIR=keys
rem Increase this to 2048 if you
rem are paranoid. This will slow
rem down TLS negotiation performance
rem as well as the one-time DH parms
rem generation process.
set KEY_SIZE=2048
rem These are the default values for fields
rem which will be placed in the certificate.
rem Change these to reflect your site.
rem Don't leave any of these parms blank.
set KEY_COUNTRY=DE
set KEY_PROVINCE=NRW
set KEY_CITY=Duesseldorf
set KEY_ORG=FrancaTradingGmbH
set KEY_EMAIL=daniel.dietz@traders-alliance.de
cd %HOME%
rem build a request for a cert that will be valid for one year
openssl req -days 360 -nodes -new -keyout %KEY_DIR%\%1.key -out %KEY_DIR%\%1.csr -config %KEY_CONFIG%
rem sign the cert request with our ca, creating a cert/key pair
openssl ca -extensions client -days 360 -out %KEY_DIR%\%1.crt -in %KEY_DIR%\%1.csr -config %KEY_CONFIG%
rem convert the key/cert and embed the ca cert into a pkcs12 file.
openssl pkcs12 -export -inkey %KEY_DIR%\%1.key -in %KEY_DIR%\%1.crt -certfile %KEY_DIR%\ca.crt -out %KEY_DIR%\%1.p12
rem delete any .old files created in this process, to avoid future file creation errors
del /q %KEY_DIR%\*.old
Alles anzeigen