summaryrefslogtreecommitdiffstats
path: root/ssl.c
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2010-12-15 10:53:04 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2010-12-17 20:46:26 +0100
commitfbd18db6485e3d08d8d933263cff96ee60eddb39 (patch)
tree683bf0e0f025442e54ac8f6993dfeccbb502512c /ssl.c
parent709271e8af5d19472cb200956bcc9b756a655f77 (diff)
downloadopenvpn-fbd18db6485e3d08d8d933263cff96ee60eddb39.tar.gz
openvpn-fbd18db6485e3d08d8d933263cff96ee60eddb39.tar.xz
openvpn-fbd18db6485e3d08d8d933263cff96ee60eddb39.zip
Make the --x509-username-field feature an opt-in feature
After some discussion [1] regarding an extension of this feature, James Yonan wanted this extension to be an opt-in feature. However, as it does not make sense to opt-in on a extension of a feature which was discussed, this patch makes the base feature an opt-in instead. The base feature comes from commit 2e8337de248ef0b5b48cbb2964 (beta2.2) and commit 935c62be9c0c8a256112 (feat_misc). [1] http://thread.gmane.org/gmane.network.openvpn.devel/4266 Signed-off-by: David Sommerseth <davids@redhat.com> Acked-by: James Yonan <james@openvpn.net> (cherry picked from commit 024972e2ced84c6e5cabc43620ab510e5693d1d4)
Diffstat (limited to 'ssl.c')
-rw-r--r--ssl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ssl.c b/ssl.c
index 2fa091a..da6f7d7 100644
--- a/ssl.c
+++ b/ssl.c
@@ -1874,7 +1874,11 @@ init_ssl (const struct options *options)
}
else
#endif
+#ifdef ENABLE_X509ALTUSERNAME
x509_username_field = (char *) options->x509_username_field;
+#else
+ x509_username_field = X509_USERNAME_FIELD_DEFAULT;
+#endif
SSL_CTX_set_verify (ctx, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT,
verify_callback);