Can't import private-key.pem

Hi,

I’m following the instructions here: http://wiki.mikrotik.com/wiki/OpenVPN#Usage

I’m at the location where it says “Now is the tricky part” now I see why… :slight_smile:

I get to the step where it says to import the private key and I simply get a decryption failure and the key will not import:

[admin@MikroTik] /certificate> import file-name=pvtkey.pem
passphrase: ********
certificates-imported: 0
private-keys-imported: 0
files-imported: 0
decryption-failures: 1
keys-with-no-certificate: 0

I’m assuming I am trying to import the private key that was created by the router when I generated the certificate request. If that is not correct then the wiki is unclear.

Any help would be appreciated..

Thanks
-Rich

OK… someone needs to modify those instructions on the OpenVPN certificate stuff. The key that the MT generates is a pkcs8 format and it specifically states on the wiki:

Warning: RouterOS does not support keys in pkcs8 format. To import keys in pkcs8 format run command:
openssl rsa -in myKey.key -text and write key output to new file. Upload new file to RouterOS and import

So… if I take the private key off the router and run that command using openssl then it works. Someone needs to modify the instructions for the openvpn article to reflect that.

-Rich

Email support@mikrotik.com with a link to here and raise a documentation bug to make sure it gets fixed. These are user forums - staff may or may not read the forums.

it’s user part of Wiki, so anyone can edit it - just register :slight_smile:

it’s user part of Wiki, so anyone can edit it - just register

Thanks… I already tried though - I can’t find a link to register for the wiki. Only a log in link. I went to the main page as well - still no option to register. Maybe I’m missing something.

-Rich

hmmm, indeed…

Normis, is registration closed?..

http://wiki.mikrotik.com/index.php?title=Special:UserLogin&action=submitlogin&type=signup

Yes, registration is closed but you can email and request a new account. They were getting too much spam. :wink:

I sent a note to support@microtik.com to update it. I don’t know if/when it will happen but it’s kind of important since people will spend unnecessary amounts of time trying to make something work where just an additional bit of information will save them some time.

-Rich

Thank you very much for the report.
We will fix the wiki document shortly.

P.S. Yes, omega already explained current status of the wiki.