Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37528338
en ru br
Репозитории ALT
S:3.1-alt1
5.1: 2.22-alt1
www.altlinux.org/Changes

Группа :: Система/Серверы
Пакет: gvpe

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: gvpe-3.0-alt-openssl.patch
Скачать


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);
               }
+            }
         }
     }
 
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin