[Solved] EasyRSA 3 build-ca error

Support forum for Easy-RSA certificate management suite.

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

Locked
xlepws
OpenVpn Newbie
Posts: 12
Joined: Sun Oct 25, 2015 2:53 pm

[Solved] EasyRSA 3 build-ca error

Post by xlepws » Mon Mar 14, 2016 9:30 pm

Hello, I'm trying to create a VPN server on a Win10 machine..I can successfully enter the EasyRSA 3 Shell, do the init-pki, then I get an error during the build-ca phase:

Code: Select all

EasyRSA Shell
# ./easyrsa init-pki

Note: using Easy-RSA configuration from: ./vars

init-pki complete; you may now create a CA or requests.
Your newly created PKI dir is: c:/Program Files/OpenVPN/EasyRSA-3.0.1/pki


EasyRSA Shell
# ./easyrsa build-ca

Note: using Easy-RSA configuration from: ./vars
./easyrsa[1215]: mktemp: not found
./easyrsa[1215]: mktemp: not found
Loading 'screen' into random state - done
Generating a 2048 bit RSA private key
..................+++
..................................................+++
writing new private key to ''
Invalid argument
3868:error:02001000:system library:fopen:system library:bss_file.c:398:fopen('','wb')
3868:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:

Easy-RSA error:

Failed to build the CA
What can that be? I have absolutely no clue on how to proceed :?

Thank you!

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: [EasyRSA 3] build-ca error

Post by Traffic » Mon Mar 14, 2016 9:45 pm

xlepws wrote:Your newly created PKI dir is: c:/Program Files/OpenVPN/EasyRSA-3.0.1/pki
Are you sure you have write access to this directory ?

xlepws
OpenVpn Newbie
Posts: 12
Joined: Sun Oct 25, 2015 2:53 pm

Re: [EasyRSA 3] build-ca error

Post by xlepws » Mon Mar 14, 2016 10:14 pm

Hi, I suppose "I" have write access to the folder. I mean, I launched

Code: Select all

c:\Program Files\OpenVPN\EasyRSA-3.0.1>bin\sh.exe bin\easyrsa-shell-init.sh
through an Admin Command Prompt, and it (the easyrsa shell) was able to create the "pki" folder..why shouldn't it be able to write in it?

I also tried disabling inheritance to EasyRSA-3.0.1 folder and giving every user the "full-control" permissions and pushing them down to subfolders..but nothing changes, the error is still the same :cry:

Any suggestion?

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: [EasyRSA 3] build-ca error

Post by Traffic » Mon Mar 14, 2016 11:21 pm

Looks like you have encountered this bug:
https://github.com/OpenVPN/easy-rsa/issues/84

I recommend you download v3.0.0-rc2
https://github.com/OpenVPN/easy-rsa/rel ... v3.0.0-rc2

Also:
topic19629.html

xlepws
OpenVpn Newbie
Posts: 12
Joined: Sun Oct 25, 2015 2:53 pm

Re: [EasyRSA 3] build-ca error

Post by xlepws » Mon Mar 14, 2016 11:24 pm

bang on ;)

What I had done was to copy the "missing" \bin files from 3.0.0-rc2 to 3.0.1, then proceed. But somehow 8-) this wasn't the way to go.
Just using the full 3.0.0-rc2 folder did the trick!

Thank you!

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: [EasyRSA 3] build-ca error

Post by Traffic » Mon Mar 14, 2016 11:41 pm

Thanks for letting us know the solution 8-)

Locked