mirror of
https://github.com/jiazhang0/meta-secure-core.git
synced 2026-07-16 20:56:58 +00:00
sbsigntool: fix build failure with openssl-1.0.x
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
This commit is contained in:
@@ -19,7 +19,7 @@ SRC_URI = "\
|
||||
file://Fix-for-multi-sign.patch \
|
||||
file://sbsign-add-x-option-to-avoid-overwrite-existing-sign.patch \
|
||||
file://image-fix-the-segment-fault-caused-by-the-uninitiali.patch \
|
||||
file://Fix-the-deprecated-ASN1_STRING_data.patch \
|
||||
file://Fix-the-deprecated-ASN1_STRING_data-in-openssl-1.1.0.patch \
|
||||
file://Update-OpenSSL-API-usage-to-support-OpenSSL-1.1.patch \
|
||||
"
|
||||
SRCREV="951ee95a301674c046f55330cd7460e1314deff2"
|
||||
|
||||
+32
-8
@@ -1,16 +1,17 @@
|
||||
From c5d321ded2020441b0d064e03b7b07358d3f71da Mon Sep 17 00:00:00 2001
|
||||
From 6ef94a67490176a6d84b4968f303e6d1c51a49ce Mon Sep 17 00:00:00 2001
|
||||
From: Lans Zhang <jia.zhang@windriver.com>
|
||||
Date: Tue, 15 Aug 2017 10:55:40 +0800
|
||||
Subject: [PATCH] Fix the deprecated ASN1_STRING_data()
|
||||
Date: Wed, 16 Aug 2017 10:09:43 +0800
|
||||
Subject: [PATCH] Fix the deprecated ASN1_STRING_data() in openssl-1.1.0
|
||||
|
||||
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
|
||||
---
|
||||
src/idc.c | 4 ++--
|
||||
src/sbkeysync.c | 2 +-
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
src/idc.h | 4 ++++
|
||||
src/sbkeysync.c | 3 ++-
|
||||
3 files changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/idc.c b/src/idc.c
|
||||
index 236cefd..8feaa11 100644
|
||||
index 236cefd..7f99a53 100644
|
||||
--- a/src/idc.c
|
||||
+++ b/src/idc.c
|
||||
@@ -238,7 +238,7 @@ struct idc *IDC_get(PKCS7 *p7, BIO *bio)
|
||||
@@ -31,11 +32,34 @@ index 236cefd..8feaa11 100644
|
||||
if (memcmp(buf, sha, sizeof(sha))) {
|
||||
fprintf(stderr, "Hash doesn't match image\n");
|
||||
fprintf(stderr, " got: %s\n", sha256_str(buf));
|
||||
diff --git a/src/idc.h b/src/idc.h
|
||||
index a6526de..8011237 100644
|
||||
--- a/src/idc.h
|
||||
+++ b/src/idc.h
|
||||
@@ -36,6 +36,10 @@
|
||||
|
||||
#include <openssl/pkcs7.h>
|
||||
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
+#define ASN1_STRING_get0_data ASN1_STRING_data
|
||||
+#endif
|
||||
+
|
||||
struct idc;
|
||||
|
||||
int IDC_set(PKCS7 *p7, PKCS7_SIGNER_INFO *si, struct image *image);
|
||||
diff --git a/src/sbkeysync.c b/src/sbkeysync.c
|
||||
index a63d3b8..ef028ef 100644
|
||||
index a63d3b8..223a047 100644
|
||||
--- a/src/sbkeysync.c
|
||||
+++ b/src/sbkeysync.c
|
||||
@@ -210,7 +210,7 @@ static int x509_key_parse(struct key *key, uint8_t *data, size_t len)
|
||||
@@ -54,6 +54,7 @@
|
||||
|
||||
#include "fileio.h"
|
||||
#include "efivars.h"
|
||||
+#include "idc.h"
|
||||
|
||||
#define EFIVARS_MOUNTPOINT "/sys/firmware/efi/efivars"
|
||||
#define PSTORE_FSTYPE 0x6165676C
|
||||
@@ -210,7 +211,7 @@ static int x509_key_parse(struct key *key, uint8_t *data, size_t len)
|
||||
serial = x509->cert_info->serialNumber;
|
||||
|
||||
key->id_len = ASN1_STRING_length(serial);
|
||||
Reference in New Issue
Block a user