Skip to content

KeyServer Self Signed Certificate

Javier Gusano Martinez edited this page Nov 30, 2016 · 3 revisions

How to create a new self-signed certificate?

The HTTPs socket uses an external certificate file for SSL security. This certificate could be generated easily using tools as JDK Keytool, OpenSSL...

Windows

For Windows systems with installed Java JDK or JRE, the easy way for this process is use keytool. The command for generate this certificate must be similar to this structure:

keytool -genkey -alias KEYSERVERDOMAIN -keyalg RSA -keypass KEYSERVERPASS -keystore KEYSTOREFILE -storepass KEYSTOREPASSWORD -validity VALIDITYDAYS -keysize KEYSIZE

This is an example of certificate generation using keytool:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\ksuser\KeyServer> keytool -genkey -alias keyserver.domain.com -keyalg RSA -keypass 123456 -keystore ksserverkey.jks -storepass 123456 -validity 365 -keysize 2048

What is your first and last name?
  [Unknown]:  KS Name
What is the name of your organizational unit?
  [Unknown]:  KS Unit
What is the name of your organization?
  [Unknown]:  KS Organization
What is the name of your City or Locality?
  [Unknown]:  KS City
What is the name of your State or Province?
  [Unknown]:  KS State
What is the two-letter country code for this unit?
  [Unknown]:  ES
Is CN=KS Name, OU=KS Unit, O=KS Organization, L=KS City, ST=KS State, C=ES corre
ct?
  [no]:  yes

C:\Users\ksuser\KeyServer>

Note: Customize it with your own requirements. [+Info]

Linux (OpenSSL)

If you are using KeyServer in a Linux environment, you can generate the HTTPS certificate using OpenSSL.

Clone this wiki locally