Skip to content

Commit

Permalink
dhparams: Fix .c file generation with OpenSSL >= 1.1.1-pre9
Browse files Browse the repository at this point in the history
Since OpenSSL upstream commit 201b305a2409
("apps/dsaparam.c generates code that is intended to be pasted or included into
an existing source file: the function is static, and the code doesn't include
dsa.h.  Match the generated C source style of dsaparam.") "openssl dhparam -C"
generates the get_dh functions as static, but the functions are used inside
stream-ssl.c and so the static keyword cannot be used.

This commit removes the static keyword from the get_dh functions during
dhparams.c file generation by restoring the current behaviour.

Signed-off-by: Timothy Redaelli <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
drizzt authored and blp committed Sep 7, 2018
1 parent 3869435 commit dc041ea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions build-aux/generate-dhparams-c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ EOF
(openssl dhparam -C -in lib/dh1024.pem -noout &&
openssl dhparam -C -in lib/dh2048.pem -noout &&
openssl dhparam -C -in lib/dh4096.pem -noout) | sed '
s/^static DH/DH/
s/\(get_dh[0-9]*\)()/\1(void)/
s/\(DH_set0_pqg\)/my_\1/
s/[ ]*$//
Expand Down

0 comments on commit dc041ea

Please sign in to comment.