View | Details | Raw Unified | Return to bug 219400
Collapse All | Expand All

(-)b/security/gnupg/Makefile (+1 lines)
Lines 2-7 Link Here
2
2
3
PORTNAME=	gnupg
3
PORTNAME=	gnupg
4
PORTVERSION=	2.1.21
4
PORTVERSION=	2.1.21
5
PORTREVISION=	1
5
CATEGORIES=	security
6
CATEGORIES=	security
6
MASTER_SITES=	GNUPG
7
MASTER_SITES=	GNUPG
7
8
(-)b/security/gnupg/files/patch-g10-call-agent.c (+62 lines)
Added Link Here
1
--- g10/call-agent.c.orig	2017-05-15 14:13:22.000000000 +0200
2
+++ g10/call-agent.c	2017-05-19 08:45:45.000000000 +0200
3
@@ -184,7 +184,8 @@
4
 
5
 
6
 /* Print a warning if the server's version number is less than our
7
-   version number.  Returns an error code on a connection problem.  */
8
+   version number.  Returns an error code on a connection problem.
9
+   Ignore an error for scdaemon (MODE==2).  */
10
 static gpg_error_t
11
 warn_version_mismatch (assuan_context_t ctx, const char *servername, int mode)
12
 {
13
@@ -193,7 +194,7 @@
14
   const char *myversion = strusage (13);
15
 
16
   err = get_assuan_server_version (ctx, mode, &serverversion);
17
-  if (err)
18
+  if (err && mode != 2)
19
     log_error (_("error getting version from '%s': %s\n"),
20
                servername, gpg_strerror (err));
21
   else if (compare_version_strings (serverversion, myversion) < 0)
22
@@ -217,10 +218,12 @@
23
 }
24
 
25
 
26
+#define FLAG_FOR_CARD_SUPPRESS_ERRORS 2
27
+
28
 /* Try to connect to the agent via socket or fork it off and work by
29
    pipes.  Handle the server's initial greeting */
30
 static int
31
-start_agent (ctrl_t ctrl, int for_card)
32
+start_agent (ctrl_t ctrl, int flag_for_card)
33
 {
34
   int rc;
35
 
36
@@ -280,7 +283,7 @@
37
         }
38
     }
39
 
40
-  if (!rc && for_card && !did_early_card_test)
41
+  if (!rc && flag_for_card && !did_early_card_test)
42
     {
43
       /* Request the serial number of the card for an early test.  */
44
       struct agent_card_info_s info;
45
@@ -292,7 +295,7 @@
46
         rc = assuan_transact (agent_ctx, "SCD SERIALNO openpgp",
47
                               NULL, NULL, NULL, NULL,
48
                               learn_status_cb, &info);
49
-      if (rc)
50
+      if (rc && !(flag_for_card & FLAG_FOR_CARD_SUPPRESS_ERRORS))
51
         {
52
           switch (gpg_err_code (rc))
53
             {
54
@@ -1023,7 +1026,7 @@
55
   char *serialno = NULL;
56
   char line[ASSUAN_LINELENGTH];
57
 
58
-  err = start_agent (NULL, 1);
59
+  err = start_agent (NULL, 1 | FLAG_FOR_CARD_SUPPRESS_ERRORS);
60
   if (err)
61
     return err;
62
 

Return to bug 219400