[SOLVED] Problem with server certificates. Error 0B080074

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
aborrero
OpenVpn Newbie
Posts: 3
Joined: Mon Jun 06, 2011 11:58 am

[SOLVED] Problem with server certificates. Error 0B080074

Post by aborrero » Mon Jun 06, 2011 12:00 pm

Hi there.

In my server I get this error message when starting:

Cannot load private key file /etc/ssl/private/whatever.key: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch

I generated the key and the cert from a PKCS12 file, using openssl

Any idea?

Regards.
Last edited by aborrero on Mon Jun 06, 2011 2:25 pm, edited 1 time in total.

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Problem with server certificates. Error 0B080074

Post by janjust » Mon Jun 06, 2011 12:56 pm

the certificate used and the private key /etc/ssl/private/whatever.key do not belong to each other - you can also specify the pkcs12 file directly using

Code: Select all

pkcs12 </path/to/pkcs12/file>

aborrero
OpenVpn Newbie
Posts: 3
Joined: Mon Jun 06, 2011 11:58 am

Re: Problem with server certificates. Error 0B080074

Post by aborrero » Mon Jun 06, 2011 1:53 pm

Hi.

The .crt and .key files are extracted from the pkcs12 file using openssl. I don't see anything bad with that.

Using pkcs12 file prompt for a password everytime I start the server. If there is a way to remove the password from a pkcs12 file i will look for.

aborrero
OpenVpn Newbie
Posts: 3
Joined: Mon Jun 06, 2011 11:58 am

Re: Problem with server certificates. Error 0B080074

Post by aborrero » Mon Jun 06, 2011 2:24 pm

SOLVED!

It was a bad use of openssl.

To get key file:
openssl pkcs12 -in file.p12 -out file.key -clcerts -nodes
[...prompt for password...]

To get crt file:
openssl pkcs12 -in file.p12 -out file.crt -nocerts -nodes
[...prompt for password...]

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: [SOLVED] Problem with server certificates. Error 0B08007

Post by janjust » Mon Jun 06, 2011 2:48 pm

Excellent!

BTW, you can remove the password from a PKCS12 file using

Code: Select all

openssl pkcs12 -in <p12file> -nodes -out <newp12file>

Post Reply