Config has parse_hex_error

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
jax93
OpenVpn Newbie
Posts: 2
Joined: Wed Jan 10, 2024 8:21 am

Config has parse_hex_error

Post by jax93 » Wed Jan 10, 2024 8:30 am

Hi all, I'm having trouble with a configuration file. I am using windows 11 and openvpn v3 client. When i try to import the config file i get this error "parse_hex_error". Can you tell me what the problem could be?
With this configuration file I successfully connected to remote server using openvpn GUI version v11.14.0.0.

Fadim
OpenVPN User
Posts: 40
Joined: Mon May 15, 2023 12:14 pm

Re: Config has parse_hex_error

Post by Fadim » Wed Jan 10, 2024 9:29 am

I think this error might be due to mismatched files or unsupported directives. Ensure all necessary files (CA, certificate, key) are in the same directory as your .ovpn file. Also, check that your .ovpn file doesn't contain options unsupported by your OpenVPN Connect app version. You could remove these unsupported directives or, as a less recommended option, try an older version of the app.

jax93
OpenVpn Newbie
Posts: 2
Joined: Wed Jan 10, 2024 8:21 am

Re: Config has parse_hex_error

Post by jax93 » Wed Jan 10, 2024 9:54 am

Fadim wrote:
Wed Jan 10, 2024 9:29 am
I think this error might be due to mismatched files or unsupported directives. Ensure all necessary files (CA, certificate, key) are in the same directory as your .ovpn file. Also, check that your .ovpn file doesn't contain options unsupported by your OpenVPN Connect app version. You could remove these unsupported directives or, as a less recommended option, try an older version of the app.
CA, certificate, key are written in the config itself. Do you know the list of unsupported derequests?
Right now my file looks like this:
client
dev tun
proto udp
remote **** 1914

auth-user-pass
# auth-nocache

resolv-retry infinite
nobind
persist-key
persist-tun
fragment 1300
mssfix

# ping 30

tls-client
cipher AES-256-CBC

ns-cert-type server
comp-lzo
verb 3
<ca>
-----BEGIN CERTIFICATE-----
***
-----END CERTIFICATE-----
</ca>

<cert>
-----BEGIN CERTIFICATE-----
***
-----END CERTIFICATE-----
</cert>

<key>
-----BEGIN ENCRYPTED PRIVATE KEY-----
***
-----END ENCRYPTED PRIVATE KEY-----
</key>

key-direction 1
<tls-auth>
-----BEGIN OpenVPN Static key V1-----
**
-----END OpenVPN Static key V1-----
</tls-auth>

Fadim
OpenVPN User
Posts: 40
Joined: Mon May 15, 2023 12:14 pm

Re: Config has parse_hex_error

Post by Fadim » Thu Jan 11, 2024 9:30 am

Alright, the 'parse_hex_error' often indicates a problem with the encoding or formatting of certain elements in the file. Since you've mentioned that the CA, certificate, and key are embedded directly in the config, it's crucial to ensure they are correctly formatted.

Here's a checklist:
- Confirm Base64 encoding for the CA, certificate, and key.
- Verify correct 'BEGIN' and 'END' headers and footers in these sections.
- Replace deprecated directives, like 'ns-cert-type', with updated ones (e.g., 'remote-cert-tls').

Post Reply