diff options
Diffstat (limited to 'src/der.c')
-rw-r--r-- | src/der.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/der.c b/src/der.c index 3a036517d019..a18446d63523 100644 --- a/src/der.c +++ b/src/der.c @@ -35,7 +35,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: der.c,v 1.27 2022/09/24 20:30:13 christos Exp $") +FILE_RCSID("@(#)$File: der.c,v 1.28 2024/11/25 22:31:53 christos Exp $") #endif #else #define SIZE_T_FORMAT "z" @@ -132,20 +132,20 @@ static const char *der__tag[] = { #endif #ifdef TEST_DER -static uint8_t +file_private uint8_t getclass(uint8_t c) { return c >> 6; } -static uint8_t +file_private uint8_t gettype(uint8_t c) { return (c >> 5) & 1; } #endif -static uint32_t +file_private uint32_t gettag(const uint8_t *c, size_t *p, size_t l) { uint32_t tag; @@ -178,7 +178,7 @@ gettag(const uint8_t *c, size_t *p, size_t l) * Returns the length, or DER_BAD if the end of the input is reached or the * length exceeds the remaining input. */ -static uint32_t +file_private uint32_t getlength(const uint8_t *c, size_t *p, size_t l) { uint8_t digits, i; @@ -221,7 +221,7 @@ getlength(const uint8_t *c, size_t *p, size_t l) return CAST(uint32_t, len); } -static const char * +file_private const char * der_tag(char *buf, size_t len, uint32_t tag) { if (tag < DER_TAG_LAST) @@ -232,7 +232,7 @@ der_tag(char *buf, size_t len, uint32_t tag) } #ifndef TEST_DER -static int +file_private int der_data(char *buf, size_t blen, uint32_t tag, const void *q, uint32_t len) { uint32_t i; @@ -260,7 +260,7 @@ der_data(char *buf, size_t blen, uint32_t tag, const void *q, uint32_t len) return len * 2; } -int32_t +file_protected int32_t der_offs(struct magic_set *ms, struct magic *m, size_t nbytes) { const uint8_t *b = RCAST(const uint8_t *, ms->search.s); @@ -299,7 +299,7 @@ der_offs(struct magic_set *ms, struct magic *m, size_t nbytes) return CAST(int32_t, offs); } -int +file_protected int der_cmp(struct magic_set *ms, struct magic *m) { const uint8_t *b = RCAST(const uint8_t *, ms->search.s); @@ -382,7 +382,7 @@ val: #endif #ifdef TEST_DER -static void +file_private void printtag(uint32_t tag, const void *q, uint32_t len) { const uint8_t *d = q; @@ -402,7 +402,7 @@ printtag(uint32_t tag, const void *q, uint32_t len) printf("\n"); } -static void +file_private void printdata(size_t level, const void *v, size_t x, size_t l) { const uint8_t *p = v, *ep = p + l; |