X-Git-Url: https://www.bearssl.org/gitweb//home/git/?p=BearSSL;a=blobdiff_plain;f=src%2Fx509%2Fasn1.t0;h=c329514ad96f6bb1b68e05529374b845f3043b35;hp=d6bb2e4edf9abef9030d17b914f6fe9cb65c5a2d;hb=4b6046412bf927d6424f20fc7ee495bb96dbd227;hpb=52b3f2820f9b59f9eb87de87de1d9577d47b47ad diff --git a/src/x509/asn1.t0 b/src/x509/asn1.t0 index d6bb2e4..c329514 100644 --- a/src/x509/asn1.t0 +++ b/src/x509/asn1.t0 @@ -198,12 +198,12 @@ cc: set8 ( val addr -- ) { cc: set16 ( val addr -- ) { uint32_t addr = T0_POP(); - *(uint16_t *)((unsigned char *)CTX + addr) = T0_POP(); + *(uint16_t *)(void *)((unsigned char *)CTX + addr) = T0_POP(); } cc: set32 ( val addr -- ) { uint32_t addr = T0_POP(); - *(uint32_t *)((unsigned char *)CTX + addr) = T0_POP(); + *(uint32_t *)(void *)((unsigned char *)CTX + addr) = T0_POP(); } cc: get8 ( addr -- val ) { @@ -213,12 +213,12 @@ cc: get8 ( addr -- val ) { cc: get16 ( addr -- val ) { uint32_t addr = T0_POP(); - T0_PUSH(*(uint16_t *)((unsigned char *)CTX + addr)); + T0_PUSH(*(uint16_t *)(void *)((unsigned char *)CTX + addr)); } cc: get32 ( addr -- val ) { uint32_t addr = T0_POP(); - T0_PUSH(*(uint32_t *)((unsigned char *)CTX + addr)); + T0_PUSH(*(uint32_t *)(void *)((unsigned char *)CTX + addr)); } \ Read an ASN.1 tag. This function returns the "constructed" status @@ -278,7 +278,7 @@ cc: get32 ( addr -- val ) { 0x80 - dup ifnot ERR_X509_INDEFINITE_LENGTH fail then \ Masking out bit 7, this yields the number of bytes over which - \ the value is encoded. Since the total certicate length must + \ the value is encoded. Since the total certificate length must \ fit over 3 bytes (this is a consequence of SSL/TLS message \ format), we can reject big lengths and keep the length in a \ single integer. @@ -480,7 +480,7 @@ OID: id-at-commonName 2.5.4.3 \ 66 noncharacters, and also the surrogate range; this function does NOT \ check that the value is in the 0..10FFFF range. : valid-unicode? ( val -- bool ) - dup 0xFDD0 0xFEDF between? if drop 0 ret then + dup 0xFDD0 0xFDEF between? if drop 0 ret then dup 0xD800 0xDFFF between? if drop 0 ret then 0xFFFF and 0xFFFE < ;