Ticket Change Details
Overview

Artifact ID: a8bdd14491f93d89717606a475a8d0471efadb8d00fee548a2541396612f93f9
Ticket: 034c8d2587c3810d268e84a15d2a3e187e54b452
Issue with OpenSSL1.1 and dh_param access
User & Date: betsalel on 2020-05-14 21:30:24
Changes

  1. foundin changed to: "1.7.21"
  2. icomment:
    Issue compiling with openSSL1.1 on Mac:
    
    In file included from ./tls.c:84:
    ./dh_params.h:33:4: error: incomplete definition of type 'struct dh_st'
            dh->p = BN_bin2bn(dh2048_p, sizeof(dh2048_p), NULL);
            ~~^
    /usr/local/opt/openssl@1.1/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'struct dh_st'
    typedef struct dh_st DH;
                   ^
    In file included from ./tls.c:84:
    ./dh_params.h:34:4: error: incomplete definition of type 'struct dh_st'
            dh->g = BN_bin2bn(dh2048_g, sizeof(dh2048_g), NULL);
            ~~^
    /usr/local/opt/openssl@1.1/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'struct dh_st'
    typedef struct dh_st DH;
                   ^
    In file included from ./tls.c:84:
    ./dh_params.h:35:9: error: incomplete definition of type 'struct dh_st'
            if ((dh->p == NULL) || (dh->g == NULL))
                 ~~^
    /usr/local/opt/openssl@1.1/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'struct dh_st'
    typedef struct dh_st DH;
                   ^
    In file included from ./tls.c:84:
    ./dh_params.h:35:28: error: incomplete definition of type 'struct dh_st'
            if ((dh->p == NULL) || (dh->g == NULL))
                                    ~~^
    /usr/local/opt/openssl@1.1/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'struct dh_st'
    typedef struct dh_st DH;
    
    
    Fixed by updating the dh_params.h to use the getter/setter methods (used DH_set0_pqg instead of dh->p and dh->g):
    
    	if ((dh = DH_new()) == NULL) return(NULL);
    	DH_set0_pqg(dh, BN_bin2bn(dh2048_p, sizeof(dh2048_p), NULL), NULL, BN_bin2bn(dh2048_g, sizeof(dh2048_g), NULL));
    	if ((DH_get0_p(dh) == NULL) || (DH_get0_g(dh) == NULL))
    		{ DH_free(dh); return(NULL); }
    
  3. login: "betsalel"
  4. mimetype: "text/x-fossil-plain"
  5. private_contact changed to: "e6943a3a78443df59def0c1273b30a3c866e4484"
  6. severity changed to: "Minor"
  7. status changed to: "Open"
  8. title changed to: "Issue with OpenSSL1.1 and dh_param access"
  9. type changed to: "Build Problem"