diff options
author | Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> | 2020-12-21 15:17:24 +0100 |
---|---|---|
committer | Nicola Tuveri <nic.tuv@gmail.com> | 2021-01-09 00:20:16 +0200 |
commit | 6d4313f03eddd39ca8d06a5e1d20fc1adcb207c5 (patch) | |
tree | dd124327109474b4317d2bb9a16d6092b3626acb /include | |
parent | 1330093b9c7e0325ca76589fb9ace5b664830c6d (diff) |
replace 'unsigned const char' with 'const unsigned char'
The openssl code base has only a few occurrences of 'unsigned const char'
(15 occurrences), compared to the more common 'const unsigned char' (4420
occurrences).
While the former is not illegal C, mixing the 'const' keyword (a 'type
qualifier') in between 'unsigned' and 'char' (both 'type specifiers') is a
bit odd.
The background for writing this patch is not to be pedantic, but because
the 'opmock' program (used to mock headers for unit tests) does not accept
the 'unsigned const char' construct. While this definitely is a bug in
opmock or one of its dependencies, openssl is the only piece of software we
are using in combination with opmock that has this construct.
CLA: trivial
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/13722)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/ssl.h.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/openssl/ssl.h.in b/include/openssl/ssl.h.in index 4e5d50bd6d..0025a2a8cd 100644 --- a/include/openssl/ssl.h.in +++ b/include/openssl/ssl.h.in @@ -1810,10 +1810,10 @@ __owur int SSL_CTX_dane_mtype_set(SSL_CTX *ctx, const EVP_MD *md, uint8_t mtype, uint8_t ord); __owur int SSL_dane_enable(SSL *s, const char *basedomain); __owur int SSL_dane_tlsa_add(SSL *s, uint8_t usage, uint8_t selector, - uint8_t mtype, unsigned const char *data, size_t dlen); + uint8_t mtype, const unsigned char *data, size_t dlen); __owur int SSL_get0_dane_authority(SSL *s, X509 **mcert, EVP_PKEY **mspki); __owur int SSL_get0_dane_tlsa(SSL *s, uint8_t *usage, uint8_t *selector, - uint8_t *mtype, unsigned const char **data, + uint8_t *mtype, const unsigned char **data, size_t *dlen); /* * Bridge opacity barrier between libcrypt and libssl, also needed to support |