aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-03-28 10:20:32 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-03-28 10:20:32 +0200
commit8d65edb41f8ea57a4ca22254b46c95345845a047 (patch)
treefd6a5e5bf8d4a7a4249cbefd66619c6c29fe5082 /src
parent1247ba3398ed588ffbf4182cea8581222b7bf8b4 (diff)
downloadlibssh-8d65edb41f8ea57a4ca22254b46c95345845a047.tar.gz
libssh-8d65edb41f8ea57a4ca22254b46c95345845a047.tar.xz
libssh-8d65edb41f8ea57a4ca22254b46c95345845a047.zip
kex1: Fix building with OpenSSL 1.1+
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src')
-rw-r--r--src/kex1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kex1.c b/src/kex1.c
index f4aadd9a..3bd75ef1 100644
--- a/src/kex1.c
+++ b/src/kex1.c
@@ -119,8 +119,8 @@ static int modulus_smaller(ssh_public_key k1, ssh_public_key k2){
n2=gcry_sexp_nth_mpi(sexp,1,GCRYMPI_FMT_USG);
gcry_sexp_release(sexp);
#elif defined HAVE_LIBCRYPTO
- n1=k1->rsa_pub->n;
- n2=k2->rsa_pub->n;
+ RSA_get0_key(k1->rsa_pub, (const BIGNUM **)&n1, NULL, NULL);
+ RSA_get0_key(k2->rsa_pub, (const BIGNUM **)&n2, NULL, NULL);
#endif
if(bignum_cmp(n1,n2)<0)
res=1;