Hi there,
I'm currently going over the setup of an openldap server and I can't get through the certificates' creation. The site / steps I'm following is https://www.freebsd.org/doc/en/articles/ldap-auth/ssl-ca.html. In there the first part is fine :
% openssl genrsa -out root.key 1024
% openssl req -new -key root.key -out root.csr
% openssl x509 -req -days 1024 -in root.csr -signkey root.key -out root.crt
The part, that I'm struggling with is:
Now ,
1. Why do we create a ldap-server-one.key, when it's not used ( the certificate that is being created along the way is not being signed with this key ) ?
and my main problem:
2. When I do
then the error comes up, that I don't understand.
Below the steps that I've done once again.
Can anyone real quick go over this on her/his side and see if she/he gets the same error, or help me otherwise with a bit of an advise, please?
Regards
rec
I'm currently going over the setup of an openldap server and I can't get through the certificates' creation. The site / steps I'm following is https://www.freebsd.org/doc/en/articles/ldap-auth/ssl-ca.html. In there the first part is fine :
% openssl genrsa -out root.key 1024
% openssl req -new -key root.key -out root.csr
% openssl x509 -req -days 1024 -in root.csr -signkey root.key -out root.crt
The part, that I'm struggling with is:
Code:
Next, using the first two steps above create a key ldap-server-one.key and certificate signing request ldap-server-one.csr. Once you sign the signing request with root.key, you will be able to use ldap-server-one.* on your LDAP servers.
Now ,
1. Why do we create a ldap-server-one.key, when it's not used ( the certificate that is being created along the way is not being signed with this key ) ?
and my main problem:
2. When I do
Code:
openssl x509 -req -days 1024 -in ldap-server-one.csr -CA root.crt -CAkey root.key -out ldap-server-one.crt
then the error comes up, that I don't understand.
Below the steps that I've done once again.
Code:
freebsd ~/ca]# openssl genrsa -out root.key 1024
Generating RSA private key, 1024 bit long modulus
...++++++
........................................++++++
e is 65537 (0x10001)
[root@freebsd ~/ca]# openssl req -new -key root.key -out root.csr
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:PL
State or Province Name (full name) [Some-State]:DS
Locality Name (eg, city) []:Warsaw
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Giga
Organizational Unit Name (eg, section) []:TSE
Common Name (e.g. server FQDN or YOUR name) []:freebsd.giga.loc
Email Address []:info@giga.loc
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
[root@freebsd ~/ca]# openssl x509 -req -days 1024 -in root.csr -signkey root.key -out root.crt
Signature ok
subject=/C=PL/ST=DS/L=Warsaw/O=Giga/OU=TSE/CN=freebsd.giga.loc/emailAddress=info@giga.loc
Getting Private key
[root@freebsd ~/ca]# openssl genrsa -out ldap-server-one.key 1024
Generating RSA private key, 1024 bit long modulus
..........++++++
.++++++
e is 65537 (0x10001)
[root@freebsd ~/ca]# openssl req -new -key ldap-server-one.key -out ldap-server-one.csr
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:PL
State or Province Name (full name) [Some-State]:DS
Locality Name (eg, city) []:Warsaw
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Giga
Organizational Unit Name (eg, section) []:TSE
Common Name (e.g. server FQDN or YOUR name) []:freebsd.giga.loc
Email Address []:info@giga.loc
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
[root@freebsd ~/ca]# openssl x509 -req -days 1024 -in ldap-server-one.csr -CA root.crt -CAkey root.key -out ldap-server-one.crt
Signature ok
subject=/C=PL/ST=DS/L=Warsaw/O=Giga/OU=TSE/CN=freebsd.giga.loc/emailAddress=info@giga.loc
Getting CA Private Key
root.srl: No such file or directory
34380880456:error:06067099:digital envelope routines:EVP_PKEY_copy_parameters:different parameters:/usr/src/crypto/openssl/crypto/evp/p_lib.c:137:
34380880456:error:02001002:system library:fopen:No such file or directory:/usr/src/crypto/openssl/crypto/bio/bss_file.c:406:fopen('root.srl','r')
34380880456:error:20074002:BIO routines:FILE_CTRL:system lib:/usr/src/crypto/openssl/crypto/bio/bss_file.c:408:
[root@freebsd ~/ca]#
Can anyone real quick go over this on her/his side and see if she/he gets the same error, or help me otherwise with a bit of an advise, please?
Regards
rec