47#if !defined(MBEDTLS_CONFIG_FILE)
50#include MBEDTLS_CONFIG_FILE
53#if defined(MBEDTLS_ASN1_PARSE_C)
60#if defined(MBEDTLS_BIGNUM_C)
64#if defined(MBEDTLS_PLATFORM_C)
68#define mbedtls_calloc calloc
69#define mbedtls_free free
76 const unsigned char *
end,
79 if( (
end - *
p ) < 1 )
82 if( ( **
p & 0x80 ) == 0 )
89 if( (
end - *
p ) < 2 )
97 if( (
end - *
p ) < 3 )
105 if( (
end - *
p ) < 4 )
109 ( (
size_t)(*p)[2] << 8 ) | (*
p)[3];
114 if( (
end - *
p ) < 5 )
117 *
len = ( (
size_t)(*
p)[1] << 24 ) | ( (
size_t)(*p)[2] << 16 ) |
118 ( (
size_t)(*p)[3] << 8 ) | (*
p)[4];
127 if( *
len > (
size_t) (
end - *
p ) )
134 const unsigned char *
end,
137 if( (
end - *
p ) < 1 )
149 const unsigned char *
end,
161 *
val = ( **
p != 0 ) ? 1 : 0;
168 const unsigned char *
end,
177 if(
len == 0 ||
len >
sizeof(
int ) || ( **
p & 0x80 ) != 0 )
191#if defined(MBEDTLS_BIGNUM_C)
193 const unsigned char *
end,
225 bs->unused_bits = **
p;
226 if(
bs->unused_bits > 7 )
251 if( (*
len)-- < 2 || *(*
p)++ != 0 )
263 const unsigned char *
end,
313 const unsigned char *
end,
323 if( (
end - *
p ) < 1 )
357 const unsigned char *
end,
398 const char *oid,
size_t len )
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
struct outqueuenode * head
Multi-precision integer library.
int mbedtls_mpi_read_binary(mbedtls_mpi *X, const unsigned char *buf, size_t buflen)
Import an MPI from unsigned big endian binary data.
GLenum const GLfloat * params
GLenum GLuint GLenum GLsizei const GLchar * buf
#define MBEDTLS_ERR_ASN1_INVALID_LENGTH
int mbedtls_asn1_get_bitstring_null(unsigned char **p, const unsigned char *end, size_t *len)
Retrieve a bitstring ASN.1 tag without unused bits and its value. Updates the pointer to the beginnin...
#define MBEDTLS_ASN1_BOOLEAN
#define MBEDTLS_ERR_ASN1_OUT_OF_DATA
void mbedtls_asn1_free_named_data(mbedtls_asn1_named_data *entry)
Free a mbedtls_asn1_named_data entry.
int mbedtls_asn1_get_mpi(unsigned char **p, const unsigned char *end, mbedtls_mpi *X)
Retrieve a MPI value from an integer ASN.1 tag. Updates the pointer to immediately behind the full ta...
#define MBEDTLS_ASN1_SEQUENCE
#define MBEDTLS_ASN1_INTEGER
int mbedtls_asn1_get_int(unsigned char **p, const unsigned char *end, int *val)
Retrieve an integer ASN.1 tag and its value. Updates the pointer to immediately behind the full tag.
int mbedtls_asn1_get_sequence_of(unsigned char **p, const unsigned char *end, mbedtls_asn1_sequence *cur, int tag)
Parses and splits an ASN.1 "SEQUENCE OF <tag>" Updated the pointer to immediately behind the full seq...
#define MBEDTLS_ASN1_CONSTRUCTED
#define MBEDTLS_ERR_ASN1_INVALID_DATA
mbedtls_asn1_named_data * mbedtls_asn1_find_named_data(mbedtls_asn1_named_data *list, const char *oid, size_t len)
Find a specific named_data entry in a sequence or list based on the OID.
#define MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
#define MBEDTLS_ERR_ASN1_ALLOC_FAILED
#define MBEDTLS_ERR_ASN1_LENGTH_MISMATCH
int mbedtls_asn1_get_len(unsigned char **p, const unsigned char *end, size_t *len)
Get the length of an ASN.1 element. Updates the pointer to immediately behind the length.
int mbedtls_asn1_get_alg_null(unsigned char **p, const unsigned char *end, mbedtls_asn1_buf *alg)
Retrieve an AlgorithmIdentifier ASN.1 sequence with NULL or no params. Updates the pointer to immedia...
int mbedtls_asn1_get_alg(unsigned char **p, const unsigned char *end, mbedtls_asn1_buf *alg, mbedtls_asn1_buf *params)
Retrieve an AlgorithmIdentifier ASN.1 sequence. Updates the pointer to immediately behind the full Al...
#define MBEDTLS_ASN1_NULL
int mbedtls_asn1_get_bitstring(unsigned char **p, const unsigned char *end, mbedtls_asn1_bitstring *bs)
Retrieve a bitstring ASN.1 tag and its value. Updates the pointer to immediately behind the full tag.
int mbedtls_asn1_get_tag(unsigned char **p, const unsigned char *end, size_t *len, int tag)
Get the tag and length of the tag. Check for the requested tag. Updates the pointer to immediately be...
int mbedtls_asn1_get_bool(unsigned char **p, const unsigned char *end, int *val)
Retrieve a boolean ASN.1 tag and its value. Updates the pointer to immediately behind the full tag.
void mbedtls_asn1_free_named_data_list(mbedtls_asn1_named_data **head)
Free all entries in a mbedtls_asn1_named_data list Head will be set to NULL.
#define MBEDTLS_ASN1_BIT_STRING
static struct msdos_boot_sector bs
Configuration options (set of defines)