AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / unix / 问题 / 727844
Accepted
AwesomeJackify
AwesomeJackify
Asked: 2022-12-09 20:12:49 +0800 CST2022-12-09 20:12:49 +0800 CST 2022-12-09 20:12:49 +0800 CST

使用 OpenSSL 为 ARM 编译 NTPv4 时出错

  • 772

错误与“ntp_crypto.c:2248:2: error: unknown type name 'DSA_SIG'; did you mean 'ECDSA_SIG'?”

make 失败,输出如下:

tp_crypto.c: In function 'crypto_alice':

ntp_crypto.c:2188:13: warning: implicit declaration of function 'EVP_PKEY_get0_DSA'; did you mean 'EVP_PKEY_get0_RSA'? [-Wimplicit-function-declaration]

  if ((dsa = EVP_PKEY_get0_DSA(peer->ident_pkey->pkey)) == NULL) {

             ^~~~~~~~~~~~~~~~~

             EVP_PKEY_get0_RSA

ntp_crypto.c:2188:11: warning: assignment makes pointer from integer without a cast [-Wint-conversion]

  if ((dsa = EVP_PKEY_get0_DSA(peer->ident_pkey->pkey)) == NULL) {

           ^

ntp_crypto.c:2199:2: warning: implicit declaration of function 'DSA_get0_pqg'; did you mean 'DH_get0_pqg'? [-Wimplicit-function-declaration]

  DSA_get0_pqg(dsa, NULL, &q, NULL);

  ^~~~~~~~~~~~

  DH_get0_pqg

ntp_crypto.c: In function 'crypto_bob':

ntp_crypto.c:2248:2: error: unknown type name 'DSA_SIG'; did you mean 'ECDSA_SIG'?

  DSA_SIG *sdsa;  /* DSA signature context fake */

  ^~~~~~~

  ECDSA_SIG

ntp_crypto.c:2266:6: warning: assignment makes pointer from integer without a cast [-Wint-conversion]

  dsa = EVP_PKEY_get0_DSA(iffkey_info->pkey);

      ^

ntp_crypto.c:2268:2: warning: implicit declaration of function 'DSA_get0_key'; did you mean 'RSA_get0_key'? [-Wimplicit-function-declaration]

  DSA_get0_key(dsa, NULL, &priv_key);

  ^~~~~~~~~~~~

  RSA_get0_key

ntp_crypto.c:2287:9: warning: implicit declaration of function 'DSA_SIG_new'; did you mean 'ECDSA_SIG_new'? [-Wimplicit-function-declaration]

  sdsa = DSA_SIG_new();

         ^~~~~~~~~~~

         ECDSA_SIG_new

ntp_crypto.c:2287:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]

  sdsa = DSA_SIG_new();

       ^

ntp_crypto.c:2294:2: warning: implicit declaration of function 'DSA_SIG_set0'; did you mean 'ECDSA_SIG_set0'? [-Wimplicit-function-declaration]

  DSA_SIG_set0(sdsa, bn, bk);

  ^~~~~~~~~~~~

  ECDSA_SIG_set0

ntp_crypto.c:2299:3: warning: implicit declaration of function 'DSA_print_fp'; did you mean 'RSA_print_fp'? [-Wimplicit-function-declaration]

   DSA_print_fp(stdout, dsa, 0);

   ^~~~~~~~~~~~

   RSA_print_fp

ntp_crypto.c:2306:8: warning: implicit declaration of function 'i2d_DSA_SIG'; did you mean 'i2d_ECDSA_SIG'? [-Wimplicit-function-declaration]

  len = i2d_DSA_SIG(sdsa, NULL);

        ^~~~~~~~~~~

        i2d_ECDSA_SIG

ntp_crypto.c:2310:3: warning: implicit declaration of function 'DSA_SIG_free'; did you mean 'ECDSA_SIG_free'? [-Wimplicit-function-declaration]

   DSA_SIG_free(sdsa);

   ^~~~~~~~~~~~

   ECDSA_SIG_free

ntp_crypto.c: In function 'crypto_iff':

ntp_crypto.c:2363:2: error: unknown type name 'DSA_SIG'; did you mean 'ECDSA_SIG'?

  DSA_SIG *sdsa;  /* DSA parameters */

  ^~~~~~~

  ECDSA_SIG

ntp_crypto.c:2385:11: warning: assignment makes pointer from integer without a cast [-Wint-conversion]

  if ((dsa = EVP_PKEY_get0_DSA(peer->ident_pkey->pkey)) == NULL) {

           ^

ntp_crypto.c:2400:14: warning: implicit declaration of function 'd2i_DSA_SIG'; did you mean 'd2i_ECDSA_SIG'? [-Wimplicit-function-declaration]

  if ((sdsa = d2i_DSA_SIG(NULL, &ptr, len)) == NULL) {

              ^~~~~~~~~~~

              d2i_ECDSA_SIG

ntp_crypto.c:2400:12: warning: assignment makes pointer from integer without a cast [-Wint-conversion]

  if ((sdsa = d2i_DSA_SIG(NULL, &ptr, len)) == NULL) {

            ^

ntp_crypto.c:2412:2: warning: implicit declaration of function 'DSA_SIG_get0'; did you mean 'ECDSA_SIG_get0'? [-Wimplicit-function-declaration]

  DSA_SIG_get0(sdsa, &r, &s);

  ^~~~~~~~~~~~

  ECDSA_SIG_get0

ntp_crypto.c: In function 'crypto_bob2':

ntp_crypto.c:2578:2: error: unknown type name 'DSA_SIG'; did you mean 'ECDSA_SIG'?

  DSA_SIG *sdsa;  /* DSA parameters */

  ^~~~~~~

  ECDSA_SIG

ntp_crypto.c:2616:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]

  sdsa = DSA_SIG_new();

       ^

ntp_crypto.c: In function 'crypto_gq':

ntp_crypto.c:2686:2: error: unknown type name 'DSA_SIG'; did you mean 'ECDSA_SIG'?

  DSA_SIG *sdsa;  /* RSA signature context fake */

  ^~~~~~~

  ECDSA_SIG

ntp_crypto.c:2726:12: warning: assignment makes pointer from integer without a cast [-Wint-conversion]

  if ((sdsa = d2i_DSA_SIG(NULL, &ptr, len)) == NULL) {

            ^

ntp_crypto.c: In function 'crypto_alice3':

ntp_crypto.c:2862:11: warning: assignment makes pointer from integer without a cast [-Wint-conversion]

  if ((dsa = EVP_PKEY_get0_DSA(peer->ident_pkey->pkey)) == NULL) {

           ^

ntp_crypto.c: In function 'crypto_bob3':

ntp_crypto.c:2940:6: warning: assignment makes pointer from integer without a cast [-Wint-conversion]

  dsa = EVP_PKEY_get0_DSA(mvkey_info->pkey);

      ^

ntp_crypto.c:2962:9: warning: implicit declaration of function 'DSA_new'; did you mean 'RSA_new'? [-Wimplicit-function-declaration]

  sdsa = DSA_new();

         ^~~~~~~

         RSA_new

ntp_crypto.c:2962:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]

  sdsa = DSA_new();

       ^

ntp_crypto.c:2975:2: warning: implicit declaration of function 'DSA_set0_key'; did you mean 'RSA_set0_key'? [-Wimplicit-function-declaration]

  DSA_set0_key(sdsa, BN_dup(pub_key), NULL);

  ^~~~~~~~~~~~

  RSA_set0_key

ntp_crypto.c:2976:2: warning: implicit declaration of function 'DSA_set0_pqg'; did you mean 'DH_set0_pqg'? [-Wimplicit-function-declaration]

  DSA_set0_pqg(sdsa, sp, sq, sg);

  ^~~~~~~~~~~~

  DH_set0_pqg

ntp_crypto.c:2991:8: warning: implicit declaration of function 'i2d_DSAparams'; did you mean 'i2d_DHxparams'? [-Wimplicit-function-declaration]

  len = i2d_DSAparams(sdsa, NULL);

        ^~~~~~~~~~~~~

        i2d_DHxparams

ntp_crypto.c:2995:3: warning: implicit declaration of function 'DSA_free'; did you mean 'RSA_free'? [-Wimplicit-function-declaration]

   DSA_free(sdsa);

   ^~~~~~~~

   RSA_free

ntp_crypto.c: In function 'crypto_mv':

ntp_crypto.c:3060:11: warning: assignment makes pointer from integer without a cast [-Wint-conversion]

  if ((dsa = EVP_PKEY_get0_DSA(peer->ident_pkey->pkey)) == NULL) {

           ^

ntp_crypto.c:3077:14: warning: implicit declaration of function 'd2i_DSAparams'; did you mean 'd2i_DHxparams'? [-Wimplicit-function-declaration]

  if ((sdsa = d2i_DSAparams(NULL, &ptr, len)) == NULL) {

              ^~~~~~~~~~~~~

              d2i_DHxparams

ntp_crypto.c:3077:12: warning: assignment makes pointer from integer without a cast [-Wint-conversion]

  if ((sdsa = d2i_DSAparams(NULL, &ptr, len)) == NULL) {

这些是 ntp_crypto.c 的标头:

/*
 * ntp_crypto.c - NTP version 4 public key routines
 */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#ifdef AUTOKEY
#include <stdio.h>
#include <stdlib.h> /* strtoul */
#include <sys/types.h>
#include <sys/param.h>
#include <unistd.h>
#include <fcntl.h>

#include "ntpd.h"
#include "ntp_stdlib.h"
#include "ntp_unixtime.h"
#include "ntp_string.h"
#include "ntp_random.h"
#include "ntp_assert.h"
#include "ntp_calendar.h"
#include "ntp_leapsec.h"
#include <openssl/dsa.h>

#include "openssl/asn1.h"
#include "openssl/bn.h"
#include "openssl/crypto.h"
#include "openssl/err.h"
#include "openssl/evp.h"
#include "openssl/opensslv.h"
#include "openssl/pem.h"
#include "openssl/rand.h"
#include "openssl/x509.h"
#include "openssl/x509v3.h"
#include "libssl_compat.h"

#ifdef KERNEL_PLL
#include "ntp_syscall.h"
#endif /* KERNEL_PLL */


我正在使用 OpenSSL v1.1.1

这是 ./configure 选项:

#!/bin/sh



# Configure software package.

configure()

{

  cd $packageDir



  ./bootstrap

  ./configure --host=arm-linux --with-yielding-select=yes  --with-crypto=openssl --enable-linuxcaps \

        --with-openssl-incdir=$OPENSSL_DIR/install-arm/include/ \

        --with-openssl-libdir=$OPENSSL_DIR/install-arm/lib/ \



  return $?

}

ntp
  • 1 1 个回答
  • 23 Views

1 个回答

  • Voted
  1. Best Answer
    telcoM
    2022-12-09T22:29:04+08:002022-12-09T22:29:04+08:00

    请参阅NTP Bugzilla 中的错误#3756。

    布赖恩·阿特拜克 2022-02-10 16:34:50 UTC

    NTP 需要 OpenSSL 版本 1.0.2,该版本不再受支持。版本 1.1.1 只会再支持一年。它需要更新才能使用 3.0。

    错误状态为 IN_PROGRESS,但没有写进一步的注释。这表明 NTPv4 的稳定版本仍然需要已过时的 OpenSSL 1.0.2。您的问题可能源于 OpenSSL 1.0.2 和 1.1.1 之间的差异,或者您安装的 OpenSSL 版本可能是在完全禁用已弃用的 DSA 算法的情况下构建的。

    NTPv4(软件套件)的开发似乎从 2020 年 6 月开始就停滞不前了,例如 RedHatchronyd这些天似乎更喜欢。开发者信息页面说源代码应该在 Github 上,但我看那里根本没有最近的活动,NTPv4 Bugzilla 首页上的链接提供了 2019 年的开发版本和 2020 年的稳定版本,这两个版本都比Git 存储库的内容。

    • 1

相关问题

  • 一次查询与 NTP 服务器同步时间

  • ntpstat 有效,但 ntpq 无效

  • 为 CentOS 7 寻找一个简单的 NTP 设置

  • 如何使用我的本地时间作为 `ntpd` 的唯一参考?

  • 系统时间在 Linux 机器上由于某种未知原因而自动更改

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve