]> git.tuebingen.mpg.de Git - paraslash.git/commit
openssl: RSA fixes for openssl-1.1.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 28 Aug 2016 13:35:11 +0000 (15:35 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 24 Sep 2016 11:29:59 +0000 (13:29 +0200)
commitb8f17428aeb17ad9230a894b3c3ce150b094594e
treef64ca6f885d5ae9012e855bbd9f6c5b598022f5a
parent698178774b857a8959fe70e360ae6ff755eacf8e
openssl: RSA fixes for openssl-1.1.

In openssl-1.1 the RSA structure has been made opaque, causing
compilation of crypt.c to fail because the code accesses ->n and ->e
directly to set the modulus and the public exponent according to the
values read from the public ssh key.

With openssl-1.1 applications are supposed to call RSA_set0_key()
to set n and e. Unfortunately, this function does not exist in
openssl-1.0.2.

This patch adds a configure check which defines HAVE_RSA_SET0_KEY if
RSA_set0_key() is available. In crypt.c we either call the function
or set ->n and ->e directly, depending on whether HAVE_RSA_SET0_KEY
is defined. This results in code which works on both openssl-1.0.2
and openssl-1.1.0.
configure.ac
crypt.c