| 20 | |
| 21 | I 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 | |
| 27 | Changing 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 | |
| 41 | And adding |
| 42 | {{{ |
| 43 | BN_free(p); |
| 44 | BN_free(q); |
| 45 | }}} |
| 46 | underneath DH_free(dh). I have no idea how good or bad my modifications were, but it compiles successfully and seems to work. |