summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/asn1.h
Commit message (Collapse)AuthorAgeFilesLines
* [crypto] Add MD4 message digest algorithmMichael Brown2017-11-121-0/+6
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Provide asn1_built() to construct a cursor from a builderMichael Brown2017-06-201-0/+24
| | | | | | | | | | | | | Our ASN.1 parsing code uses a struct asn1_cursor, while the object construction code uses a struct asn1_builder. These structures are identical apart from the const modifier applied to the data pointer in struct asn1_cursor. Provide asn1_built() to safely typecast a struct asn1_builder to a struct asn1_cursor, allowing constructed objects to be passed to functions expecting a struct asn1_cursor. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Expose asn1_grow()Michael Brown2017-06-201-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Allow for parsing of partial ASN.1 cursorsMichael Brown2016-07-281-0/+2
| | | | | | | | | Allow code to create a partial ASN.1 cursor containing only the type and length bytes, so that asn1_start() may be used to determine the length of a large ASN.1 blob without first allocating memory to hold the entire blob. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Remove obsolete extern declaration for asn1_invalidate_cursor()Michael Brown2016-07-281-1/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Allow for zero-length ASN.1 cursorsMichael Brown2016-03-111-2/+14
| | | | | | | | | | | | | The assumption in asn1_type() that an ASN.1 cursor will always contain a type byte is incorrect. A cursor that has been cleanly invalidated via asn1_invalidate_cursor() will contain a type byte, but there are other ways in which to arrive at a zero-length cursor. Fix by explicitly checking the cursor length in asn1_type(). This allows asn1_invalidate_cursor() to be reduced to simply zeroing the length field. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Add ASN.1 OIDs for sha{224,384,512}WithRsaEncryptionTufan Karadere2015-08-021-0/+18
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Add SHA-512/224 algorithmMichael Brown2015-04-121-0/+7
| | | | | | | | | | SHA-512/224 is almost identical to SHA-512, with differing initial hash values and a truncated output length. This implementation has been verified using the NIST SHA-512/224 test vectors. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Add SHA-512/256 algorithmMichael Brown2015-04-121-0/+7
| | | | | | | | | | SHA-512/256 is almost identical to SHA-512, with differing initial hash values and a truncated output length. This implementation has been verified using the NIST SHA-512/256 test vectors. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Add SHA-384 algorithmMichael Brown2015-04-121-0/+7
| | | | | | | | | | SHA-384 is almost identical to SHA-512, with differing initial hash values and a truncated output length. This implementation has been verified using the NIST SHA-384 test vectors. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Add SHA-512 algorithmMichael Brown2015-04-121-0/+7
| | | | | | | This implementation has been verified using the NIST SHA-512 test vectors. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Add SHA-224 algorithmMichael Brown2015-04-121-0/+7
| | | | | | | | | | SHA-224 is almost identical to SHA-256, with differing initial hash values and a truncated output length. This implementation has been verified using the NIST SHA-224 test vectors. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-021-1/+1
| | | | | | | Relicense files for which I am the sole author (as identified by util/relicense.pl). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Add support for subjectAltName and wildcard certificatesMichael Brown2014-03-311-0/+5
| | | | | Originally-implemented-by: Alex Chernyakhovsky <achernya@google.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Add framework for OCSPMichael Brown2012-05-151-0/+11
| | | | | | | | Add support for constructing OCSP queries and parsing OCSP responses. (There is no support yet for actually issuing an OCSP query via an HTTP POST.) Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Add functions for constructing ASN.1 objectsMichael Brown2012-05-141-0/+33
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Parse OCSPSigning key purpose, if presentMichael Brown2012-05-141-0/+7
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Generalise x509_parse_bit_string() to asn1_bit_string()Michael Brown2012-05-141-9/+9
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Generalise asn1_{digest,pubkey,signature}_algorithm()Michael Brown2012-05-141-2/+8
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Generalise x509_parse_time() to asn1_generalized_time()Michael Brown2012-05-141-0/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Parse OCSP responder URI from X.509 certificateMichael Brown2012-05-041-0/+17
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Add support for Cryptographic Message Syntax (PKCS #7)Michael Brown2012-03-221-0/+6
| | | | | | | | | | | | The Cryptographic Message Syntax (PKCS#7) provides a format for encapsulating digital signatures of arbitrary binary blobs. A signature can be generated using openssl cms -sign -in <file to sign> -binary -noattr \ -signer <signer>.crt -inkey <signer>.key -certfile <CA>.crt \ -outform DER -out <signature> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Parse X.509 extended key usage extensionMichael Brown2012-03-221-0/+12
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Generalise X.509 OID-identified algorithm to asn1.cMichael Brown2012-03-221-0/+23
| | | | | | | | The concept of an OID-identified algorithm as defined in X.509 is used in some other standards (e.g. PKCS#7). Generalise this functionality and provide it as part of the ASN.1 core. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Treat ASN.1 OIDs as opaqueMichael Brown2012-03-211-105/+60Star
| | | | | | | | | OIDs are theoretically part of a global hierarchy. However, the hierarchy is sufficiently disorganised as to be essentially meaningless for all purposes other than guaranteeing uniqueness. Ignore the hierarchical nature of OIDs and treat them as opaque. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Move all ASN.1 OIDs to asn1.hMichael Brown2012-03-211-0/+91
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Add more ASN.1 functions for X.509 certificate parsingMichael Brown2012-03-181-7/+19
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Add ASN.1 functions for X.509 certificate parsingMichael Brown2012-03-131-13/+94
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tls] Use const to mark incoming data being processedMichael Brown2012-03-131-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tls] Accept certificates without a version numberMichael Brown2011-08-131-0/+12
| | | | | | | The version field of an X.509 certificate appears to be optional. Reported-by: Sebastiano Manusia <Sebastiano.Manusia@chuv.ch> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Rename gPXE to iPXEMichael Brown2010-04-201-0/+34
Access to the gpxe.org and etherboot.org domains and associated resources has been revoked by the registrant of the domain. Work around this problem by renaming project from gPXE to iPXE, and updating URLs to match. Also update README, LOG and COPYRIGHTS to remove obsolete information. Signed-off-by: Michael Brown <mcb30@ipxe.org>