openSSL auf Windows server

delta544

Member
Hallo,

ich teste hier schon seit einigen Tagen mit openSSL auf Windows herum.
Ich hab mittlerweile das Gefühl das die derzeitige openSSL für Windows für´n A.... ist.

Oder ich bin einfach nur zu blöd das richtig zu konfigurieren.

Meine derzeitige openSSL.cfg sieht so aus:

Code:
HOME			= .
RANDFILE		= $ENV::HOME/.rnd
oid_section		= new_oids

[ new_oids ]
tsa_policy1 = 1.2.3.4.1
tsa_policy2 = 1.2.3.4.5.6
tsa_policy3 = 1.2.3.4.5.7

[ ca ]

[ CA_default ]

email_in_dn = no
name_opt                = ca_default
cert_opt                = ca_default

policy		= policy_match

[ policy_match ]
countryName		= supplied
stateOrProvinceName	= supplied
organizationName	= supplied
organizationalUnitName	= optional
commonName		= supplied
emailAddress		= optional

[ policy_anything ]
countryName		= optional
stateOrProvinceName	= optional
localityName		= optional
organizationName	= optional
organizationalUnitName	= optional
commonName		= supplied
emailAddress		= optional

[ req ]
default_bits		= 2048
default_keyfile 	= C:\\OpenSSL-Win64\\bin\\PEM\\demoCA\\cakey.pem
distinguished_name	= req_distinguished_name
attributes		= req_attributes
string_mask = utf8only


[ req_distinguished_name ]
countryName			= Country Name (2 letter code)
countryName_default		= DE
countryName_min			= 2
countryName_max			= 2

stateOrProvinceName		= State or Province Name (full name)
stateOrProvinceName_default	= Niedersachsen

localityName			= Locality Name (eg, city)
localityName_default			= Testhausen

0.organizationName		= Organization Name (eg, company)
0.organizationName_default	= DieFirma


organizationalUnitName		= Organizational Unit Name (eg, section)

commonName			= Common Name (e.g. server FQDN or YOUR name)
commonName_max			= 64

emailAddress			= Email Address
emailAddress_max		= 64


[ req_attributes ]
challengePassword		= A challenge password
challengePassword_min		= 4
challengePassword_max		= 20

unstructuredName		= An optional company name

[ usr_cert ]

basicConstraints=CA:FALSE

keyUsage = nonRepudiation, digitalSignature, keyEncipherment

nsComment			= "OpenSSL Generated Certificate with CRL"

subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid,issuer
extendedKeyUsage = serverAuth

subjectAltName=@alt_names

[ alt_names ]
DNS.0                   = iR-ADV8285.dev.lab.dieFirma.global
DNS.1                   = iR-ADV8285
IP.2                    = 10.129.66.167


[ extensions_section ]
nsCaRevocationUrl		= http://www.domain.dom/ca-crl.pem
nsBaseUrl			=test
nsRevocationUrl		= URI:http://10.120.55.24/root1.crl
crlDistributionPoints = URI:http://10.120.44.24/root2.crl
crlDistributionPoints=URI:http://10.120.33.24/root3.crl
nsRenewalUrl=tedt	


[ v3_req ]
basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment


[ v3_ca ]
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid:always,issuer
basicConstraints = CA:true



[ crl_ext ]


authorityKeyIdentifier=keyid:always

[ proxy_cert_ext ]

basicConstraints=CA:FALSE
nsComment			= "OpenSSL Generated Certificate"
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid,issuer

nsCaRevocationUrl		= URI:http://10.120.55.24/root.crl
crlDistributionPoints=URI:http://10.120.44.24/root.crl

proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo

[ tsa ]


[ tsa_config1 ]

Diese CFG basiert auf der Original Windows CFG, die Kommentarzeichen wurden entfernt.
Ich brauche ein openSSL generiertes Zertifikat mit CRL.
Aber egal was ich auch mache, openSSL ignoriert alle diesbzgl. Einstellungen.
openSSL ignoriert auch die meisten 'Order' Einstellungen, selbst wenn man die so wie ich fest vorgibt.

Ich brauche, wenn ich das richtig verstanden habe, eigentlich nur den Eintrag
crlDistributionPoints=URI:http://10.120.33.24/root3.crl (hier sind alle verfügbaren unkommentiert, für Testzwecke) aber kein Zertifikat enthält eine Revokation URL.

Was zum Teufel geht hier falsch, oder wie kann ich openSSL zwingen eine Revokation URL zu einem Zertifikat hinzu zu fügen?

gruss,
delta544
 
Kann sein, dass ich mich täusche, aber fehlt im Abschnitt CA_default nicht ein
Code:
x509_extensions = extensions_section

--
.A.
 
Hmm,

komisch, ich glaub da ist beim Entfernen der Kommentarzeilen was schief gelaufen.
Eigentlich sollte dort unter x509_extensions
x509_extensions = usr_cert
stehen.

Wie kann ich denn die 'extensions_section' innerhalb des 'usr_cert' einbinden?
Ich hab bisher immer nur 1 Wert für x509_extension gesehen.


Geht vielleicht sowas:
Code:
x509_extensions = extensions_section, usr_cert
Das hab ich zwar schon probiert (mit Leerzeichen, mit Komma, mit Semikolon) aber dann gabs immer ne Fehlermeldung beim generieren des Zertifikats.

Oder kann man die CRL Sektion vielleicht auslagern in ein weiteres Config File?
Es gibt doch die Option 'openssl.exe .... -ExtFile', aber ich hab keine Ahnung wie die aussehen muss damit das funktioniert.

gruss,
delta544
 
Wie gibst du die Config-Datei an? Als Umgebungsvariable?
Code:
set OPENSSL_CONF=.\openssl.cfg
 
Hallo Gunnarh,

naja, nich ganz, wenn ich mit openSSL auf dem Windows arbeite (was ich in einem AdminCMD Fenster mache) dann setz ich immer:
Code:
set OPENSSL_CONF=c:\OpenSSL-Win64\bin\openssl.cfg

Hier noch mal die gesamte CFG mit allem drum und dran, letzes mal ist mir beim entfernen der Kommentarzeichen auch ein paar Settings flöten gegangen.

Jedenfalls das hier ist der letzte Stand mit dem ich probiert hab eine CDP in meine Zertifikate zu bekommen

Code:
#set OPENSSL_CONF=C:\OpenSSL-Win64\bin\openssl.cfg
# OpenSSL example configuration file.
# This is mostly being used for generation of certificate requests.
#

# This definition stops the following lines choking if HOME isn't
# defined.
HOME			= .
RANDFILE		= $ENV::HOME/.rnd

# Extra OBJECT IDENTIFIER info:
#oid_file		= $ENV::HOME/.oid
oid_section		= new_oids

# To use this configuration file with the "-extfile" option of the
# "openssl x509" utility, name here the section containing the
# X.509v3 extensions to use:
# extensions		= 
# (Alternatively, use a configuration file that has only
# X.509v3 extensions in its main [= default] section.)

[ new_oids ]

# We can add new OIDs in here for use by 'ca', 'req' and 'ts'.
# Add a simple OID like this:
# testoid1=1.2.3.4
# Or use config file substitution like this:
# testoid2=${testoid1}.5.6

# Policies used by the TSA examples.
tsa_policy1 = 1.2.3.4.1
tsa_policy2 = 1.2.3.4.5.6
tsa_policy3 = 1.2.3.4.5.7

####################################################################
[ ca ]
default_ca	= CA_default		# The default ca section

####################################################################
[ CA_default ]

dir		= C:\\OpenSSL-Win64\\bin		# Where everything is kept
certs		= C:\\OpenSSL-Win64\\bin\\PEM\\demoCA\\certs		# Where the issued certs are kept
crl_dir		= C:\\OpenSSL-Win64\\bin\\PEM\\demoCA\\crl		# Where the issued crl are kept
database	= C:\\OpenSSL-Win64\\bin\\PEM\\demoCA\\index.txt	# database index file.
unique_subject	= no			# Set to 'no' to allow creation of several ctificates with same subject.
new_certs_dir	= C:\\OpenSSL-Win64\\bin\\PEM\\demoCA\\newcerts		# default place for new certs.

