diff mbox series

[ovs-dev] dhparams: Fix .c file generation with OpenSSL >= 1.1.1-pre9

Message ID 816876eb5f5f5cb73b850d4959677e11a6f56cd9.1536326093.git.tredaelli@redhat.com
State Accepted
Headers show
Series [ovs-dev] dhparams: Fix .c file generation with OpenSSL >= 1.1.1-pre9 | expand

Commit Message

Timothy Redaelli Sept. 7, 2018, 1:14 p.m. UTC
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 <tredaelli@redhat.com>
---
 build-aux/generate-dhparams-c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ben Pfaff Sept. 7, 2018, 4:58 p.m. UTC | #1
On Fri, Sep 07, 2018 at 03:14:53PM +0200, Timothy Redaelli wrote:
> 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 <tredaelli@redhat.com>

Thanks, applied to master and branch-2.10.
diff mbox series

Patch

diff --git a/build-aux/generate-dhparams-c b/build-aux/generate-dhparams-c
index 5d5bba213..dfbdb1f2e 100755
--- a/build-aux/generate-dhparams-c
+++ b/build-aux/generate-dhparams-c
@@ -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/[ 	]*$//