Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Where I live we have a corporate firewall which is configured to need a certificate installed on the computers in the house for it to be able to scan for vulnerabilities in secure connections. Without it, a few things won't work as the firewall behaves as a man in the middle, and of course a few websites will deny access to prevent any harm as it looks dangerous.

On Windows, I'd just need to double click the certificate (.p12 extension), insert the password and specify it to be put in "Trusted Root Certification Authorities" and be done with it. On Linux, I haven't had much luck in doing that.

I'm running Arch.

share|improve this question
    
What distribution? The procedure will vary, but usually it involves putting the CA cert in /etc/ssl/certs and running c_rehash. –  Patrick Jun 6 at 3:18
    
I use Arch. Is there anything I need to do with the file? In /etc/ssl/certs there's a bunch of certificates ending with .pem, while mine ends with .p12. @Patrick –  Raghap Jun 6 at 3:28
    
I'm not sure this is possible on Linux: serverfault.com/questions/18964/… –  slm Jun 6 at 11:04
add comment

1 Answer 1

I don't personally use Arch Linux, but this procedure works on most distributions.

First, you need to extract the CA certificate from your bundle. p12 files are basically a bundle of several components of a certificate.

openssl pkcs12 -nokeys -cacerts -in bundle.p12

You'll get one or more certificates dumped to your console. If you get more than one, find the one where the subject is the same as the issuer. This is your root certificate.

Take your root certificate (everything between, and including, the BEGIN CERTIFICATE and END CERTIFICATE lines), and save it in a file in /etc/ssl/certs with the extension .pem.

Then do the following:

cd /etc/ssl/certs
c_rehash
share|improve this answer
    
I tried that, but it didn't dump anything in the console or made any files I could peak in. [vlad@LV-268 cert]$ openssl pkcs12 -nokeys -cacerts -in cert_Hjemmecert.p12 Enter Import Password: MAC verified OK [vlad@LV-268 cert]$ ls cert_Hjemmecert.p12 Any ideas? –  Raghap Jun 6 at 4:39
    
You can try openssl pkcs12 -nokeys -in bundle.p12. It'll likely output a cert, but whether that cert is the CA cert is whats in doubt. –  Patrick Jun 7 at 8:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.