certificate	= C:\\OpenSSL-Win64\\bin\\PEM\\demoCA\\cacert.pem 	# The CA certificate
serial		= C:\\OpenSSL-Win64\\bin\\PEM\\demoCA\\serial 		# The current serial number
crlnumber	= C:\\OpenSSL-Win64\\bin\\PEM\\demoCA\\crlnumber	# the current crl number
        	# must be commented out to leave a V1 CRL
crl		= C:\\OpenSSL-Win64\\bin\\PEM\\demoCA\\crl\\crl.pem 		# The current CRL
private_key	= C:\\OpenSSL-Win64\\bin\\PEM\\demoCA\\private\\cakey.pem  # The private key
RANDFILE	= C:\\OpenSSL-Win64\\bin\\PEM\\demoCA\\private\\.rand	# private random number file

x509_extensions	= usr_cert	# The extentions to add to the cert

# Comment out the following two lines for the "traditional"
# (and highly broken) format.
name_opt 	= ca_default		# Subject Name options
cert_opt 	= ca_default		# Certificate field options

# Extension copying option: use with caution.
# copy_extensions = copy

# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs
# so this is commented out by default to leave a V1 CRL.
# crlnumber must also be commented out to leave a V1 CRL.
# crl_extensions	= crl_ext


default_days	= 365			# how long to certify for
default_crl_days= 30			# how long before next CRL
default_md	= default		# use public key default MD
preserve	= no			# keep passed DN ordering
email_in_dn = no           # selbst eingefügt
name_opt                = ca_default     # selbst eingefügt
cert_opt                = ca_default       # selbst eingefügt

# A few difference way of specifying how similar the request should look
# For type CA, the listed attributes must be the same, and the optional
# and supplied fields are just that :-)
policy		= policy_match

# For the CA policy
[ policy_match ]
countryName		= supplied
stateOrProvinceName	= supplied
organizationName	= supplied
organizationalUnitName	= optional
commonName		= supplied
emailAddress		= optional

# For the 'anything' policy
# At this point in time, you must list all acceptable 'object'
# types.
[ policy_anything ]
countryName		= optional
stateOrProvinceName	= optional
localityName		= optional
organizationName	= optional
organizationalUnitName	= optional
commonName		= supplied
emailAddress		= optional

####################################################################
[ req ]
default_bits		= 2048
default_keyfile 	= C:\\OpenSSL-Win64\\bin\\PEM\\demoCA\\cakey.pem
distinguished_name	= req_distinguished_name
attributes		= req_attributes
x509_extensions	= v3_ca	# The extentions to add to the self signed cert

# Passwords for private keys if not present they will be prompted for
# input_password = secret
# output_password = secret

# This sets a mask for permitted string types. There are several options. 
# default: PrintableString, T61String, BMPString.
# pkix	 : PrintableString, BMPString (PKIX recommendation before 2004)
# utf8only: only UTF8Strings (PKIX recommendation after 2004).
# nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings).
# MASK:XXXX a literal mask value.
# WARNING: ancient versions of Netscape crash on BMPStrings or UTF8Strings.
string_mask = utf8only   # wichtig, damit die Text Kodierung immer dieselbe ist

# req_extensions = v3_req # The extensions to add to a certificate request

[ req_distinguished_name ]
countryName			= Country Name (2 letter code)
countryName_default		= DE
countryName_min			= 2
countryName_max			= 2

stateOrProvinceName		= State or Province Name (full name)
stateOrProvinceName_default	= Niedersachsen

localityName			= Locality Name (eg, city)
localityName_default			= MeineStadt

0.organizationName		= Organization Name (eg, company)
0.organizationName_default	= MeineFirma

# we can do this but it is not needed normally :-)
#1.organizationName		= Second Organization Name (eg, company)
#1.organizationName_default	= World Wide Web Pty Ltd

organizationalUnitName		= Organizational Unit Name (eg, section)
#organizationalUnitName_default	=

