summaryrefslogtreecommitdiff
path: root/debian/patches/openvpn-pkcs11warn.patch
blob: 758a555a81e380a8aa39c9cdbaf7f49281f69538 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: Warn users about deprecated pkcs11 options
Author: Florian Kulzer <florian.kulzer+debian@icfo.es>
Bug-Debian: http://bugs.debian.org/475353
Index: openvpn/src/openvpn/options.c
===================================================================
--- openvpn.orig/src/openvpn/options.c	2016-12-07 13:18:03.856865710 +0100
+++ openvpn/src/openvpn/options.c	2016-12-07 13:18:03.856865710 +0100
@@ -6647,6 +6647,20 @@
     {
       VERIFY_PERMISSION (OPT_P_ROUTE_EXTRAS);
     }
+  else if (streq (p[0], "pkcs11-id-type") ||
+           streq (p[0], "pkcs11-sign-mode") ||
+           streq (p[0], "pkcs11-slot") ||
+           streq (p[0], "pkcs11-slot-type") ||
+           streq (p[0], "show-pkcs11-objects") ||
+           streq (p[0], "show-pkcs11-slots"))
+    {
+      if (file)
+	msg (msglevel, "You are using an obsolete parameter in %s:%d: %s (%s).\nPlease see /usr/share/doc/openvpn/NEWS.Debian.gz for details.",
+             file, line, p[0], PACKAGE_VERSION);
+      else
+	msg (msglevel, "You are using an obsolete parameter: --%s (%s).\nPlease see /usr/share/doc/openvpn/NEWS.Debian.gz for details.",
+             p[0], PACKAGE_VERSION);
+    }
 #endif
 #if PASSTOS_CAPABILITY
   else if (streq (p[0], "passtos") && !p[1])