RESTAPI:SSL certificates

Aus Cryptshare Documentation
Version vom 30. Dezember 2022, 12:51 Uhr von imported>Frorathm
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Wechseln zu:Navigation, Suche


Applies to

All versions of Cryptshare Server

Purpose

In this article, you will find an overview on how to set up a new SSL certificate, install your wildcard certificate, generate a CSR or resolve certificate related error messages.

Solution

Generating CSR from existing keystore

If you already have a Keystore on your Cryptshare Server and would like to generate a CSR (Certificate Signing Request) for a certificate authority please follow this article:

1. copy current KeyStore from your Cryptshare Server to your computer by using WinSCP

45516204.png

2. open the KeyStore with KeyStore Explorer

45516205.png

3. enter the password 'CA0AZhuFM4NogQh'

45516206.png

4. generate CSR

45516207.png

5. enter the password 'CA0AZhuFM4NogQh' again

45516208.png

6. save the CSR File

45516209.png

7. please proceed with the paragraph Public SSL Certificate


Installation of an existing SSL certificate (e.g. wildcard SSL certificate)

This article describes how to install an already existing SSL certificate (e.g. wildcard SSL certificate) to your Cryptshare Server

  1. Create new Java-Keystore with KeyStore Explorer

45516210.png

2. Select JKS for new KeyStore type

45516211.png

3. Import the available SSL certificate

45516212.png

4. Select the certificate format, e.g. pkcs12 (.pfx) or OpenSSL (.crt, .cer, .pem)

45516213.png

5. Use the default password 'CA0AZhuFM4NogQh', to import the key pair

45516214.png

6. Import and check the certificate chain

45516215.png

45516216.png

45516217.png

7. Save the KeyStore

45516218.png

8. Use the default password 'CA0AZhuFM4NogQh', to save the KeyStore

45516214.png

9. Install the created KeyStore on the Cryptshare Server Setting up an SSL Certificate

SSL certificate related errors:

Start failed after SSL KeyStore installation

A new KeyStore is created or a new SSL certificate is installed in the existing KeyStore, but the Cryptshare Server start failed after the KeyStore is installed.

The most common reason is a wrong KeyStore format or a wrong password. Please check whether the following settings are correct:

  1. The format of the KeyStore is 'JKS'

45516219.png

2. the password for the certificate in the KeyStore is the default password 'CA0AZhuFM4NogQh'

45516220.png

3. The password for the KeyStore is the default password 'CA0AZhuFM4NogQh'

45516221.png


The requested public SSL certificate cannot be imported

The requested SSL certificate cannot be imported into the Keystore with the following error:

  • English: Could not establish trust for the CA Reply.
  • German: Vertrauenskette für die CA Antwort konnte nicht erstellt werden.

45516222.png

Export the private key from the keystore used for the creation of the CSR file and import it together with the requested SSL certificate into a new keystore.

1. open the existing keystore used for the generating of the CSR file

2. klick with the right mouse button on the entry in the keystore

3. open the menu entry 'Export --> Export Private Key'

45516223.png

4. save the private key in OpenSSL format to your local machine

45516224.png

45516225.png

5. create new Java-Keystore of type JKS

45516210.png

45516211.png

6. impot the available SSL certificate

45516212.png

7. select the certificate format, e.g. pkcs12 (.pfx) or OpenSSL (.crt, .cer, .pem)

45516226.png

45516227.png

45516228.png

8. import and check the certificate chain

45516215.png

45516216.png

45516217.png

9. save the Keystore

45516218.png

10. use the default password 'CA0AZhuFM4NogQh', to save the Keystore

45516214.png

11. install the created keystore on the Cryptshare server Setting up an SSL Certificate


The connection to LDAP cannot be established using SecureLDAP

If the connection to LDAP cannot be established using SecureLDAP, the cause is usually that a self-signed SSL certificate is installed on LDAP server, which cannot be trusted by Java.

Follow the steps below in order to import the LDAP SSL certificate to Java keystore of Cryptshare Installation:

Linux Server

  • copy the SSL certificate in x.509 format (.cer, .crt, .pem) to the folder /root
  • log in as root on the appliance
  • change into Java folder and change the permissions for keytool
`cd` `/opt/cryptshare-3/jre/bin/`

`chmod` `+x keytool`

  • import the SSL certificate
`.``/keytool` `-``import` `-trustcacerts -keystore ..``/lib/security/cacerts` `-``alias` `<sitename> -``file` `<SSL Certificate>`

where <alias> is the name of LDAP server and <SSL Certificate> is the certificate inclusive the path, e.g.  /root/LDAP-SSL-certificate.crt The default password for the JAVA certificate storage  is changeit

  • restart Cryptshare service
`rccryptshare restart`

Windows Server

  • copy the SSL certificate in x.509 format (.cer, .crt, .pem) to the server
  • open command line
  • change into Cryptshare Java folder
`cd` `<Cryptshare installation folder>\jre\bin`
  • import the SSL certificate
`keytool.exe -``import` `-trustcacerts -keystore ..\lib\security\cacerts -``alias` `<sitename> -``file` `<SSL Certificate>`

where <alias> is the name of LDAP server and <SSL Certificate> is the certificate inclusive the path, e.g.  <User Desktop>\LDAP-SSL-certificate.crt The default password for the JAVA certificate storage  is changeit

  • restart Cryptshare service

Now the SecureLDAP connection should work fine.