commonName			= Common Name (e.g. server FQDN or YOUR name)
commonName_max			= 64

emailAddress			= Email Address
emailAddress_max		= 64

# SET-ex3			= SET extension number 3

[ req_attributes ]
challengePassword		= A challenge password
challengePassword_min		= 4
challengePassword_max		= 20

unstructuredName		= An optional company name

[ usr_cert ]

# These extensions are added when 'ca' signs a request.

# This goes against PKIX guidelines but some CAs do it and some software
# requires this to avoid interpreting an end user certificate as a CA.

basicConstraints=CA:FALSE

# Here are some examples of the usage of nsCertType. If it is omitted
# the certificate can be used for anything *except* object signing.

# This is OK for an SSL server.
# nsCertType			= server

# For an object signing certificate this would be used.
# nsCertType = objsign

# For normal client use this is typical
# nsCertType = client, email

# and for everything including object signing:
# nsCertType = client, email, objsign

# This is typical in keyUsage for a client certificate.
keyUsage = nonRepudiation, digitalSignature, keyEncipherment

# This will be displayed in Netscape's comment listbox.
nsComment			= "OpenSSL Generated Certificate with CRL"

# PKIX recommendations harmless if included in all certificates.
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid,issuer
extendedKeyUsage = serverAuth

# This stuff is for subjectAltName and issuerAltname.
# Import the email address.
# Hier werden die Geräte IP&Namen eingetragen
subjectAltName=@alt_names

[ alt_names ]
DNS.0                   = iR-ADV8285.dev.lab.global
DNS.1                   = iR-ADV8285
IP.2                    = 10.129.51.167

# An alternative to produce certificates that aren't
# deprecated according to PKIX.
# subjectAltName=email:move

# Copy subject details
# issuerAltName=issuer:copy
[ extensions_section ]
nsCaRevocationUrl		= http://www.domain.dom/ca-crl.pem #testeinstellung
nsBaseUrl			=test #testeinstellung
nsRevocationUrl		= URI:http://10.120.28.24/root1.crl #testeinstellung
crlDistributionPoints = URI:http://10.120.28.24/root2.crl # testeinstellung
crlDistributionPoints=URI:http://10.120.28.24/root3.crl # testeinstellung
nsRenewalUrl=tedt	# testeinstellung
#nsCaPolicyUrl
#nsSslServerName

# This is required for TSA certificates.
# extendedKeyUsage = critical,timeStamping

[ v3_req ]

# Extensions to add to a certificate request

basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment

[ v3_ca ]


# Extensions for a typical CA


# PKIX recommendation.

subjectKeyIdentifier=hash

authorityKeyIdentifier=keyid:always,issuer

# This is what PKIX recommends but some broken software chokes on critical
# extensions.
#basicConstraints = critical,CA:true
# So we do this instead.
basicConstraints = CA:true

# Key usage: this is typical for a CA certificate. However since it will
# prevent it being used as an test self-signed certificate it is best
# left out by default.
# keyUsage = cRLSign, keyCertSign

# Some might want this also
# nsCertType = sslCA, emailCA

# Include email address in subject alt name: another PKIX recommendation
# subjectAltName=email:copy
# Copy issuer details
# issuerAltName=issuer:copy

# DER hex encoding of an extension: beware experts only!
# obj=DER:02:03
# Where 'obj' is a standard or added object
# You can even override a supported extension:
# basicConstraints= critical, DER:30:03:01:01:FF

[ crl_ext ]

# CRL extensions.
# Only issuerAltName and authorityKeyIdentifier make any sense in a CRL.

# issuerAltName=issuer:copy
authorityKeyIdentifier=keyid:always

[ proxy_cert_ext ]
# These extensions should be added when creating a proxy certificate

# This goes against PKIX guidelines but some CAs do it and some software
# requires this to avoid interpreting an end user certificate as a CA.

basicConstraints=CA:FALSE

# Here are some examples of the usage of nsCertType. If it is omitted
# the certificate can be used for anything *except* object signing.

# This is OK for an SSL server.
# nsCertType			= server

