Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37775909
en ru br
ALT Linux repositórios
S:3.1-alt1

Group :: Sistema/Servidores
RPM: gvpe

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: gvpe-3.0-alt-openssl.patch
Download


Fix build with OpenSSL >= 1.1.0
--- src/conf.C
+++ src/conf.C
@@ -554,6 +554,19 @@ configuration_parser::parse_file (const char *fname)
     }
 }
 
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+void RSA_get0_key(const RSA *r,
+                 const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
+{
+   if (n != NULL)
+       *n = r->n;
+   if (e != NULL)
+       *e = r->e;
+   if (d != NULL)
+       *d = r->d;
+}
+#endif
+
 configuration_parser::configuration_parser (configuration &conf,
                                             bool need_keys,
                                             int argc,
@@ -649,13 +662,16 @@ configuration_parser::configuration_parser (configuration &conf,
               exit (EXIT_FAILURE);
             }
 
-          if (conf.rsa_key && conf.thisnode->rsa_key)
-            if (BN_cmp (conf.rsa_key->n, conf.thisnode->rsa_key->n) != 0
-                || BN_cmp (conf.rsa_key->e, conf.thisnode->rsa_key->e) != 0)
+          if (conf.rsa_key && conf.thisnode->rsa_key) {
+            const BIGNUM *n, *e, *thisnode_n, *thisnode_e;
+            RSA_get0_key(conf.rsa_key, &n, &e, NULL);
+            RSA_get0_key(conf.thisnode->rsa_key, &thisnode_n, &thisnode_e, NULL);
+            if (BN_cmp (n,thisnode_n) != 0 || BN_cmp (e, thisnode_e) != 0)
               {
                 slog (L_NOTICE, _("private hostkey and public node key mismatch: is '%s' the correct node?"), ::thisnode);
                 exit (EXIT_FAILURE);
               }
+            }
         }
     }
 
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009