diff options
author | Michael Brown <mcb30@ipxe.org> | 2016-07-28 22:51:50 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2016-07-29 01:13:27 +0100 |
commit | 84add97ce9e094e9299db181d53ba8859f4a3e67 (patch) | |
tree | b74ae8ed5f65cb7431f4f0c660db5282f743773c /src/include/ipxe/pem.h | |
parent | eb7188d04b30dcbc47ac1af621b738cc0923ae38 (diff) | |
download | ipxe-84add97ce9e094e9299db181d53ba8859f4a3e67.tar.gz |
[crypto] Add PEM image format
Add PEM-encoded ASN.1 as an image format. We accept as PEM any image
containing a line starting with a "-----BEGIN" boundary marker.
We allow for PEM files containing multiple ASN.1 objects, such as a
certificate chain produced by concatenating individual certificate
files.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/pem.h')
-rw-r--r-- | src/include/ipxe/pem.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/include/ipxe/pem.h b/src/include/ipxe/pem.h new file mode 100644 index 000000000..1276f94ad --- /dev/null +++ b/src/include/ipxe/pem.h @@ -0,0 +1,22 @@ +#ifndef _IPXE_PEM_H +#define _IPXE_PEM_H + +/** @file + * + * PEM image format + * + */ + +FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); + +#include <ipxe/image.h> + +/** Pre-encapsulation boundary marker */ +#define PEM_BEGIN "-----BEGIN" + +/** Post-encapsulation boundary marker */ +#define PEM_END "-----END" + +extern struct image_type pem_image_type __image_type ( PROBE_NORMAL ); + +#endif /* _IPXE_PEM_H */ |