# For an object signing certificate this would be used.
# nsCertType = objsign

# For normal client use this is typical
# nsCertType = client, email

# and for everything including object signing:
# nsCertType = client, email, objsign

# This is typical in keyUsage for a client certificate.
# keyUsage = nonRepudiation, digitalSignature, keyEncipherment

# This will be displayed in Netscape's comment listbox.
nsComment			= "OpenSSL Generated Certificate"

# PKIX recommendations harmless if included in all certificates.
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid,issuer

# This stuff is for subjectAltName and issuerAltname.
# Import the email address.
# subjectAltName=email:copy
# An alternative to produce certificates that aren't
# deprecated according to PKIX.
# subjectAltName=email:move

# Copy subject details
# issuerAltName=issuer:copy

nsCaRevocationUrl		= URI:http://10.120.28.24/root.crl #testeinstellung
crlDistributionPoints=URI:http://10.120.28.24/root.crl #testeinstellung
#nsBaseUrl
#nsRevocationUrl
#nsRenewalUrl
#nsCaPolicyUrl
#nsSslServerName

# This really needs to be in place for it to be a proxy certificate.
proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo

####################################################################
[ tsa ]

default_tsa = tsa_config1	# the default TSA section

[ tsa_config1 ]

# These are used by the TSA reply generation only.
dir		= C:\\OpenSSL-Win64\\bin		# TSA root directory
serial		= C:\\OpenSSL-Win64\\bin\\PEM\\demoCA\\tsaserial	# The current serial number (mandatory)
crypto_device	= builtin		# OpenSSL engine to use for signing
signer_cert	= C:\\OpenSSL-Win64\\bin\\PEM\\demoCA\\tsacert.pem 	# The TSA signing certificate
					# (optional)
certs		= C:\\OpenSSL-Win64\\bin\\PEM\\demoCA\\cacert.pem	# Certificate chain to include in reply
					# (optional)
signer_key	= C:\\OpenSSL-Win64\\bin\\PEM\\demoCA\\private\\tsakey.pem # The TSA private key (optional)

default_policy	= tsa_policy1		# Policy if request did not specify it
					# (optional)
other_policies	= tsa_policy2, tsa_policy3	# acceptable policies (optional)
digests		= md5, sha1		# Acceptable message digests (mandatory)
accuracy	= secs:1, millisecs:500, microsecs:100	# (optional)
clock_precision_digits  = 0	# number of digits after dot. (optional)
ordering		= yes	# Is ordering defined for timestamps?
				# (optional, default: no)
tsa_name		= yes	# Must the TSA name be included in the reply?
				# (optional, default: no)
ess_cert_id_chain	= no	# Must the ESS cert id chain be included?
				# (optional, default: no)

Was mir jedenfalls immer wieder auffällt ist, das die Einstellungen in der openSSL.cfg nicht immer befolgt werden.

Z.B. wenn ich ein Zertifkats request ausstelle oder das Zertifikat signiere wird es nicht an die richtige Stelle kopiert, so wie es in der CFG angegeben ist.

gruss,
delta544
 
Openssl 1.0.1e auf Windows klappt sehr wohl. Auch ohne seltsame Pfadpatchereien in der openssl.cnf
Wie rufst du denn openssl genau auf?

PS: Ich generiere meine Zertifikate aus Faulheit oft mit dem Perl-Programm CA.pl.
 
Ich würde mittels Sysinternals ProcessMonitor den ProzessName "openssl.exe" überwachen und deine Zertifikats-Operationen durchführen. In der Aufzeichnung dann prüfen, auf welche Dateien/Verzeichnisse versucht wurde zuzugreifen. Achte auf "Access Denied" bzw. "File not found" Einträge. So solltest Du in wenigen Minuten prüfen können, ob du irgendwelche Pfade falsch konfiguriert hast bzw. ob es irgendwo an Filesystemberechtigungen happert oder warum OpenSSL sonst "ins Leere läuft".
 
Also,

wenn ich z.b. das Rootzertifikat erstellen würde, mit meiner derzeitigen CFG, und folgendem aufruf (Konsole als Admin und im 'OpenSSL\Bin' Pfad)

Code:
openssl req -newkey rsa:4096 -x509 -extensions v3_ca -out cacert.pem -outform PEM -days 1825

Dann landet alles im 'OpenSSL\Bin\' Pfad obwohl genau das nicht sein sollte, da ja in der CFG was anderes konfiguriert ist.

Also hab ich mir angewöhnt ein Zertifikat mit kompletten Pfaden zu generieren, aber schöner wär schon wenn ich nicht andauernd solche Befehlzeilenmonster häcken müsste:
Code:
openssl req -newkey rsa:1024 -keyout C:\OpenSSL-Win64\bin\PEM\demoCA\server_key.pem -keyform PEM -out C:\OpenSSL-Win64\bin\PEM\demoCA\tempreq.pem -outform PEM

Heisst, ich bekomme zwar meine Zertifikate, aber ich bräuchte eine Idee wie eine CRL (Certificate Revokation List) in das Zertifikat bekomme.

Um diese zu generieren verwende ich das folgende:

Code:
# Generate a CRL file
# Generate a file beneath C:\OpenSSL-Win64\bin\PEM\demoCA called 'crlnumber'. Open the crlnumber file and enter 1000. Save and close.
#openssl ca -config ca.conf -gencrl -keyfile ca.key -cert ca.crt -out root.crl.pem
openssl ca -keyfile C:\OpenSSL-Win64\bin\PEM\demoCA\private\cakey.pem -cert C:\OpenSSL-Win64\bin\PEM\demoCA\cacert.crt -gencrl -out C:\OpenSSL-Win64\bin\PEM\demoCA\root.crl.pem

#This will convert the CRLfile (X509 encoded) into a CRL file (readable by browser)
openssl crl -inform PEM -in C:\OpenSSL-Win64\bin\PEM\demoCA\root.crl.pem -outform DER -out C:\OpenSSL-Win64\bin\PEM\demoCA\root.crl
# With the next line you can check the CRL
openssl crl -in C:\OpenSSL-Win64\bin\PEM\demoCA\root.crl.pem -text

gruss,
delta544
 
Stichwort: X509v3 CRL Distribution Points

Die CRL-Datei legst du auf deinen Webserver und du verweist mit einer http-URL (!) in dem Zertifikat drauf.

Du muss in der openssl.conf im Abschnitt für die x509_extensions die URL hinzufügen:
Code:
crlDistributionPoints = URI:http://example.de/ca/the.crl

Dann generierst du Requests und Signierst deine zertifikate.
 
Last edited by a moderator:
Hallo Gwen,

das ist genau das was ich nicht kann.
Habe die distribution URL mehrfach in meiner CFG configuriert, aber an keiner Stelle innerhalb der CFG wird das akzeptiert bzw. die Zertifikate werden immer noch ohne CDP erstellt.

gruss,
delta544
 
Hast Du die Umgebungsvariable HOME gesetzt?

Beachte: http://www.openssl.org/docs/apps/config.html
If a configuration file attempts to expand a variable that doesn't exist then an error is flagged and the file will not load. This can happen if an attempt is made to expand an environment variable that doesn't exist. For example in a previous version of OpenSSL the default OpenSSL master configuration file used the value of HOME which may not be defined on non Unix systems and would cause an error.
 
Hallo,

Ja, wie aus der angehängten CFG ersichtlich, ist die Homevariable gesetzt und wird nochmals per SET auf Commandline manuell auf die richtige Systemvariable gesetzt (einzigste CFG in diesem Ordner) Systemvariable gesetzt.

Alle anderen Variablen, wie z.b. DNS und IP sind später im Zertifikat, nur die CDP nicht und ich weiss nicht wo ich sonst noch gucken soll, denn die CDP ist mehrfach angegeben. Es sei denn diese Sektionen werden nicht für die Zertifikatsgenerierung hergenommen, aber dann muss man das ja auch irgendwie definieren können.

gruss,
delta544
 
Ja, wie aus der angehängten CFG ersichtlich, ist die Homevariable gesetzt und wird nochmals per SET auf Commandline manuell auf die richtige Systemvariable gesetzt (einzigste CFG in diesem Ordner) Systemvariable gesetzt.

Reden wir vom gleichen? Ich meinte nicht die Umgebungsvariable OPENSSL_CONF (welche du auf c:\OpenSSL-Win64\bin\openssl.cfg zeigen lässt), sondern ich fragte, ob Du mit "SET HOME=C:\OpenSSL-Win64\bin\PEM\demoCA" die HOME-Umgebungsvariable auf einen existierenden Pfad gesetzt hast?
 
Code:
Hallo GunnarH,

davon ausgehend das
Code:
 Home  =  .
gleichbedeutend mit
Code:
c:\openssl-win64\bin
ist und
Code:
dir = ./demoCA
dann eigentlich
Code:
C:\openssl-win64\bin\demoCA
sein müsste, hatte ich erst meine CFG entsprechend auf
Code:
dir = ./PEM/demoCA/
angepasst.
Aber die Zertifikate landeten dann trotzdem unter
Code:
c:\openssl-win64\bin\
weshalb ich dann dazu übergegangen bin den Pfad immer komplett anzugeben. (siehe Screenshot)

OK,
abgesehen davon, es funktioniert alles, ich möchte nur noch eine CDP zu meinen Zertifikaten hinzufügen.

gruss,
delta544
 

Attachments

  • openssl.png
    openssl.png
    62.7 KB · Views: 201
Last edited by a moderator:
Ich fragte nach der HOME Umgebungsvariable und nicht nach dem HOME Eintrag in der Konfiguration.

In Deiner config wird $ENV::HOME verwendet:
Code:
RANDFILE		= $ENV::HOME/.rnd

Beachte: http://www.openssl.org/docs/apps/config.html
If a configuration file attempts to expand a variable that doesn't exist then an error is flagged and the file will not load. This can happen if an attempt is made to expand an environment variable that doesn't exist. For example in a previous version of OpenSSL the default OpenSSL master configuration file used the value of HOME which may not be defined on non Unix systems and would cause an error.
 
Hallo,

erst mal vielen Dank für alle Antworten die ich bisher bekommen habe.

Der Grund warum ich mir die 'Finger wund' schreiben 'will' ist:
Ich soll eine kleine Anleitung schreiben, in der beschrieben steht wie man mittels openSSL 'Gerätezertifikate' + Revocation List erstellt.

'Sich mal ebend' ein Programm runterladen kann ich für meinen Privatgebrauch machen und waren ein paar gute Tipps dabei, aber versuch das mal in einem 'dir fremden Unternehmensnetz' umzusetzen. Da kannste gleich die Koffer packen.

So, nochmal:
Es funktioniert ALLES (mit ALLES meine ich ich kann ein RootCA Zertifikat erstellen und ich kann ein 'Gerätezertifikat' erstellen) aber ich muss noch die CDP in meinem Gerätezertifikat haben.

Die Frage ist:

Wo und wie muss ich das konfigurieren. Alle Versuche meinerseits das zu konfigurieren sind fehlgeschlagen (Ich kann DNS und IP setzen, auch Verwendungszweck) siehe CFG.

Achtung: Windows, nicht Linux.

MfG,
delta544
 
Das Zeug funktioniert meiner Erfahrung nach unter Linux genauso wie unter Windows. Die von Dir beschriebenen Probleme sind - und das habe ich jetzt bereits mehrfach erläutert - offenbar auf nicht gesetzte Environment-Variablen zurückzuführen. So steht es ja auch in der Doku. Hast Du die HOME-Environment-Variable nun auf der Konsole gesetzt? Was hat der von mir empfohlene ProcMon-Dump für Erkenntnisse gebracht?
 
Es ist auch rein mit openssl unter Windows möglich ein Zertifikat mit Revocation-Url (Parameter crlDistributionPoints in openssl.cnf) zu erzeugen.

@delta544
Wenns bei dir nicht geht, werden falsche Umgebungsvariablen benutzt.
 
Back
Top