You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Certificate authority:

eric@eric-VirtualBox:~/mqtt_cert$ openssl req -new -x509 -days 365 -extensions v3_ca -keyout ca.key -out ca.crt
Generating a RSA private key
..+++++
...................+++++
writing new private key to 'ca.key'
Enter PEM pass phrase: Gigaset123+
Verifying - Enter PEM pass phrase: Gigaset123+
-----
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]:NL
State or Province Name (full name) [Some-State]:BB
Locality Name (eg, city) []:EL
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Gigaset
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:gigaset.com
Email Address []:
eric@eric-VirtualBox:~/mqtt_cert$ 


Client certificate and key:

Client key generation (without a password)

eric@eric-VirtualBox:~/mqtt_cert$ openssl genrsa -out client.key 2048
Generating RSA private key, 2048 bit long modulus (2 primes)
..............................................................................+++++
............+++++
e is 65537 (0x010001)
eric@eric-VirtualBox:~/mqtt_cert$


Client certificate request signing generation

eric@eric-VirtualBox:~/mqtt_cert$ openssl req -out client.csr -key client.key -new
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]:NL
State or Province Name (full name) [Some-State]:BB
Locality Name (eg, city) []:EL
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Gigaset
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:gigaset.com
Email Address []:

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
eric@eric-VirtualBox:~/mqtt_cert$ 


Passing the Certificate Signing Request (csr) file to our validation authority to get client certificate


eric@eric-VirtualBox:~/mqtt_cert$ openssl x509 -req -in client.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out client.crt -days 100
Signature ok
subject=C = NL, ST = BB, L = EL, O = Gigaset, CN = gigaset.com
Getting CA Private Key
Enter pass phrase for ca.key:Gigaset123+
eric@eric-VirtualBox:~/mqtt_cert$
  • No labels