mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-02 14:14:12 +00:00
Update for openssl 1.1
OpenSSL 1.1 has made significant non-backwards compatible changes to its API as outlined in: https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes BRANCH=none BUG=chromium:738114 TEST=cros_workon --host start vboot_reference TEST=w/ openssl-1.0.2k: sudo emerge vboot_reference TEST=w/ openssl-1.1.0e: sudo emerge vboot_reference => both build ok $ futility version => command runs without error TEST=cros_workon --board=soraka start vboot_reference coreboot TEST=w/ openssl-1.0.2k: emerge-soraka vboot_reference coreboot TEST=w/ openssl-1.1.0e: emerge-soraka vboot_reference coreboot => All build ok Change-Id: I37cfc8cbb04a092eab7b0b3224f475b82609447c Reviewed-on: https://chromium-review.googlesource.com/557739 Commit-Ready: Daniel Kurtz <djkurtz@chromium.org> Tested-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "2id.h"
|
||||
#include "2rsa.h"
|
||||
#include "2sha.h"
|
||||
#include "openssl_compat.h"
|
||||
#include "util_misc.h"
|
||||
#include "vb2_common.h"
|
||||
#include "vb21_common.h"
|
||||
@@ -170,6 +171,7 @@ static int vb2_make_keypair()
|
||||
enum vb2_signature_algorithm sig_alg;
|
||||
uint8_t *pubkey_buf = 0;
|
||||
int has_priv = 0;
|
||||
const BIGNUM *rsa_d;
|
||||
|
||||
FILE *fp;
|
||||
int ret = 1;
|
||||
@@ -196,7 +198,8 @@ static int vb2_make_keypair()
|
||||
goto done;
|
||||
}
|
||||
/* Public keys doesn't have the private exponent */
|
||||
has_priv = !!rsa_key->d;
|
||||
RSA_get0_key(rsa_key, NULL, NULL, &rsa_d);
|
||||
has_priv = !!rsa_d;
|
||||
if (!has_priv)
|
||||
fprintf(stderr, "%s has a public key only.\n", infile);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user