• <tfoot id='hCy7v'></tfoot>
  • <i id='hCy7v'><tr id='hCy7v'><dt id='hCy7v'><q id='hCy7v'><span id='hCy7v'><b id='hCy7v'><form id='hCy7v'><ins id='hCy7v'></ins><ul id='hCy7v'></ul><sub id='hCy7v'></sub></form><legend id='hCy7v'></legend><bdo id='hCy7v'><pre id='hCy7v'><center id='hCy7v'></center></pre></bdo></b><th id='hCy7v'></th></span></q></dt></tr></i><div id='hCy7v'><tfoot id='hCy7v'></tfoot><dl id='hCy7v'><fieldset id='hCy7v'></fieldset></dl></div>
  • <small id='hCy7v'></small><noframes id='hCy7v'>

    <legend id='hCy7v'><style id='hCy7v'><dir id='hCy7v'><q id='hCy7v'></q></dir></style></legend>

          <bdo id='hCy7v'></bdo><ul id='hCy7v'></ul>
      1. 聚合“BIGNUM foo"的类型不完整,无法定义

        时间:2024-08-14
        <legend id='0IhJN'><style id='0IhJN'><dir id='0IhJN'><q id='0IhJN'></q></dir></style></legend>
        <tfoot id='0IhJN'></tfoot>

          <i id='0IhJN'><tr id='0IhJN'><dt id='0IhJN'><q id='0IhJN'><span id='0IhJN'><b id='0IhJN'><form id='0IhJN'><ins id='0IhJN'></ins><ul id='0IhJN'></ul><sub id='0IhJN'></sub></form><legend id='0IhJN'></legend><bdo id='0IhJN'><pre id='0IhJN'><center id='0IhJN'></center></pre></bdo></b><th id='0IhJN'></th></span></q></dt></tr></i><div id='0IhJN'><tfoot id='0IhJN'></tfoot><dl id='0IhJN'><fieldset id='0IhJN'></fieldset></dl></div>

          <small id='0IhJN'></small><noframes id='0IhJN'>

            <tbody id='0IhJN'></tbody>
            <bdo id='0IhJN'></bdo><ul id='0IhJN'></ul>
                  本文介绍了聚合“BIGNUM foo"的类型不完整,无法定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我尝试编译 opendcp,但发生错误.

                  I tried to compile opendcp, but error occurred.

                  $ make
                  
                  ...
                  
                  [ 10%] Building CXX object libasdcp/CMakeFiles/opendcp-asdcp.dir/KM_prng.cpp.o
                  /home/jwel/opendcp/libasdcp/KM_prng.cpp: In function ‘void Kumu::Gen_FIPS_186_Value(const byte_t*, ui32_t, byte_t*, ui32_t)’:
                  /home/jwel/opendcp/libasdcp/KM_prng.cpp:219:10: error: aggregate ‘BIGNUM c_2powb’ has incomplete type and cannot be defined
                     BIGNUM c_2powb, c_2, c_b;
                            ^~~~~~~
                  /home/jwel/opendcp/libasdcp/KM_prng.cpp:219:19: error: aggregate ‘BIGNUM c_2’ has incomplete type and cannot be defined
                     BIGNUM c_2powb, c_2, c_b;
                                     ^~~
                  /home/jwel/opendcp/libasdcp/KM_prng.cpp:219:24: error: aggregate ‘BIGNUM c_b’ has incomplete type and cannot be defined
                     BIGNUM c_2powb, c_2, c_b;
                                          ^~~
                  /home/jwel/opendcp/libasdcp/KM_prng.cpp:220:19: error: ‘BN_init’ was not declared in this scope
                     BN_init(&c_2powb);  BN_init(&c_2);  BN_init(&c_b);
                                     ^
                  /home/jwel/opendcp/libasdcp/KM_prng.cpp:248:14: error: aggregate ‘BIGNUM bn_tmp’ has incomplete type and cannot be defined
                         BIGNUM bn_tmp, bn_xkey, bn_x_n;
                                ^~~~~~
                  /home/jwel/opendcp/libasdcp/KM_prng.cpp:248:22: error: aggregate ‘BIGNUM bn_xkey’ has incomplete type and cannot be defined
                         BIGNUM bn_tmp, bn_xkey, bn_x_n;
                                        ^~~~~~~
                  /home/jwel/opendcp/libasdcp/KM_prng.cpp:248:31: error: aggregate ‘BIGNUM bn_x_n’ has incomplete type and cannot be defined
                         BIGNUM bn_tmp, bn_xkey, bn_x_n;
                                                 ^~~~~~
                  libasdcp/CMakeFiles/opendcp-asdcp.dir/build.make:110: recipe for target 'libasdcp/CMakeFiles/opendcp-asdcp.dir/KM_prng.cpp.o' failed
                  make[2]: *** [libasdcp/CMakeFiles/opendcp-asdcp.dir/KM_prng.cpp.o] Error 1
                  make[1]: *** [libasdcp/CMakeFiles/opendcp-asdcp.dir/all] Error 2
                  make: *** [all] Error 2
                  

                  对我来说这看起来像是 openssl 问题,所以我试着测试这个:

                  It looks like openssl problem for me, so I tried to test this:

                  $ cat testBIGNUM.cpp
                  #include <openssl/bn.h>
                  int main(){
                      BIGNUM bn;
                  }
                  
                  $ g++ testBIGNUM.cpp
                  testBIGNUM.cpp: In function ‘int main()’:
                  testBIGNUM.cpp:4:9: error: aggregate ‘BIGNUM bn’ has incomplete type and cannot be defined
                    BIGNUM bn;
                           ^~
                  

                  我的 openssl 版本是 1.1.0d-2,我不知道如何修复它.

                  my openssl version is 1.1.0d-2 and I don't know how to fix it.

                  推荐答案

                  OpenSSL 1.0.2 和 OpenSSL 1.1.0 之间有很大的变化,它们并不完全兼容源代码.特别是 1.0.2 头文件中的许多数据结构现在是不透明的.使用 OpenSSL 的应用程序需要进行一些小的更改才能兼容.

                  There were big changes between OpenSSL 1.0.2 and OpenSSL 1.1.0 and they are not fully source compatible. Specifically many data structures which were in the 1.0.2 header files are now opaque. Applications that use OpenSSL need to make some small changes to be compatible.

                  对于BIGNUM,你需要这样做:

                  In the case of BIGNUM, you need to do it like this:

                  #include <openssl/bn.h>
                  int main() {
                      BIGNUM *bn;
                  
                      bn = BN_new();
                  
                      ...
                      BN_free(bn);
                  
                      return 0;
                  }
                  

                  对于 opendcp,答案可能只是降级到 OpenSSL 1.0.2.

                  In the case of opendcp probably the answer is to just downgrade to OpenSSL 1.0.2 instead.

                  这篇关于聚合“BIGNUM foo"的类型不完整,无法定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:OpenSSL AES_cfb128_encrypt C++ 下一篇:如何使用 OpenSSL C 库将 RSA 密钥从二进制数据加载到 RSA 结构?

                  相关文章

                  <i id='gvTZd'><tr id='gvTZd'><dt id='gvTZd'><q id='gvTZd'><span id='gvTZd'><b id='gvTZd'><form id='gvTZd'><ins id='gvTZd'></ins><ul id='gvTZd'></ul><sub id='gvTZd'></sub></form><legend id='gvTZd'></legend><bdo id='gvTZd'><pre id='gvTZd'><center id='gvTZd'></center></pre></bdo></b><th id='gvTZd'></th></span></q></dt></tr></i><div id='gvTZd'><tfoot id='gvTZd'></tfoot><dl id='gvTZd'><fieldset id='gvTZd'></fieldset></dl></div>

                  <legend id='gvTZd'><style id='gvTZd'><dir id='gvTZd'><q id='gvTZd'></q></dir></style></legend>

                      <tfoot id='gvTZd'></tfoot>
                      • <bdo id='gvTZd'></bdo><ul id='gvTZd'></ul>

                      <small id='gvTZd'></small><noframes id='gvTZd'>