aboutsummaryrefslogtreecommitdiff
path: root/include/openssl/asn1.h
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2023-03-25 01:42:18 -0400
committerBoringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-04-19 14:11:01 +0000
commit32b51305debe43e38e7bf2c2b13c4ebf3b474e80 (patch)
tree455cd899b6e2b409210122fcab0fdc6dbff18830 /include/openssl/asn1.h
parent6776d5cd8fcdf6c5e05bae2d655076dbeaa56103 (diff)
downloadboringssl-32b51305debe43e38e7bf2c2b13c4ebf3b474e80.zip
boringssl-32b51305debe43e38e7bf2c2b13c4ebf3b474e80.tar.gz
boringssl-32b51305debe43e38e7bf2c2b13c4ebf3b474e80.tar.bz2
Widen ASN1_mbstring_copy and ASN1_mbstring_ncopy to ossl_ssize_t
Bug: 516 Change-Id: I3f374f05188bebe7aa4cbf45c81a6f945d3ce97c Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/58549 Commit-Queue: David Benjamin <davidben@google.com> Reviewed-by: Bob Beck <bbe@google.com>
Diffstat (limited to 'include/openssl/asn1.h')
-rw-r--r--include/openssl/asn1.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/openssl/asn1.h b/include/openssl/asn1.h
index 5df6816..d128c8d 100644
--- a/include/openssl/asn1.h
+++ b/include/openssl/asn1.h
@@ -740,15 +740,17 @@ OPENSSL_EXPORT int ASN1_STRING_to_UTF8(unsigned char **out,
// the result. If |out| is NULL, it returns the selected output type without
// constructing an |ASN1_STRING|. On error, this function returns -1.
OPENSSL_EXPORT int ASN1_mbstring_copy(ASN1_STRING **out, const uint8_t *in,
- int len, int inform, unsigned long mask);
+ ossl_ssize_t len, int inform,
+ unsigned long mask);
// ASN1_mbstring_ncopy behaves like |ASN1_mbstring_copy| but returns an error if
// the input is less than |minsize| or greater than |maxsize| codepoints long. A
// |maxsize| value of zero is ignored. Note the sizes are measured in
// codepoints, not output bytes.
OPENSSL_EXPORT int ASN1_mbstring_ncopy(ASN1_STRING **out, const uint8_t *in,
- int len, int inform, unsigned long mask,
- long minsize, long maxsize);
+ ossl_ssize_t len, int inform,
+ unsigned long mask, ossl_ssize_t minsize,
+ ossl_ssize_t maxsize);
// ASN1_STRING_set_by_NID behaves like |ASN1_mbstring_ncopy|, but determines
// |mask|, |minsize|, and |maxsize| based on |nid|. When |nid| is a recognized
@@ -774,7 +776,7 @@ OPENSSL_EXPORT int ASN1_mbstring_ncopy(ASN1_STRING **out, const uint8_t *in,
// to call |ASN1_mbstring_ncopy| directly instead.
OPENSSL_EXPORT ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out,
const unsigned char *in,
- int len, int inform,
+ ossl_ssize_t len, int inform,
int nid);
// STABLE_NO_MASK causes |ASN1_STRING_TABLE_add| to allow types other than