diff options
| author | Michael Brown | 2011-08-13 00:51:44 +0200 |
|---|---|---|
| committer | Michael Brown | 2011-08-13 00:51:44 +0200 |
| commit | 1691cf50bc1d825cb9dac52e53b5280481fa0acf (patch) | |
| tree | 37a1322b0e9c10668120c392d26fb9c3c3b33713 /src/include | |
| parent | [script] Accept labels on lines terminated with CRLF (diff) | |
| download | ipxe-1691cf50bc1d825cb9dac52e53b5280481fa0acf.tar.gz ipxe-1691cf50bc1d825cb9dac52e53b5280481fa0acf.tar.xz ipxe-1691cf50bc1d825cb9dac52e53b5280481fa0acf.zip | |
[tls] Accept certificates without a version number
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>
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/ipxe/asn1.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/ipxe/asn1.h b/src/include/ipxe/asn1.h index 85e480e87..7ac108626 100644 --- a/src/include/ipxe/asn1.h +++ b/src/include/ipxe/asn1.h @@ -28,7 +28,19 @@ struct asn1_cursor { size_t len; }; +/** + * Invalidate ASN.1 object cursor + * + * @v cursor ASN.1 object cursor + */ +static inline __attribute__ (( always_inline )) void +asn1_invalidate_cursor ( struct asn1_cursor *cursor ) { + cursor->len = 0; +} + extern int asn1_enter ( struct asn1_cursor *cursor, unsigned int type ); +extern int asn1_skip_if_exists ( struct asn1_cursor *cursor, + unsigned int type ); extern int asn1_skip ( struct asn1_cursor *cursor, unsigned int type ); #endif /* _IPXE_ASN1_H */ |
