summaryrefslogtreecommitdiff
path: root/libkmod/libkmod-internal.h
diff options
context:
space:
mode:
authorYauheni Kaliuta <yauheni.kaliuta@redhat.com>2019-02-01 22:20:02 +0200
committerLucas De Marchi <lucas.demarchi@intel.com>2019-02-04 13:51:27 -0800
commit391b4714b495183baefa9cb10ac8e1600c166a59 (patch)
treea674ab2034405859716de1e75b5d15f6f4be5de5 /libkmod/libkmod-internal.h
parentdec990483bcb5f36557ab34918256a2251a6cf25 (diff)
downloadkmod-391b4714b495183baefa9cb10ac8e1600c166a59.tar.gz
kmod-391b4714b495183baefa9cb10ac8e1600c166a59.tar.bz2
kmod-391b4714b495183baefa9cb10ac8e1600c166a59.zip
libkmod-signature: implement pkcs7 parsing with openssl
The patch adds data fetching from the PKCS#7 certificate using openssl library (which is used by scripts/sign-file.c in the linux kernel to sign modules). In general the certificate can contain many signatures, but since kmod (modinfo) supports only one signature at the moment, only first one is taken. With the current sign-file.c certificate doesn't contain signer key's fingerprint, so "serial number" is used for the key id. Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
Diffstat (limited to 'libkmod/libkmod-internal.h')
-rw-r--r--libkmod/libkmod-internal.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libkmod/libkmod-internal.h b/libkmod/libkmod-internal.h
index 346579c..a65ddd1 100644
--- a/libkmod/libkmod-internal.h
+++ b/libkmod/libkmod-internal.h
@@ -188,5 +188,8 @@ struct kmod_signature_info {
const char *algo, *hash_algo, *id_type;
const char *sig;
size_t sig_len;
+ void (*free)(void *);
+ void *private;
};
bool kmod_module_signature_info(const struct kmod_file *file, struct kmod_signature_info *sig_info) _must_check_ __attribute__((nonnull(1, 2)));
+void kmod_module_signature_info_free(struct kmod_signature_info *sig_info) __attribute__((nonnull));