Estimated reading time: 5 min

Certificate ManagementTo Top

 

Legal WarningTo Top

Specifications, details, statements, and information in this manual are subject to change without any notice. All the information provided, procedures shared, or statements listed below are for Tegsoft technical experts only. Using this manual without Tegsoft Technical qualification should be avoided. Tegsoft has no obligation over the result of the application on any use. Some statements may not be suitable for the use; avoiding without technical qualification may be crucial. Users must take full responsibility for performing any steps part of this manual. Users who are not aware of technical terms and operations described here; should be aware that this document may not be suitable for their usage.

 

Changes to This DocumentTo Top

Date Change Summary
2020-09-02 Initial release of the document.

 

 

 

PrefaceTo Top

This document explains how to manage and convert certificates. The preface for Certificate Management contains the following sections:

  • Certificate Verification
  • Converting Files
  • Common Errors

 

Obtaining DocumentationTo Top

Tegsoft documentation and additional literature are available on Tegsoft Knowledge Base. This section explains the product documentation resources that Tegsoft offers.

Tegsoft Knowledge Base

You can access the most current Tegsoft documentation at this URL:

https://tegsoft.com/knowledge-base/

 

PrerequisitesTo Top

  • You must have basic knowledge of networking
  • You must have basic knowledge of SSH connection
  • You must have basic skills of Linux Command Line Interface

 

Avoiding OverrideTo Top


Overriding default certificate files
When using /certificates folder and certificate. XXX files Tegsoft will override those files when booting. It is important to run below command to disable Tegsoft certificate overriding.

cd /certificates/
echo 1 > /root/custom_certificates

NOTE: Run all these command in this document under /certificates path.

 

Converting FilesTo Top

 

Converting PFX to KEY FileTo Top

Two steps;

openssl pkcs12 -in yourfile.pfx -clcerts -nokeys -out certificate.crt

Enter Import Password:ENTER_PASSWORD

MAC verified OK

openssl pkcs12 -in yourfile.pfx -nocerts -out certificate-tmp.key

Enter Import Password:ENTER_PASSWORD

MAC verified OK

 

Enter PEM pass phrase: tegsoft123

Verifying - Enter PEM pass phrase: tegsoft123

 

openssl rsa -in certificate-tmp.key -out certificate.key


Enter pass phrase for certificate-tmp.key: tegsoft123

writing RSA key


Converting CRT to PFX File
openssl pkcs12 -export -out certificate.pfx -inkey certificate.key -in certificate.crt -certfile bundle.crt

 

Converting KEY to 8 Bit KEY FileTo Top
openssl pkcs8 -topk8 -inform PEM -outform DER -in certificate.key -nocrypt > certificate8.key

 

Converting CER to PEM FileTo Top
openssl x509 -inform der -in certificate.cer -out certificate.pem

 

Converting CRT to PEM FileTo Top
openssl x509 -in certificate.crt -out certificate.pem -outform PEM

 

 

Certificate VerificationTo Top
openssl verify -verbose certificate.crt

 

Key VerificationTo Top
openssl rsa -noout -modulus -in certificate.key | openssl md5

 

Key - Certificate MatchingTo Top
openssl pkey -in certificate.key -pubout -outform pem | sha256sum
openssl x509 -in certificate.crt -pubkey -noout -outform pem | sha256sum
openssl x509 -in certificate.crt -text -noout

 

Restarting httpd ServiceTo Top

 

service restart httpd

or

systemctl restart httpd