Git Product home page Git Product logo

Comments (2)

 avatar commented on August 24, 2024

Oh, just FYI, on another debian testing box, where I "accidently" had installed libpolarssl-dev, I ran into another issue (with clang 3.5.2, not relevant for me though):

src/tlsdate-helper.c:840:9: error: unknown type name 'x509_cert'; did you mean 'x509_crt'?
  const x509_cert *certificate;
        ^~~~~~~~~
        x509_crt
/usr/include/polarssl/x509_crt.h:100:1: note: 'x509_crt' declared here
x509_crt;
^
src/tlsdate-helper.c:850:3: warning: implicit declaration of function 'x509parse_dn_gets' is invalid in C99 [-Wimplicit-function-declaration]
  x509parse_dn_gets(buf, 1024, &certificate->subject);
  ^
src/tlsdate-helper.c:853:30: error: no member named 'rsa' in 'struct _x509_crt'
  public_key = &certificate->rsa;
                ~~~~~~~~~~~  ^
src/tlsdate-helper.c:984:3: error: unknown type name 'x509_cert'; did you mean 'x509_crt'?
  x509_cert cacert;
  ^~~~~~~~~
  x509_crt
/usr/include/polarssl/x509_crt.h:100:1: note: 'x509_crt' declared here
x509_crt;
^
src/tlsdate-helper.c:990:30: error: use of undeclared identifier 'x509_cert'; did you mean 'x509_crt'?
  memset (&cacert, 0, sizeof(x509_cert));
                             ^
/usr/include/polarssl/x509_crt.h:100:1: note: 'x509_crt' declared here
x509_crt;
^
src/tlsdate-helper.c:1004:17: warning: implicit declaration of function 'x509parse_crtfile' is invalid in C99 [-Wimplicit-function-declaration]
        if (0 > x509parse_crtfile(&cacert, ca_cert_container))
                ^
src/tlsdate-helper.c:1008:17: warning: implicit declaration of function 'x509parse_crtpath' is invalid in C99 [-Wimplicit-function-declaration]
        if (0 > x509parse_crtpath(&cacert, ca_cert_container))
                ^
src/tlsdate-helper.c:1107:3: warning: implicit declaration of function 'x509_free' is invalid in C99 [-Wimplicit-function-declaration]
  x509_free (&cacert);
  ^
4 warnings and 4 errors generated.

x509_crt is the easy part. I'm not familiar with PolarSSL, but from 1.2 to 1.3 they have restructured the RSA module, from rsa_context *ctx to pk_context *ctx. So my quick fix changing "public_key = &certificate->rsa" to "public_key = &certificate->pk" compiled, but CCLD fails.

src/src_tlsdate_helper-tlsdate-helper.o: In function `check_key_length':
/home/daniel/code/tlsdate/src/tlsdate-helper.c:850: undefined reference to `x509parse_dn_gets'
src/src_tlsdate_helper-tlsdate-helper.o: In function `run_ssl':
/home/daniel/code/tlsdate/src/tlsdate-helper.c:1008: undefined reference to `x509parse_crtpath'
/home/daniel/code/tlsdate/src/tlsdate-helper.c:1004: undefined reference to `x509parse_crtfile'
/home/daniel/code/tlsdate/src/tlsdate-helper.c:1107: undefined reference to `x509_free'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:1704: recipe for target 'src/tlsdate-helper' failed

this needs more investigation if mbedTLS 1.3 has to work.

from tlsdate.

vapier avatar vapier commented on August 24, 2024

(1) AS_IF is provided by autoconf itself. autoconf-2.69-6 on my system defines it in /usr/share/autoconf/m4sugar/m4sh.m4. same goes for all the other AC/AS macros you describe. tlsdate must not mess around with m4_pattern_allow here.

(2) if you want to build tlsdate from git and/or run autotools, you must install the relevant dev packages. that includes pkg-config which provides pkg.m4. not a bug in tlsdate.

(3) tlsdate probably could use some symbol checks. OpenSSL is not friendly when it comes to disabling crypto funcs as it basically breaks the ABI.

(4) this isn't necessarily a bug. having a program call free() on all allocated buffers before calling exit() is both entirely pointless and a waste of CPU/resources. the kernel will automatically free all the memory when programs exits.

(5) if you want to request polarssl support, please file a new issue. creating one bug report with a ton of unrelated issues only creates a mess.

from tlsdate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.