OpenSSL - stworzenie własnego centrum - błędy przy tworzeniu certyfikatu

0

Chciałem stworzyć swoje własne Centrum certyfikacji (na potrzeby zajęć) przy uzyciu OpenSSL'a. To mój plik konfiguracyjny:

HOME = .
[ca]
default_ca = CA_default
[CA_default]
dir = /home/student/ca
crl_dir = $dir/crl
database = $dir/index.txt
new_certs_dir = $dir/newcerts
certifcate = $dir/cert.pem
serial = $dir/serial.txt
crl = $dir/crl.pem
private_key = $dir/private/privkey.pem
RANDFILE = $dir/rand

default_days = 365
default_crl_days= 30
default_md = md5 
preserve = no
policy = policy_1

[req]
default_bits = 1024
default_keyfle = privkey.pem
prompt = no
string_mask = nombstr
distinguished_name = req_distinguished_name
x509_extensions = req_x509_ext

[req_x509_ext]
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always,issuer:always
basicConstraints = CA:true
nsCertType = sslCA
keyUsage = cRLSign,keyCertSign
nsComment = Lab IT

[req_distinguished_name]
countryName = PL
localityName = Warszawa
organizationName = UJ
organizationalUnitName = II
commonName = Uniwersytet Jagiellonski
commonName_max = 64
emailAddress = [email protected]

[policy_1]
countryName = supplied
localityName = optional
organizationName = supplied
organizationalUnitName = optional
commonName = supplied
surname = supplied
emailAddress = supplied

[crl_ext]
authorityKeyIdentifier = keyid:always,issuer:always

Przed wydaniem komendy :

openssl req -config ca.config -new -x509 -out CC.cert

gdzie ca.config to moj plik konfiguracyjny, stworzyłem katalogi : crl,newcerts oraz private. Stworzyłem też pliki: (w katalogu /home/student/ca) index.txt (pusty), serial.txt (wpisałem do niego 01), oraz rand (wpisałem do niego jakieś śmieci).

Jednak po wydaniu komendy:

openssl req -config ca.config -new -x509 -out CC.cert

dostaję błędy:

problems making Certificate Request
2053:error:0D06407A:asn1 encoding routines:a2d_ASN1_OBJECT:first num too large:a_object.c:109:
2053:error:0B083077:x509 certificate routines:X509_NAME_ENTRY_create_by_txt:invalid field name:x509name.c:285:name=commonName_max

I kompletnie nie wiem, gdzie jest błąd i jak go poprawić, tak, żeby stworzyć swoje CA. Może ktoś pomoże? :(

0

Zakomentuj linijke:

#commonName_max = 64

1 użytkowników online, w tym zalogowanych: 0, gości: 1