Nyr / openvpn-install

OpenVPN road warrior installer for Ubuntu, Debian, AlmaLinux, Rocky Linux, CentOS and Fedora
MIT License
19.27k stars 4.92k forks source link

Windows 7 gives a bad base64 error #50

Closed liveforfree closed 9 years ago

liveforfree commented 9 years ago

When using the generated .ovpn file on windows I got the following error windows PEM_read_bio:bad base64 encode

I have googled around alot and it seems to be that some people got this error with problems with line endings not being unix, I have done everything that was suggested and cannot fix the encoding. Really stuck on what to do about this one

Nyr commented 9 years ago

Looks like a problem in your end. Can you please try to download the certificate from the server directly to Windows? Alternatively, you can put it in a .zip to ensure it is not modified.

liveforfree commented 9 years ago

I fixed it in the end by recreating the whole file by hand, something is happening with the unix file endings when taking the generated .ovpn file over to windows 7. I found several posts about this online from other users, completely unrelated to this. To fix it you just need to make sure the file is ASCII character encoding, and for windows the inline certs dont work so you have to make the ca.cert and ca.key files. Then it's all good. Thanks again for this superb script, I have donated :)

On Thu, Jul 2, 2015 at 6:49 PM, Nyr notifications@github.com wrote:

Looks like a problem in your end. Can you please try to download the certificate from the server directly to Windows? Alternatively, you can put it in a .zip to ensure it is not modified.

— Reply to this email directly or view it on GitHub https://github.com/Nyr/openvpn-install/issues/50#issuecomment-118007277.

dafx commented 9 years ago

I am having to the problem on Win7-64. liveforfree mentioned

"for windows the inline certs dont work so you have to make the ca.cert and ca.key files"

Can you please give the instructions how to do this exactly? or better yet, build this as an option in the script.

liveforfree commented 9 years ago

Ok mate, you simply gotta goto the openvpn directroy on your linux box where you are running this install shell script and copy out the .ca and .key files to your local machine, then ensure they reside inside of your locals openvpn/config directory (same directory the .ovpn fille be)

next inside the .ovpn file that is generated you must remove the inline

and tags and put it back to the default samples and also turn on the tap adapter because it is windows not linux - after that it worked very well. but yeh certainly cost me a hour or so and alot of energy figuring out wtf is up with shitty windows. it's the same story again and again, our elders at microsoft decide to release a unfinished product and cash out on it - so the shame rains on their heads really because i have no respect for them and i would spit on them if i saw them in the street for their pathetic abilities with computers (not to mention internet explorer) I hope u got it fixed an i hope windows is over soon cos it truely is the worst operating system i ever encountered in my life On Sun, Jul 5, 2015 at 5:40 AM, dafx notifications@github.com wrote: > I am having to the problem on Win7-64. liveforfree mentioned > > "for windows the inline certs dont work so you have to make the ca.cert > and ca.key files" > > Can you please give the instructions how to do this exactly? or better > yet, build this as an option in the script. > > — > Reply to this email directly or view it on GitHub > https://github.com/Nyr/openvpn-install/issues/50#issuecomment-118560860.
Nyr commented 9 years ago

I am not able to reproduce this on Windows 7 with the current version of OpenVPN. In-line certificates are working fine for me.

dafx commented 9 years ago

Here is the screenshot of what I see.

2015-07-06_2148

Nyr commented 9 years ago

Sorry but I still can't reproduce.

liveforfree commented 9 years ago

Lucky you :)

On Tue, Jul 7, 2015 at 4:33 PM, Nyr notifications@github.com wrote:

Sorry but I still can't reproduce.

— Reply to this email directly or view it on GitHub https://github.com/Nyr/openvpn-install/issues/50#issuecomment-119137057.

dafx commented 9 years ago

I really appreciate what you have done here. But my QA would start screaming if I say "sorry, works for me".

Nyr commented 9 years ago

I just said I can't reproduce.

From what I know, this could have nothing to do with the script itself: if someone can help in proving the opposite and I can reproduce the problem, I'll reopen the issue and attempt a fix :)