summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2016-08-25 16:35:44 +0200
committerMichael Brown2016-08-25 16:41:25 +0200
commite564a4e7d6b5aa0dca94399c695f2d7cac949648 (patch)
tree7f34d0aa5d174ce82a396c28eb1978bcf5ac6adc /src/include
parent[pixbuf] Enable PNG format by default (diff)
downloadipxe-e564a4e7d6b5aa0dca94399c695f2d7cac949648.tar.gz
ipxe-e564a4e7d6b5aa0dca94399c695f2d7cac949648.tar.xz
ipxe-e564a4e7d6b5aa0dca94399c695f2d7cac949648.zip
[crypto] Add image_x509() to extract X.509 certificates from image
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ipxe/x509.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/ipxe/x509.h b/src/include/ipxe/x509.h
index 0daaf5e5..80c2e3c6 100644
--- a/src/include/ipxe/x509.h
+++ b/src/include/ipxe/x509.h
@@ -16,6 +16,8 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <ipxe/refcnt.h>
#include <ipxe/list.h>
+struct image;
+
/** An X.509 serial number */
struct x509_serial {
/** Raw serial number */
@@ -358,6 +360,8 @@ extern int x509_auto_append ( struct x509_chain *chain,
extern int x509_validate_chain ( struct x509_chain *chain, time_t time,
struct x509_chain *store,
struct x509_root *root );
+extern int image_x509 ( struct image *image, size_t offset,
+ struct x509_certificate **cert );
/* Functions exposed only for unit testing */
extern int x509_check_issuer ( struct x509_certificate *cert,