X-Git-Url: https://bearssl.org/gitweb//home/git/?p=BearSSL;a=blobdiff_plain;f=src%2Fcodec%2Fpemdec.c;h=db8f0e61dd4ce9d2255fb21b7f3b8e962065a848;hp=04999f22515a50285b85db3ff01b77cef44d1256;hb=8e86598b33f9df81d1f77d6cc32568d9ae119d67;hpb=9e71c0673a9f46f82e43125919619f296698292e diff --git a/src/codec/pemdec.c b/src/codec/pemdec.c index 04999f2..db8f0e6 100644 --- a/src/codec/pemdec.c +++ b/src/codec/pemdec.c @@ -58,7 +58,7 @@ t0_parse7E_signed(const unsigned char **p) #define T0_INT4(x) T0_VBYTE(x, 21), T0_VBYTE(x, 14), T0_VBYTE(x, 7), T0_FBYTE(x, 0) #define T0_INT5(x) T0_SBYTE(x), T0_VBYTE(x, 21), T0_VBYTE(x, 14), T0_VBYTE(x, 7), T0_FBYTE(x, 0) -static const uint8_t t0_datablock[]; +/* static const unsigned char t0_datablock[]; */ void br_pem_decoder_init_main(void *t0ctx); @@ -69,7 +69,7 @@ void br_pem_decoder_run(void *t0ctx); #include "inner.h" -#define CTX ((br_pem_decoder_context *)((unsigned char *)t0ctx - offsetof(br_pem_decoder_context, cpu))) +#define CTX ((br_pem_decoder_context *)(void *)((unsigned char *)t0ctx - offsetof(br_pem_decoder_context, cpu))) /* see bearssl_pem.h */ void @@ -109,12 +109,12 @@ br_pem_decoder_event(br_pem_decoder_context *ctx) -static const uint8_t t0_datablock[] = { +static const unsigned char t0_datablock[] = { 0x00, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x42, 0x45, 0x47, 0x49, 0x4E, 0x20, 0x00, 0x2D, 0x2D, 0x2D, 0x2D, 0x45, 0x4E, 0x44, 0x20, 0x00 }; -static const uint8_t t0_codeblock[] = { +static const unsigned char t0_codeblock[] = { 0x00, 0x01, 0x00, 0x09, 0x00, 0x00, 0x01, 0x01, 0x07, 0x00, 0x00, 0x01, 0x01, 0x08, 0x00, 0x00, 0x13, 0x13, 0x00, 0x00, 0x01, T0_INT2(offsetof(br_pem_decoder_context, event)), 0x00, 0x00, 0x01,