Changes between Initial Version and Version 1 of Ticket #860, comment 6


Ignore:
Timestamp:
04/21/16 00:53:39 (8 years ago)
Author:
Gobelet@…

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #860, comment 6

    initial v1  
    1818                                ^
    1919}}}
     20
     21I fixed it (I believe - at least it compiles and I took example in the OpenSSL tests source code) by adding
     22(Line 919)
     23{{{
     24    BIGNUM *p, *q;
     25}}}
     26
     27Changing lines 954-962 to:
     28{{{
     29        p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL);
     30        g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), NULL);
     31
     32        if ((p == NULL) || (g == NULL) || !DH_set0_pqg(dh, p, NULL, g)) {
     33            ngx_ssl_error(NGX_LOG_EMERG, ssl->log, 0, "BN_bin2bn() failed");
     34            DH_free(dh);
     35            BN_free(p);
     36            BN_free(g);
     37            return NGX_ERROR;
     38        }
     39}}}
     40
     41And adding
     42{{{
     43BN_free(p);
     44BN_free(q);
     45}}}
     46underneath DH_free(dh). I have no idea how good or bad my modifications were, but it compiles successfully and seems to work.