LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-08-2014, 07:38 AM   #1
zkab
Member
 
Registered: Dec 2007
Posts: 142

Rep: Reputation: 16
Create a certificate problem


I have a problem to create certificate for a site.
When I specify in Chrome IP:8080 I am redirected to IP:8443 with error message:

"The site's security certificate is not trusted!"

Instructions are that I have to run following java command ...

sudo java -jar lib/ace.jar new_cert <hostname> <company> <city> <state> <country>

When it is done I get 2 files

xxx_certificate.csr.der
xxx_certificate.csr.pem

that I am supposed to ...

# have this CSR signed by a CA, you'll get a few certificates back...
# import the signed certificate and other intermediate certificates

and then run java command "java -jar lib/ace.jar import_cert"

Don't understand "have this CSR signed by a CA, you'll get a few certificates back..."
I just want to add this certificate to Chrome but that has to be in PKCS #12 format.
How do I get this done.

Certificate handling is not my strongest side.
Running Debian stable.

Appreciate all help I can get.
 
Old 03-08-2014, 08:02 AM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,334

Rep: Reputation: Disabled
A certificate has two functions:
  1. It's a way of handing out public cryptographic keys
  2. The recipient of a certificate can confirm the identity (subject) in the certificate by checking the signature using the issuer's public key
Chrome is complaining about not trusting the issuer while trying to validate the certificate (item [2]), since it doesn't actually have the public key of the issuer in its database of trusted Certificate Authorities. The reason is most likely that the certificate is self-signed.

The java command you ran has generated a Certificate Signing Request (CSR) containing a public key (and hopefully stored the corresponding private key in a separate file). This is useful if the certificate is related to an identity (e-mail address) or Internet domain which you actually own and control, and you want a third party to sign your key and create a signed certificate which can then be validated by others trusting that same third party.

If this is the route you want to take, you'll need to contact one of the many CAs participating in the Internet Public Key Infrastructure (PKI), like Verisign (Symantec), GoDaddy, RapidSSL, Thawte, Equifax etc. For a fee, the CA will validate your identity and issue a signed certificate based on either the .pem or .der file (it's just two files containing the same CSR in different formats).

However, if you just want one particular instance of Chrome to accept the self-signed certificate you already have, you can just manually import the certificate into the "Trusted Root CAs" certificate store on the client.

Last edited by Ser Olmy; 03-08-2014 at 08:04 AM.
 
Old 03-08-2014, 08:44 AM   #3
zkab
Member
 
Registered: Dec 2007
Posts: 142

Original Poster
Rep: Reputation: 16
Thank you for clarification.
To contact Verisign (Symantec), GoDaddy, RapidSSL is not the way to go for me.
You mentioned that I can make Chrome to accept the self-signed certificate by importing.
Doing so I receive following error:

Certification Authority Import Error.
Unable to parse file
 
Old 03-08-2014, 08:55 AM   #4
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,334

Rep: Reputation: Disabled
How are you importing the certificate?
 
Old 03-08-2014, 09:32 AM   #5
zkab
Member
 
Registered: Dec 2007
Posts: 142

Original Poster
Rep: Reputation: 16
Chrome -> Settings -> Show Advanced Setttings -> HTTPS/SSL -> Manage certificates -> Authorities -> Import -> xxx_certificate.csr.pem

I also tried:

Chrome -> Settings -> Show Advanced Setttings -> HTTPS/SSL -> Manage certificates -> Your Certificate -> Import -> xxx_certificate.csr.pem
but then I was asked for a password. I did not give a password when creating *.pem *.der files. So how can I give a password ?
 
Old 03-08-2014, 01:36 PM   #6
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,334

Rep: Reputation: Disabled
You can't import the .csr.pem file, because that file does not contain the certificate, just a Certificate Signing Request.

It should be possible to save the cartificate to a file by simply visiting the site. Even if you get an error message, it may be possible to click the SSL icon next to the URL in the address bar and export the certificate to a .csr file from there (I don't really know Chrome, but that's how it's done in Firefox).
 
Old 03-09-2014, 10:25 AM   #7
zkab
Member
 
Registered: Dec 2007
Posts: 142

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by Ser Olmy View Post
It should be possible to save the cartificate to a file by simply visiting the site. Even if you get an error message, it may be possible to click the SSL icon next to the URL in the address bar and export the certificate to a .csr file from there (I don't really know Chrome, but that's how it's done in Firefox).
I did export the certificate to a file from Firefox but when I tried to import it to Firefox it still keeps asking me of password ... which I don't know since I was not able to give it when creating it ... seems that I am totally lost.
 
Old 03-09-2014, 11:22 AM   #8
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,334

Rep: Reputation: Disabled
You should not use the ".csr" file extension, as Firefox (or any other program) will interpret that as a Certificate Signing Request, and those are usually encrypted and require a password.

Try again, but this time use the ".crt" extension.
 
Old 03-09-2014, 04:19 PM   #9
zkab
Member
 
Registered: Dec 2007
Posts: 142

Original Poster
Rep: Reputation: 16
I did not have ".csr" file extension but still Chrome gives the same error 'The site's security certificate is not trusted!'
I managed though to import it (via tab Servers) - it is under the tab 'Others' now.

Firefox has the exception option - that work so I don't get the error ... but unfortunatly Chrome doesn't seem to have this exception option for certificates.
 
Old 03-10-2014, 05:06 AM   #10
zkab
Member
 
Registered: Dec 2007
Posts: 142

Original Poster
Rep: Reputation: 16
I also checked http://code.google.com/p/chromium/wi...CertManagement
and tried to add a certificate (the one I exported from Firefox) but to no avail ...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
https: create certificate that does not expire Wim Sturkenboom Linux - Server 6 06-22-2018 06:58 AM
create ssl web certificate cccc Linux - Security 5 02-11-2009 08:04 PM
How to create OpenSSL certificate for use in IIS 6.0 Pastorino Linux - Security 3 09-23-2005 07:50 AM
How to create new SSL certificate for apache ?? chuck77 Linux - General 7 05-15-2003 01:16 PM
How do I create a self signed SSL certificate? mongoose Linux - Software 2 04-15-2003 06:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration