Browse code

Deprecate --ns-cert-type

The nsCertType x509 extension is very old, and barely used. We already
have had an alternative for a long time: --remote-cert-tls uses the far
more common keyUsage and extendedKeyUsage extensions instead.

OpenSSL 1.1 longer exposes an API to (separately) check the nsCertType x509
extension. Since we want be able to migrate to OpenSSL 1.1, we should
deprecate this option immediately.

Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1488653397-2309-1-git-send-email-steffan@karger.me>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg14222.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>

Steffan Karger authored on 2017/03/05 03:49:57
Showing 5 changed files
... ...
@@ -1,5 +1,5 @@
1
-Version 2.4.0
2
-=============
1
+Overview of changes in 2.4
2
+==========================
3 3
 
4 4
 
5 5
 New features
... ...
@@ -302,3 +302,12 @@ Maintainer-visible changes
302 302
   header combinations.  In most of these situations it is recommended to
303 303
   use -std=gnu99 in CFLAGS.  This is known to be needed when doing
304 304
   i386/i686 builds on RHEL5.
305
+
306
+
307
+Version 2.4.1
308
+=============
309
+ - ``--ns-cert-type`` is deprecated.  Use ``--remote-cert-tls`` instead.
310
+   The nsCertType x509 extension is very old, and barely used.
311
+   ``--remote-cert-tls`` uses the far more common keyUsage and extendedKeyUsage
312
+   extension instead.  Make sure your certificates carry these to be able to
313
+   use ``--remote-cert-tls``.
... ...
@@ -327,7 +327,7 @@ http\-proxy 192.168.0.8 8080
327 327
 persist\-key
328 328
 persist\-tun
329 329
 pkcs12 client.p12
330
-ns\-cert\-type server
330
+remote\-cert\-tls server
331 331
 verb 3
332 332
 .in -4
333 333
 .ft
... ...
@@ -5313,7 +5313,11 @@ as X509_<depth>_<attribute>=<value>.  Multiple
5313 5313
 options can be defined to track multiple attributes.
5314 5314
 .\"*********************************************************
5315 5315
 .TP
5316
-.B \-\-ns\-cert\-type client|server
5316
+.B \-\-ns\-cert\-type client|server (DEPRECATED)
5317
+This option is deprecated.  Use the more modern equivalent
5318
+.B \-\-remote\-cert\-tls
5319
+instead.  This option will be removed in OpenVPN 2.5.
5320
+
5317 5321
 Require that peer certificate was signed with an explicit
5318 5322
 .B nsCertType
5319 5323
 designation of "client" or "server".
... ...
@@ -2986,6 +2986,10 @@ do_option_warnings(struct context *c)
2986 2986
     {
2987 2987
         msg(M_WARN, "WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.");
2988 2988
     }
2989
+    if (o->ns_cert_type)
2990
+    {
2991
+        msg(M_WARN, "WARNING: --ns-cert-type is DEPRECATED.  Use --remote-cert-tls instead.");
2992
+    }
2989 2993
 #endif /* ifdef ENABLE_CRYPTO */
2990 2994
 
2991 2995
     /* If a script is used, print appropiate warnings */
... ...
@@ -635,8 +635,8 @@ static const char usage_message[] =
635 635
     "--verify-x509-name name: Accept connections only from a host with X509 subject\n"
636 636
     "                  DN name. The remote host must also pass all other tests\n"
637 637
     "                  of verification.\n"
638
-    "--ns-cert-type t: Require that peer certificate was signed with an explicit\n"
639
-    "                  nsCertType designation t = 'client' | 'server'.\n"
638
+    "--ns-cert-type t: (DEPRECATED) Require that peer certificate was signed with \n"
639
+    "                  an explicit nsCertType designation t = 'client' | 'server'.\n"
640 640
     "--x509-track x  : Save peer X509 attribute x in environment for use by\n"
641 641
     "                  plugins and management interface.\n"
642 642
 #if defined(ENABLE_CRYPTO_OPENSSL) && OPENSSL_VERSION_NUMBER >= 0x10001000
... ...
@@ -40,7 +40,7 @@ TEST_RUN_LIST="1 2"
40 40
 #
41 41
 OPENVPN_BASE_P2MP="--client --ca $CA_CERT \
42 42
 	--cert $CLIENT_CERT --key $CLIENT_KEY \
43
-	--ns-cert-type server --nobind --comp-lzo --verb 3"
43
+	--remote-cert-tls server --nobind --comp-lzo --verb 3"
44 44
 
45 45
 # base config for p2p tests
46 46
 #