openvpn config parsing
Hi, yet another report on feature changes not documented.
I thought this may be related to --key-method 2 only, but it seems to be the same on --key-method 1. Has this changed some where in the 2.x development? In that case, we should document this for old users.
Thanks.
----- Forwarded message from Ron <[email protected]...> -----
From: Ron <[email protected]...>
To: Alberto Gonzalez Iniesta <[email protected]...>
Subject: openvpn config parsing
Date: Fri, 10 Dec 2004 12:09:42 +1030
X-CRM114-Version: 20040816.BlameClockworkOrange-auto.3 (regex: TRE 0.6.8) MF-A10FFB4C
X-CRM114-Status: Good ( pR: 0.9831 )
X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level:
Hi Alberto,
Recent updates of openvpn appear to have changed the handling of whitespace in tls certificate names.
ie. for:
Subject: C=Oz, ST=Secured, L=Zone, O=Riviera tunnel, OU=uoa VPN client,
CN=twain.riviera.oz/[email protected]...
I used to need:
tls-remote /C=Oz/ST=Secured/L=Zone/O=Riviera.tunnel/OU=uoa.VPN.client/CN=twain.riviera.oz/[email protected]...
Now it needs '_' not '.' for spaces:
tls-remote /C=Oz/ST=Secured/L=Zone/O=Riviera_tunnel/OU=uoa_VPN_client/CN=twain.riviera.oz/[email protected]...
This might be worth a mention in the readme, it broke my existing setup 'silently' -- though it might have been easier to find if I didn't run off chasing red herrings based on prior upgrade breakages first :-)
Anyway, thanks for maintaining this one, speaking as an old time user of cipe, this really is a very nice 'next step' in that problem space.
best,
Ron
----- End forwarded message -----
Signature · 5 lines
Alberto Gonzalez Iniesta | Formación, consultoría y soporte técnico agi@(inittab.org|debian.org)| en GNU/Linux y software libre Encrypted mail preferred | http://inittab.org Key fingerprint = 9782 04E7 2B75 405C F5E9 0C81 C514 AF8E 4BA4 01C3
Quoted 2 lines · Alberto Gonzalez Iniesta
Recent updates of openvpn appear to have changed the handling of whitespace in tls certificate names.
...
Quoted 1 line
Now it needs '_' not '.' for spaces:
My guess is that this is a consequence of some string-handling changes that were going on around 2.0-beta12 to 2.0-beta15.
Quoted 8 lines · Charles Duffy
Quoted 2 lines · Alberto Gonzalez Iniesta
Recent updates of openvpn appear to have changed the handling of whitespace in tls certificate names.
...
Quoted 1 line
Now it needs '_' not '.' for spaces:
My guess is that this is a consequence of some string-handling changes that were going on around 2.0-beta12 to 2.0-beta15.
Yes, this is something that needs to be better documented. Prior to 2.0-beta12, the string remapping code was a bit ad-hoc. Since then I've tried to unify all string remapping towards a consistent model which remaps illegal chars to '_'. The choice of underbar is arbitrary -- any inert character will do.
Here is a brief rundown of OpenVPN's current string types and the permitted character class for each string:
X509 Names: Alphanumeric, underbar ('_'), dash ('-'), dot ('.'), at ('@'), colon (':'), slash ('/'), and equal ('='). Alphanumeric is defined as a character which will cause the C library isalnum() function to return true.
Common Names: Alphanumeric, underbar ('_'), dash ('-'), dot ('.'), and at ('@').
--auth-user-pass username: Same as Common Name.
--auth-user-pass password: Any "printable" character except CR or LF. Printable is defined to be a character which will cause the C library isprint() function to return true.
--client-config-dir filename as derived from common name or username:
Alphanumeric, underbar ('_'), dash ('-'), and dot ('.') except for "." or ".." as standalone strings.
Environmental variable names: Alphanumeric or underbar ('_').
Environmental variable values: Any printable character.
For all cases, characters in a string which are not members of the legal character class for that string type will be remapped to underbar ('_').
Q: Why is string remapping necessary?
A: It's an important security feature to prevent the malicious coding of strings from untrusted sources to be passed as parameters to scripts, saved in the environment, used as a common name, translated to a filename, etc.
James
Quoted 8 lines · James Yonan
Quoted 6 lines · Charles Duffy
Quoted 2 lines · Alberto Gonzalez Iniesta
Recent updates of openvpn appear to have changed the handling of whitespace in tls certificate names.
...
Quoted 1 line
Now it needs '_' not '.' for spaces:
Quoted 8 lines
Quoted 2 lines
My guess is that this is a consequence of some string-handling changes that were going on around 2.0-beta12 to 2.0-beta15.
Yes, this is something that needs to be better documented. Prior to 2.0-beta12, the string remapping code was a bit ad-hoc. Since then I've tried to unify all string remapping towards a consistent model which remaps illegal chars to '_'. The choice of underbar is arbitrary -- any inert character will do.
Thanks Charles & James, I'll document this in the Debian package README file.
Signature · 5 lines
Alberto Gonzalez Iniesta | Formación, consultoría y soporte técnico agi@(inittab.org|debian.org)| en GNU/Linux y software libre Encrypted mail preferred | http://inittab.org Key fingerprint = 9782 04E7 2B75 405C F5E9 0C81 C514 AF8E 4BA4 01C3