diff options
author | doug <> | 2015-06-17 07:25:56 +0000 |
---|---|---|
committer | doug <> | 2015-06-17 07:25:56 +0000 |
commit | bb9400db97f6a52d8f03427568ff93b9c562ae96 (patch) | |
tree | 04449019eca3e38dc6e63173fb6e6cc1d44fa27d /src | |
parent | 698e270eb6c4604a18c80b42f06b7e43e0caa485 (diff) | |
download | openbsd-bb9400db97f6a52d8f03427568ff93b9c562ae96.tar.gz openbsd-bb9400db97f6a52d8f03427568ff93b9c562ae96.tar.bz2 openbsd-bb9400db97f6a52d8f03427568ff93b9c562ae96.zip |
Use explicit int in bs_cbs.c.
ok miod@ jsing@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libssl/bs_cbs.c | 25 | ||||
-rw-r--r-- | src/lib/libssl/bytestring.h | 21 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/bs_cbs.c | 25 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/bytestring.h | 21 |
4 files changed, 48 insertions, 44 deletions
diff --git a/src/lib/libssl/bs_cbs.c b/src/lib/libssl/bs_cbs.c index b36ba489f3..45c253cc4b 100644 --- a/src/lib/libssl/bs_cbs.c +++ b/src/lib/libssl/bs_cbs.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bs_cbs.c,v 1.12 2015/06/17 07:06:22 doug Exp $ */ | 1 | /* $OpenBSD: bs_cbs.c,v 1.13 2015/06/17 07:25:56 doug Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014, Google Inc. | 3 | * Copyright (c) 2014, Google Inc. |
4 | * | 4 | * |
@@ -223,7 +223,7 @@ CBS_get_u24_length_prefixed(CBS *cbs, CBS *out) | |||
223 | } | 223 | } |
224 | 224 | ||
225 | int | 225 | int |
226 | CBS_get_any_asn1_element(CBS *cbs, CBS *out, unsigned *out_tag, | 226 | CBS_get_any_asn1_element(CBS *cbs, CBS *out, unsigned int *out_tag, |
227 | size_t *out_header_len) | 227 | size_t *out_header_len) |
228 | { | 228 | { |
229 | return cbs_get_any_asn1_element_internal(cbs, out, out_tag, | 229 | return cbs_get_any_asn1_element_internal(cbs, out, out_tag, |
@@ -240,7 +240,7 @@ CBS_get_any_asn1_element(CBS *cbs, CBS *out, unsigned *out_tag, | |||
240 | * Sections 8, 10 and 11 for DER encoding | 240 | * Sections 8, 10 and 11 for DER encoding |
241 | */ | 241 | */ |
242 | int | 242 | int |
243 | cbs_get_any_asn1_element_internal(CBS *cbs, CBS *out, unsigned *out_tag, | 243 | cbs_get_any_asn1_element_internal(CBS *cbs, CBS *out, unsigned int *out_tag, |
244 | size_t *out_header_len, int strict) | 244 | size_t *out_header_len, int strict) |
245 | { | 245 | { |
246 | uint8_t tag, length_byte; | 246 | uint8_t tag, length_byte; |
@@ -326,10 +326,10 @@ cbs_get_any_asn1_element_internal(CBS *cbs, CBS *out, unsigned *out_tag, | |||
326 | } | 326 | } |
327 | 327 | ||
328 | static int | 328 | static int |
329 | cbs_get_asn1(CBS *cbs, CBS *out, unsigned tag_value, int skip_header) | 329 | cbs_get_asn1(CBS *cbs, CBS *out, unsigned int tag_value, int skip_header) |
330 | { | 330 | { |
331 | size_t header_len; | 331 | size_t header_len; |
332 | unsigned tag; | 332 | unsigned int tag; |
333 | CBS throwaway; | 333 | CBS throwaway; |
334 | 334 | ||
335 | if (out == NULL) | 335 | if (out == NULL) |
@@ -348,19 +348,19 @@ cbs_get_asn1(CBS *cbs, CBS *out, unsigned tag_value, int skip_header) | |||
348 | } | 348 | } |
349 | 349 | ||
350 | int | 350 | int |
351 | CBS_get_asn1(CBS *cbs, CBS *out, unsigned tag_value) | 351 | CBS_get_asn1(CBS *cbs, CBS *out, unsigned int tag_value) |
352 | { | 352 | { |
353 | return cbs_get_asn1(cbs, out, tag_value, 1 /* skip header */); | 353 | return cbs_get_asn1(cbs, out, tag_value, 1 /* skip header */); |
354 | } | 354 | } |
355 | 355 | ||
356 | int | 356 | int |
357 | CBS_get_asn1_element(CBS *cbs, CBS *out, unsigned tag_value) | 357 | CBS_get_asn1_element(CBS *cbs, CBS *out, unsigned int tag_value) |
358 | { | 358 | { |
359 | return cbs_get_asn1(cbs, out, tag_value, 0 /* include header */); | 359 | return cbs_get_asn1(cbs, out, tag_value, 0 /* include header */); |
360 | } | 360 | } |
361 | 361 | ||
362 | int | 362 | int |
363 | CBS_peek_asn1_tag(const CBS *cbs, unsigned tag_value) | 363 | CBS_peek_asn1_tag(const CBS *cbs, unsigned int tag_value) |
364 | { | 364 | { |
365 | if (CBS_len(cbs) < 1) | 365 | if (CBS_len(cbs) < 1) |
366 | return 0; | 366 | return 0; |
@@ -415,7 +415,7 @@ CBS_get_asn1_uint64(CBS *cbs, uint64_t *out) | |||
415 | } | 415 | } |
416 | 416 | ||
417 | int | 417 | int |
418 | CBS_get_optional_asn1(CBS *cbs, CBS *out, int *out_present, unsigned tag) | 418 | CBS_get_optional_asn1(CBS *cbs, CBS *out, int *out_present, unsigned int tag) |
419 | { | 419 | { |
420 | if (CBS_peek_asn1_tag(cbs, tag)) { | 420 | if (CBS_peek_asn1_tag(cbs, tag)) { |
421 | if (!CBS_get_asn1(cbs, out, tag)) | 421 | if (!CBS_get_asn1(cbs, out, tag)) |
@@ -430,7 +430,7 @@ CBS_get_optional_asn1(CBS *cbs, CBS *out, int *out_present, unsigned tag) | |||
430 | 430 | ||
431 | int | 431 | int |
432 | CBS_get_optional_asn1_octet_string(CBS *cbs, CBS *out, int *out_present, | 432 | CBS_get_optional_asn1_octet_string(CBS *cbs, CBS *out, int *out_present, |
433 | unsigned tag) | 433 | unsigned int tag) |
434 | { | 434 | { |
435 | CBS child; | 435 | CBS child; |
436 | int present; | 436 | int present; |
@@ -452,7 +452,7 @@ CBS_get_optional_asn1_octet_string(CBS *cbs, CBS *out, int *out_present, | |||
452 | } | 452 | } |
453 | 453 | ||
454 | int | 454 | int |
455 | CBS_get_optional_asn1_uint64(CBS *cbs, uint64_t *out, unsigned tag, | 455 | CBS_get_optional_asn1_uint64(CBS *cbs, uint64_t *out, unsigned int tag, |
456 | uint64_t default_value) | 456 | uint64_t default_value) |
457 | { | 457 | { |
458 | CBS child; | 458 | CBS child; |
@@ -472,7 +472,8 @@ CBS_get_optional_asn1_uint64(CBS *cbs, uint64_t *out, unsigned tag, | |||
472 | } | 472 | } |
473 | 473 | ||
474 | int | 474 | int |
475 | CBS_get_optional_asn1_bool(CBS *cbs, int *out, unsigned tag, int default_value) | 475 | CBS_get_optional_asn1_bool(CBS *cbs, int *out, unsigned int tag, |
476 | int default_value) | ||
476 | { | 477 | { |
477 | CBS child, child2; | 478 | CBS child, child2; |
478 | int present; | 479 | int present; |
diff --git a/src/lib/libssl/bytestring.h b/src/lib/libssl/bytestring.h index 2eb18e207d..e831706b28 100644 --- a/src/lib/libssl/bytestring.h +++ b/src/lib/libssl/bytestring.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bytestring.h,v 1.11 2015/06/17 07:06:22 doug Exp $ */ | 1 | /* $OpenBSD: bytestring.h,v 1.12 2015/06/17 07:25:56 doug Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014, Google Inc. | 3 | * Copyright (c) 2014, Google Inc. |
4 | * | 4 | * |
@@ -217,13 +217,13 @@ int CBS_get_u24_length_prefixed(CBS *cbs, CBS *out); | |||
217 | * | 217 | * |
218 | * Tag numbers greater than 30 are not supported (i.e. short form only). | 218 | * Tag numbers greater than 30 are not supported (i.e. short form only). |
219 | */ | 219 | */ |
220 | int CBS_get_asn1(CBS *cbs, CBS *out, unsigned tag_value); | 220 | int CBS_get_asn1(CBS *cbs, CBS *out, unsigned int tag_value); |
221 | 221 | ||
222 | /* | 222 | /* |
223 | * CBS_get_asn1_element acts like |CBS_get_asn1| but |out| will include the | 223 | * CBS_get_asn1_element acts like |CBS_get_asn1| but |out| will include the |
224 | * ASN.1 header bytes too. | 224 | * ASN.1 header bytes too. |
225 | */ | 225 | */ |
226 | int CBS_get_asn1_element(CBS *cbs, CBS *out, unsigned tag_value); | 226 | int CBS_get_asn1_element(CBS *cbs, CBS *out, unsigned int tag_value); |
227 | 227 | ||
228 | /* | 228 | /* |
229 | * CBS_peek_asn1_tag looks ahead at the next ASN.1 tag and returns one | 229 | * CBS_peek_asn1_tag looks ahead at the next ASN.1 tag and returns one |
@@ -232,7 +232,7 @@ int CBS_get_asn1_element(CBS *cbs, CBS *out, unsigned tag_value); | |||
232 | * it returns one, CBS_get_asn1 may still fail if the rest of the | 232 | * it returns one, CBS_get_asn1 may still fail if the rest of the |
233 | * element is malformed. | 233 | * element is malformed. |
234 | */ | 234 | */ |
235 | int CBS_peek_asn1_tag(const CBS *cbs, unsigned tag_value); | 235 | int CBS_peek_asn1_tag(const CBS *cbs, unsigned int tag_value); |
236 | 236 | ||
237 | /* | 237 | /* |
238 | * CBS_get_any_asn1_element sets |*out| to contain the next ASN.1 element from | 238 | * CBS_get_any_asn1_element sets |*out| to contain the next ASN.1 element from |
@@ -243,7 +243,7 @@ int CBS_peek_asn1_tag(const CBS *cbs, unsigned tag_value); | |||
243 | * | 243 | * |
244 | * Tag numbers greater than 30 are not supported (i.e. short form only). | 244 | * Tag numbers greater than 30 are not supported (i.e. short form only). |
245 | */ | 245 | */ |
246 | int CBS_get_any_asn1_element(CBS *cbs, CBS *out, unsigned *out_tag, | 246 | int CBS_get_any_asn1_element(CBS *cbs, CBS *out, unsigned int *out_tag, |
247 | size_t *out_header_len); | 247 | size_t *out_header_len); |
248 | 248 | ||
249 | /* | 249 | /* |
@@ -261,7 +261,8 @@ int CBS_get_asn1_uint64(CBS *cbs, uint64_t *out); | |||
261 | * one on success, whether or not the element was present, and zero on | 261 | * one on success, whether or not the element was present, and zero on |
262 | * decode failure. | 262 | * decode failure. |
263 | */ | 263 | */ |
264 | int CBS_get_optional_asn1(CBS *cbs, CBS *out, int *out_present, unsigned tag); | 264 | int CBS_get_optional_asn1(CBS *cbs, CBS *out, int *out_present, |
265 | unsigned int tag); | ||
265 | 266 | ||
266 | /* | 267 | /* |
267 | * CBS_get_optional_asn1_octet_string gets an optional | 268 | * CBS_get_optional_asn1_octet_string gets an optional |
@@ -272,7 +273,7 @@ int CBS_get_optional_asn1(CBS *cbs, CBS *out, int *out_present, unsigned tag); | |||
272 | * present, and zero on decode failure. | 273 | * present, and zero on decode failure. |
273 | */ | 274 | */ |
274 | int CBS_get_optional_asn1_octet_string(CBS *cbs, CBS *out, int *out_present, | 275 | int CBS_get_optional_asn1_octet_string(CBS *cbs, CBS *out, int *out_present, |
275 | unsigned tag); | 276 | unsigned int tag); |
276 | 277 | ||
277 | /* | 278 | /* |
278 | * CBS_get_optional_asn1_uint64 gets an optional explicitly-tagged | 279 | * CBS_get_optional_asn1_uint64 gets an optional explicitly-tagged |
@@ -281,7 +282,7 @@ int CBS_get_optional_asn1_octet_string(CBS *cbs, CBS *out, int *out_present, | |||
281 | * on success, whether or not the element was present, and zero on | 282 | * on success, whether or not the element was present, and zero on |
282 | * decode failure. | 283 | * decode failure. |
283 | */ | 284 | */ |
284 | int CBS_get_optional_asn1_uint64(CBS *cbs, uint64_t *out, unsigned tag, | 285 | int CBS_get_optional_asn1_uint64(CBS *cbs, uint64_t *out, unsigned int tag, |
285 | uint64_t default_value); | 286 | uint64_t default_value); |
286 | 287 | ||
287 | /* | 288 | /* |
@@ -291,7 +292,7 @@ int CBS_get_optional_asn1_uint64(CBS *cbs, uint64_t *out, unsigned tag, | |||
291 | * success, whether or not the element was present, and zero on decode | 292 | * success, whether or not the element was present, and zero on decode |
292 | * failure. | 293 | * failure. |
293 | */ | 294 | */ |
294 | int CBS_get_optional_asn1_bool(CBS *cbs, int *out, unsigned tag, | 295 | int CBS_get_optional_asn1_bool(CBS *cbs, int *out, unsigned int tag, |
295 | int default_value); | 296 | int default_value); |
296 | 297 | ||
297 | 298 | ||
@@ -474,7 +475,7 @@ int CBB_add_asn1_uint64(CBB *cbb, uint64_t value); | |||
474 | * | 475 | * |
475 | * Tag numbers greater than 30 are not supported (i.e. short form only). | 476 | * Tag numbers greater than 30 are not supported (i.e. short form only). |
476 | */ | 477 | */ |
477 | int cbs_get_any_asn1_element_internal(CBS *cbs, CBS *out, unsigned *out_tag, | 478 | int cbs_get_any_asn1_element_internal(CBS *cbs, CBS *out, unsigned int *out_tag, |
478 | size_t *out_header_len, int strict); | 479 | size_t *out_header_len, int strict); |
479 | 480 | ||
480 | /* | 481 | /* |
diff --git a/src/lib/libssl/src/ssl/bs_cbs.c b/src/lib/libssl/src/ssl/bs_cbs.c index b36ba489f3..45c253cc4b 100644 --- a/src/lib/libssl/src/ssl/bs_cbs.c +++ b/src/lib/libssl/src/ssl/bs_cbs.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bs_cbs.c,v 1.12 2015/06/17 07:06:22 doug Exp $ */ | 1 | /* $OpenBSD: bs_cbs.c,v 1.13 2015/06/17 07:25:56 doug Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014, Google Inc. | 3 | * Copyright (c) 2014, Google Inc. |
4 | * | 4 | * |
@@ -223,7 +223,7 @@ CBS_get_u24_length_prefixed(CBS *cbs, CBS *out) | |||
223 | } | 223 | } |
224 | 224 | ||
225 | int | 225 | int |
226 | CBS_get_any_asn1_element(CBS *cbs, CBS *out, unsigned *out_tag, | 226 | CBS_get_any_asn1_element(CBS *cbs, CBS *out, unsigned int *out_tag, |
227 | size_t *out_header_len) | 227 | size_t *out_header_len) |
228 | { | 228 | { |
229 | return cbs_get_any_asn1_element_internal(cbs, out, out_tag, | 229 | return cbs_get_any_asn1_element_internal(cbs, out, out_tag, |
@@ -240,7 +240,7 @@ CBS_get_any_asn1_element(CBS *cbs, CBS *out, unsigned *out_tag, | |||
240 | * Sections 8, 10 and 11 for DER encoding | 240 | * Sections 8, 10 and 11 for DER encoding |
241 | */ | 241 | */ |
242 | int | 242 | int |
243 | cbs_get_any_asn1_element_internal(CBS *cbs, CBS *out, unsigned *out_tag, | 243 | cbs_get_any_asn1_element_internal(CBS *cbs, CBS *out, unsigned int *out_tag, |
244 | size_t *out_header_len, int strict) | 244 | size_t *out_header_len, int strict) |
245 | { | 245 | { |
246 | uint8_t tag, length_byte; | 246 | uint8_t tag, length_byte; |
@@ -326,10 +326,10 @@ cbs_get_any_asn1_element_internal(CBS *cbs, CBS *out, unsigned *out_tag, | |||
326 | } | 326 | } |
327 | 327 | ||
328 | static int | 328 | static int |
329 | cbs_get_asn1(CBS *cbs, CBS *out, unsigned tag_value, int skip_header) | 329 | cbs_get_asn1(CBS *cbs, CBS *out, unsigned int tag_value, int skip_header) |
330 | { | 330 | { |
331 | size_t header_len; | 331 | size_t header_len; |
332 | unsigned tag; | 332 | unsigned int tag; |
333 | CBS throwaway; | 333 | CBS throwaway; |
334 | 334 | ||
335 | if (out == NULL) | 335 | if (out == NULL) |
@@ -348,19 +348,19 @@ cbs_get_asn1(CBS *cbs, CBS *out, unsigned tag_value, int skip_header) | |||
348 | } | 348 | } |
349 | 349 | ||
350 | int | 350 | int |
351 | CBS_get_asn1(CBS *cbs, CBS *out, unsigned tag_value) | 351 | CBS_get_asn1(CBS *cbs, CBS *out, unsigned int tag_value) |
352 | { | 352 | { |
353 | return cbs_get_asn1(cbs, out, tag_value, 1 /* skip header */); | 353 | return cbs_get_asn1(cbs, out, tag_value, 1 /* skip header */); |
354 | } | 354 | } |
355 | 355 | ||
356 | int | 356 | int |
357 | CBS_get_asn1_element(CBS *cbs, CBS *out, unsigned tag_value) | 357 | CBS_get_asn1_element(CBS *cbs, CBS *out, unsigned int tag_value) |
358 | { | 358 | { |
359 | return cbs_get_asn1(cbs, out, tag_value, 0 /* include header */); | 359 | return cbs_get_asn1(cbs, out, tag_value, 0 /* include header */); |
360 | } | 360 | } |
361 | 361 | ||
362 | int | 362 | int |
363 | CBS_peek_asn1_tag(const CBS *cbs, unsigned tag_value) | 363 | CBS_peek_asn1_tag(const CBS *cbs, unsigned int tag_value) |
364 | { | 364 | { |
365 | if (CBS_len(cbs) < 1) | 365 | if (CBS_len(cbs) < 1) |
366 | return 0; | 366 | return 0; |
@@ -415,7 +415,7 @@ CBS_get_asn1_uint64(CBS *cbs, uint64_t *out) | |||
415 | } | 415 | } |
416 | 416 | ||
417 | int | 417 | int |
418 | CBS_get_optional_asn1(CBS *cbs, CBS *out, int *out_present, unsigned tag) | 418 | CBS_get_optional_asn1(CBS *cbs, CBS *out, int *out_present, unsigned int tag) |
419 | { | 419 | { |
420 | if (CBS_peek_asn1_tag(cbs, tag)) { | 420 | if (CBS_peek_asn1_tag(cbs, tag)) { |
421 | if (!CBS_get_asn1(cbs, out, tag)) | 421 | if (!CBS_get_asn1(cbs, out, tag)) |
@@ -430,7 +430,7 @@ CBS_get_optional_asn1(CBS *cbs, CBS *out, int *out_present, unsigned tag) | |||
430 | 430 | ||
431 | int | 431 | int |
432 | CBS_get_optional_asn1_octet_string(CBS *cbs, CBS *out, int *out_present, | 432 | CBS_get_optional_asn1_octet_string(CBS *cbs, CBS *out, int *out_present, |
433 | unsigned tag) | 433 | unsigned int tag) |
434 | { | 434 | { |
435 | CBS child; | 435 | CBS child; |
436 | int present; | 436 | int present; |
@@ -452,7 +452,7 @@ CBS_get_optional_asn1_octet_string(CBS *cbs, CBS *out, int *out_present, | |||
452 | } | 452 | } |
453 | 453 | ||
454 | int | 454 | int |
455 | CBS_get_optional_asn1_uint64(CBS *cbs, uint64_t *out, unsigned tag, | 455 | CBS_get_optional_asn1_uint64(CBS *cbs, uint64_t *out, unsigned int tag, |
456 | uint64_t default_value) | 456 | uint64_t default_value) |
457 | { | 457 | { |
458 | CBS child; | 458 | CBS child; |
@@ -472,7 +472,8 @@ CBS_get_optional_asn1_uint64(CBS *cbs, uint64_t *out, unsigned tag, | |||
472 | } | 472 | } |
473 | 473 | ||
474 | int | 474 | int |
475 | CBS_get_optional_asn1_bool(CBS *cbs, int *out, unsigned tag, int default_value) | 475 | CBS_get_optional_asn1_bool(CBS *cbs, int *out, unsigned int tag, |
476 | int default_value) | ||
476 | { | 477 | { |
477 | CBS child, child2; | 478 | CBS child, child2; |
478 | int present; | 479 | int present; |
diff --git a/src/lib/libssl/src/ssl/bytestring.h b/src/lib/libssl/src/ssl/bytestring.h index 2eb18e207d..e831706b28 100644 --- a/src/lib/libssl/src/ssl/bytestring.h +++ b/src/lib/libssl/src/ssl/bytestring.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bytestring.h,v 1.11 2015/06/17 07:06:22 doug Exp $ */ | 1 | /* $OpenBSD: bytestring.h,v 1.12 2015/06/17 07:25:56 doug Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014, Google Inc. | 3 | * Copyright (c) 2014, Google Inc. |
4 | * | 4 | * |
@@ -217,13 +217,13 @@ int CBS_get_u24_length_prefixed(CBS *cbs, CBS *out); | |||
217 | * | 217 | * |
218 | * Tag numbers greater than 30 are not supported (i.e. short form only). | 218 | * Tag numbers greater than 30 are not supported (i.e. short form only). |
219 | */ | 219 | */ |
220 | int CBS_get_asn1(CBS *cbs, CBS *out, unsigned tag_value); | 220 | int CBS_get_asn1(CBS *cbs, CBS *out, unsigned int tag_value); |
221 | 221 | ||
222 | /* | 222 | /* |
223 | * CBS_get_asn1_element acts like |CBS_get_asn1| but |out| will include the | 223 | * CBS_get_asn1_element acts like |CBS_get_asn1| but |out| will include the |
224 | * ASN.1 header bytes too. | 224 | * ASN.1 header bytes too. |
225 | */ | 225 | */ |
226 | int CBS_get_asn1_element(CBS *cbs, CBS *out, unsigned tag_value); | 226 | int CBS_get_asn1_element(CBS *cbs, CBS *out, unsigned int tag_value); |
227 | 227 | ||
228 | /* | 228 | /* |
229 | * CBS_peek_asn1_tag looks ahead at the next ASN.1 tag and returns one | 229 | * CBS_peek_asn1_tag looks ahead at the next ASN.1 tag and returns one |
@@ -232,7 +232,7 @@ int CBS_get_asn1_element(CBS *cbs, CBS *out, unsigned tag_value); | |||
232 | * it returns one, CBS_get_asn1 may still fail if the rest of the | 232 | * it returns one, CBS_get_asn1 may still fail if the rest of the |
233 | * element is malformed. | 233 | * element is malformed. |
234 | */ | 234 | */ |
235 | int CBS_peek_asn1_tag(const CBS *cbs, unsigned tag_value); | 235 | int CBS_peek_asn1_tag(const CBS *cbs, unsigned int tag_value); |
236 | 236 | ||
237 | /* | 237 | /* |
238 | * CBS_get_any_asn1_element sets |*out| to contain the next ASN.1 element from | 238 | * CBS_get_any_asn1_element sets |*out| to contain the next ASN.1 element from |
@@ -243,7 +243,7 @@ int CBS_peek_asn1_tag(const CBS *cbs, unsigned tag_value); | |||
243 | * | 243 | * |
244 | * Tag numbers greater than 30 are not supported (i.e. short form only). | 244 | * Tag numbers greater than 30 are not supported (i.e. short form only). |
245 | */ | 245 | */ |
246 | int CBS_get_any_asn1_element(CBS *cbs, CBS *out, unsigned *out_tag, | 246 | int CBS_get_any_asn1_element(CBS *cbs, CBS *out, unsigned int *out_tag, |
247 | size_t *out_header_len); | 247 | size_t *out_header_len); |
248 | 248 | ||
249 | /* | 249 | /* |
@@ -261,7 +261,8 @@ int CBS_get_asn1_uint64(CBS *cbs, uint64_t *out); | |||
261 | * one on success, whether or not the element was present, and zero on | 261 | * one on success, whether or not the element was present, and zero on |
262 | * decode failure. | 262 | * decode failure. |
263 | */ | 263 | */ |
264 | int CBS_get_optional_asn1(CBS *cbs, CBS *out, int *out_present, unsigned tag); | 264 | int CBS_get_optional_asn1(CBS *cbs, CBS *out, int *out_present, |
265 | unsigned int tag); | ||
265 | 266 | ||
266 | /* | 267 | /* |
267 | * CBS_get_optional_asn1_octet_string gets an optional | 268 | * CBS_get_optional_asn1_octet_string gets an optional |
@@ -272,7 +273,7 @@ int CBS_get_optional_asn1(CBS *cbs, CBS *out, int *out_present, unsigned tag); | |||
272 | * present, and zero on decode failure. | 273 | * present, and zero on decode failure. |
273 | */ | 274 | */ |
274 | int CBS_get_optional_asn1_octet_string(CBS *cbs, CBS *out, int *out_present, | 275 | int CBS_get_optional_asn1_octet_string(CBS *cbs, CBS *out, int *out_present, |
275 | unsigned tag); | 276 | unsigned int tag); |
276 | 277 | ||
277 | /* | 278 | /* |
278 | * CBS_get_optional_asn1_uint64 gets an optional explicitly-tagged | 279 | * CBS_get_optional_asn1_uint64 gets an optional explicitly-tagged |
@@ -281,7 +282,7 @@ int CBS_get_optional_asn1_octet_string(CBS *cbs, CBS *out, int *out_present, | |||
281 | * on success, whether or not the element was present, and zero on | 282 | * on success, whether or not the element was present, and zero on |
282 | * decode failure. | 283 | * decode failure. |
283 | */ | 284 | */ |
284 | int CBS_get_optional_asn1_uint64(CBS *cbs, uint64_t *out, unsigned tag, | 285 | int CBS_get_optional_asn1_uint64(CBS *cbs, uint64_t *out, unsigned int tag, |
285 | uint64_t default_value); | 286 | uint64_t default_value); |
286 | 287 | ||
287 | /* | 288 | /* |
@@ -291,7 +292,7 @@ int CBS_get_optional_asn1_uint64(CBS *cbs, uint64_t *out, unsigned tag, | |||
291 | * success, whether or not the element was present, and zero on decode | 292 | * success, whether or not the element was present, and zero on decode |
292 | * failure. | 293 | * failure. |
293 | */ | 294 | */ |
294 | int CBS_get_optional_asn1_bool(CBS *cbs, int *out, unsigned tag, | 295 | int CBS_get_optional_asn1_bool(CBS *cbs, int *out, unsigned int tag, |
295 | int default_value); | 296 | int default_value); |
296 | 297 | ||
297 | 298 | ||
@@ -474,7 +475,7 @@ int CBB_add_asn1_uint64(CBB *cbb, uint64_t value); | |||
474 | * | 475 | * |
475 | * Tag numbers greater than 30 are not supported (i.e. short form only). | 476 | * Tag numbers greater than 30 are not supported (i.e. short form only). |
476 | */ | 477 | */ |
477 | int cbs_get_any_asn1_element_internal(CBS *cbs, CBS *out, unsigned *out_tag, | 478 | int cbs_get_any_asn1_element_internal(CBS *cbs, CBS *out, unsigned int *out_tag, |
478 | size_t *out_header_len, int strict); | 479 | size_t *out_header_len, int strict); |
479 | 480 | ||
480 | /* | 481 | /* |