Skip to contentSkip to conversation

incorrect common name extraction

Openvpn-devel Pavel Shramov 2 participants 3 messages Nov 22, 2007 – Jan 21, 2008

lore
Share & tools
lore
#0 lore raw

Openvpn extracts only part of CN before '/'. For example from "/O=MSU/O=Grid/OU=IMEC/OU=ca.grid.pp.ru/CN=host/vpn.grid.pp.ru" openvpn extracts "host" (correct is "host/vpn.grid.pp.ru"). So all hosts get one CN "host" and client-connect script get incorrect info.

DN's of such kind are used in Globus.

Fix (rewriting extract_x509_field to use openssl library functions) is attached.
Second patch adds '/' to the list of allowed chars in CN so it won't be remapped.

Pavel

commit c96f2538fb506f6c531628ca4f48c3eb33a34765

Author: Pavel Shramov <[email protected]...>
Date:   Wed Nov 21 17:40:32 2007 +0300

allow / in CN

ssl.h +1 -1
index e07f19a..4319a81 100644
@@ -282,7 +282,7 @@
 
 /* Legal characters in an X509 or common name */
 #define X509_NAME_CHAR_CLASS   (CC_ALNUM|CC_UNDERBAR|CC_DASH|CC_DOT|CC_AT|CC_COLON|CC_SLASH|CC_EQUAL)
-#define COMMON_NAME_CHAR_CLASS (CC_ALNUM|CC_UNDERBAR|CC_DASH|CC_DOT|CC_AT)
+#define COMMON_NAME_CHAR_CLASS (CC_ALNUM|CC_UNDERBAR|CC_DASH|CC_DOT|CC_AT|CC_SLASH)
 
 /* Maximum length of OCC options string passed as part of auth handshake */
 #define TLS_OPTIONS_LEN 512

commit c332964d29fb428c01dc691ececc7d80cce07dbd

Author: Pavel Shramov <[email protected]...>
Date:   Wed Nov 21 17:40:21 2007 +0300

fix x509 name fields extraction function

ssl.c +47 -1

60 lines not on this page · raw message

#2 lore raw

Pavel,

The patch has been accepted. It's already been committed in the svn to the BETA21 branch.

James

Quoted 19 lines · Pavel Shramov

Since there is no reply from openvpn crew I'd ask one more time. Is it possible to include patches to fix common name handling? Or they are refused?

Links to original mail
http://permalink.gmane.org/gmane.network.openvpn.devel/2101
http://bugs.debian.org/452274

Pavel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel