mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
sm: Remove duplicated code.
* sm/minip12.c (struct tag_info): Change type of length and nhdr. (dump_tag_info): Adjust. (parse_tag): Re-implement using the parse_ber_header.
This commit is contained in:
parent
67d57fae3f
commit
1b4247e010
2 changed files with 32 additions and 83 deletions
|
@ -150,8 +150,10 @@ find_tlv_unchecked (const unsigned char *buffer, size_t length,
|
|||
|
||||
|
||||
/* ASN.1 BER parser: Parse BUFFER of length SIZE and return the tag
|
||||
and the length part from the TLV triplet. Update BUFFER and SIZE
|
||||
on success. */
|
||||
* and the length part from the TLV triplet. Update BUFFER and SIZE
|
||||
* on success. Note that this function does not check that the value
|
||||
* fits into the provided buffer; this allows to work on the TL part
|
||||
* of a TLV. */
|
||||
gpg_error_t
|
||||
parse_ber_header (unsigned char const **buffer, size_t *size,
|
||||
int *r_class, int *r_tag,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue