Changeset View
Changeset View
Standalone View
Standalone View
sbsigntool/files/patch-src-sbkeysync.c
--- src/sbkeysync.c.orig 2014-11-30 19:18:11.000000000 +0100 | --- src/sbkeysync.c.orig 2012-10-10 10:21:54.000000000 -0700 | ||||
+++ src/sbkeysync.c 2014-11-30 19:18:32.000000000 +0100 | +++ src/sbkeysync.c 2021-01-05 20:15:24.739061000 -0800 | ||||
@@ -38,7 +38,8 @@ | @@ -31,6 +31,8 @@ | ||||
*/ | |||||
#define _GNU_SOURCE | |||||
+#include <sys/param.h> | |||||
+#include <sys/mount.h> | |||||
#include <stdint.h> | |||||
#include <stdlib.h> | |||||
#include <string.h> | |||||
@@ -38,8 +40,6 @@ | |||||
#include <fcntl.h> | #include <fcntl.h> | ||||
#include <unistd.h> | #include <unistd.h> | ||||
#include <sys/stat.h> | #include <sys/stat.h> | ||||
-#include <sys/statfs.h> | -#include <sys/statfs.h> | ||||
+#include <sys/param.h> | -#include <sys/types.h> | ||||
+#include <sys/mount.h> | |||||
#include <sys/types.h> | |||||
#include <getopt.h> | #include <getopt.h> | ||||
@@ -203,16 +203,15 @@ | |||||
return -1; | |||||
/* we use the X509 serial number as the key ID */ | |||||
- if (!x509->cert_info || !x509->cert_info->serialNumber) | |||||
+ serial = X509_get_serialNumber(x509); | |||||
+ if (!serial) | |||||
goto out; | |||||
- serial = x509->cert_info->serialNumber; | |||||
- | |||||
key->id_len = ASN1_STRING_length(serial); | |||||
- key->id = talloc_memdup(key, ASN1_STRING_data(serial), key->id_len); | |||||
+ key->id = talloc_memdup(key, ASN1_STRING_get0_data(serial), key->id_len); | |||||
key->description = talloc_array(key, char, description_len); | |||||
- X509_NAME_oneline(x509->cert_info->subject, | |||||
+ X509_NAME_oneline(X509_get_subject_name(x509), | |||||
key->description, description_len); | |||||
rc = 0; |