Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/contrib/lax_der_parsing.h
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
* | * | ||||
* Compared to for example OpenSSL, many violations are NOT supported: | * Compared to for example OpenSSL, many violations are NOT supported: | ||||
* - Using overly long tag descriptors for the sequence or integers inside, | * - Using overly long tag descriptors for the sequence or integers inside, | ||||
* violating section 8.1.2.2. | * violating section 8.1.2.2. | ||||
* - Encoding primitive integers as constructed values, violating section | * - Encoding primitive integers as constructed values, violating section | ||||
* 8.3.1. | * 8.3.1. | ||||
*/ | */ | ||||
#ifndef _SECP256K1_CONTRIB_LAX_DER_PARSING_H_ | #ifndef SECP256K1_CONTRIB_LAX_DER_PARSING_H | ||||
#define _SECP256K1_CONTRIB_LAX_DER_PARSING_H_ | #define SECP256K1_CONTRIB_LAX_DER_PARSING_H | ||||
#include <secp256k1.h> | #include <secp256k1.h> | ||||
# ifdef __cplusplus | #ifdef __cplusplus | ||||
extern "C" { | extern "C" { | ||||
# endif | #endif | ||||
/** Parse a signature in "lax DER" format | /** Parse a signature in "lax DER" format | ||||
* | * | ||||
* Returns: 1 when the signature could be parsed, 0 otherwise. | * Returns: 1 when the signature could be parsed, 0 otherwise. | ||||
* Args: ctx: a secp256k1 context object | * Args: ctx: a secp256k1 context object | ||||
* Out: sig: a pointer to a signature object | * Out: sig: a pointer to a signature object | ||||
* In: input: a pointer to the signature to be parsed | * In: input: a pointer to the signature to be parsed | ||||
* inputlen: the length of the array pointed to be input | * inputlen: the length of the array pointed to be input | ||||
Show All 16 Lines | int ecdsa_signature_parse_der_lax( | ||||
const unsigned char *input, | const unsigned char *input, | ||||
size_t inputlen | size_t inputlen | ||||
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); | ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); | ||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
} | } | ||||
#endif | #endif | ||||
#endif | #endif /* SECP256K1_CONTRIB_LAX_DER_PARSING_H */ |