23 lines
680 B
Text
23 lines
680 B
Text
Fix build with opaque RSA in LibreSSL 3.5.
|
|
|
|
Index: adb/adb_auth_host.c
|
|
--- adb/adb_auth_host.c.orig
|
|
+++ adb/adb_auth_host.c
|
|
@@ -82,7 +82,7 @@ static int RSA_to_RSAPublicKey(RSA *rsa, RSAPublicKey
|
|
}
|
|
|
|
BN_set_bit(r32, 32);
|
|
- BN_copy(n, rsa->n);
|
|
+ BN_copy(n, RSA_get0_n(rsa));
|
|
BN_set_bit(r, RSANUMWORDS * 32);
|
|
BN_mod_sqr(rr, r, n, ctx);
|
|
BN_div(NULL, rem, n, r32, ctx);
|
|
@@ -96,7 +96,7 @@ static int RSA_to_RSAPublicKey(RSA *rsa, RSAPublicKey
|
|
BN_div(n, rem, n, r32, ctx);
|
|
pkey->n[i] = BN_get_word(rem);
|
|
}
|
|
- pkey->exponent = BN_get_word(rsa->e);
|
|
+ pkey->exponent = BN_get_word(RSA_get0_e(rsa));
|
|
|
|
out:
|
|
BN_free(n0inv);
|