-->

Ads 720 x 90

How to make SSL certificate in Linux.


By default Openssl is installed on major Linux distributions. If its not installed, then you have to manually install Openssl first to proceed further.

Step:1

From Terminal window type:

milan@TGS ~> openssl genrsa -out key.pem 2048
Generating RSA private key, 2048 bit long modulus
......+++
.....................................................................................+++
e is 65537 (0x10001)
milan@TGS ~> openssl req -new -sha256 -key key.pem -out csr.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]:IN
State or Province Name (full name) [Some-State]:Kerala
Locality Name (eg, city) []:Trissur
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Techyo.ga
Organizational Unit Name (eg, section) []:TGS
Common Name (e.g. server FQDN or YOUR name) []:www.techyo.ga
Email Address []:milan@techglyphs.tk

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:*******
An optional company name []:Techyoga


Step 2:


milan@TGS ~> openssl req -x509 -sha256 -days 365 -key key.pem -in csr.csr -out certificate.pem


Now view your newly created certs


milan@TGS ~> cat certificate.pem 
-----BEGIN CERTIFICATE-----
MIID8TCCAtmgAwIBAgIJAOVXgBUQ2oTgMA0GCSqGSIb3DQEBCwUAMIGOMQswCQYD
VQQGEwJJTjEPMA0GA1UECAwGS2VyYWxhMRAwDgYDVQQHDAdUcmlzc3VyMRIwEAYD
VQQKDAlUZWNoeW8uZ2ExDDAKBgNVBAsMA1RHUzEWMBQGA1UEAwwNd3d3LnRlY2h5
by5nYTEiMCAGCSqGSIb3DQEJARYTbWlsYW5AdGVjaGdseXBocy50azAeFw0xNjEy
MjYwNzUwMTdaFw0xNzEyMjYwNzUwMTdaMIGOMQswCQYDVQQGEwJJTjEPMA0GA1UE
CAwGS2VyYWxhMRAwDgYDVQQHDAdUcmlzc3VyMRIwEAYDVQQKDAlUZWNoeW8uZ2Ex
DDAKBgNVBAsM************************************************************************************************************************************************************************QME4wHQYDVR0OBBYEFIh2
Wbk/LNYoJEYPziKZ2HhrtBHvMB8GA1UdIwQYMBaAFIh2Wbk/LNYoJEYPziKZ2Hhr
tBHvMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAIxoKn/wLfwi/9+e
W9z/4lcKSRnGSrmBQ1vDH9p2Ly7fk30J4YtiZlA2UPGXjD5xjA2QY30j8So48458
QHtpaChbFkGBFbHF8Td2qPeQHwEe8btoMuSRQvPOnig5zqTEhx3KedBvGZYXYcFP
W7uaDbkEWVHQhMf3uAs8CndkjOELVpvydGHE7f0Tv30q+9sSHRS6gMxDYKEvaLLl
N8ykA/XBabEaCPlFgFBwHjEMVEdk6/AhHDX05gJQx3X8EF4b2hJI00kcjtYcLz/J
92ivnBUpD15W5QygxWzpSt63ojoTznxIbzKNHl6DSmH7ZwCM3N/RzseQ9+AMEbtg
bAniq4w=
-----END CERTIFICATE-----


milan@TGS ~> cat csr.csr 
-----BEGIN CERTIFICATE REQUEST-----
MIIDBjCCAe4CAQAwgY4xCzAJBgNVBAYTAklOMQ8wDQYDVQQIDAZLZXJhbGExEDAO
BgNVBAcMB1RyaXNzdXIxEjAQBgNVBAoMCVRlY2h5by5nYTEMMAoGA1UECwwDVEdT
MRYwFAYDVQQDDA13d3cudGVjaHlvLmdhMSIwIAYJKoZIhvcNAQkBFhNtaWxhbkB0
ZWNoZ2x5cGhzLnRrMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA+ijL
5BF***********************************************************************************************************************************************************************kqhkiG9w0BAQsFAAOCAQEAoT3AHRPU
AQZSku/7DwGyn/+ltJz5a3X/2YJnjXkA6Do546Qefhz/p7CZlqlNPsxiMgh7FEIA
WqqiLaEBZ3w6zTVmUY7qJgxquW98UcADqLUFnXRtHANS6ikdRF49s1d9Zhu54riN
AF/hVN9vEn0+QD6Vd3qV8oje365PtWG8G1HV7dLzVEu04tJxQt7DY6l6Ow1t08vd
78kDw89g7mLoapeQUsPysvZDicNDDv3/95U1Hyb0V04zJUwQlix9zXlmcAC7oOGH
I7l5wuAqN1nBDn/jrQB7AWpCQql5HvRoQuPJLzSYgPxlBhbpPngprM4WMidDbZNk
Se5XxWcQFAxnnQ==
-----END CERTIFICATE REQUEST-----


milan@TGS ~> cat key.pem 
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEA+ijL5BFZXIPu6XnItzhp+bcx10I+rPKdIGVbbt8XTjn6oq5d
tKT52WPmLBetIt236D529ny0VGWicEGHOQJEy00xeNkb4A++08++ObP6wsMBB+Ey
5jZFvanIhT3tNKu9pWiHKsqTJIQRZzhfkWm+29ipA63UFkZ26ikuAa/lwjSJpD7b
LpInSx6PvvxQU47+z+z+qZ9JudPEP/eklJCWivBea/BN1bfo7kSDMkQr5eEa632D
CgBQcGVtdBjudSjK8d8g9z5qEqrbjF1+kAP3eocdNcFt0FM0oLDD4c7EKSDU9N6O
*******************************************************************************************************************************************************************************Pv/eMf5u42Uj5rChZAPhsN1FS
Z7DkyLt27FN6STN5huyqN2z9TjgCZak3fswlAJVOMH1gI4X5fhSZjJv4tZi+pptz
CPiUKttQ1mkbCwryHk1hN4OccL6kr9JLyO/aPJeQGWX3HGyXZf9l
-----END RSA PRIVATE KEY-----

milan@TGS ~> 

only concern for this certs are its self signed certs.

Related Posts

Post a Comment

Subscribe Our Newsletter