summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAleksei Nikiforov <darktemplar@basealt.ru>2019-05-17 14:44:06 +0300
committerAleksei Nikiforov <darktemplar@basealt.ru>2019-05-21 17:44:50 +0300
commit04dd183b81fb9d53ef29448bf290c065646de501 (patch)
treee491a199c68838b16989c86eba841f99c7a8ae54 /lib
parent67f7df0926dfcb0d5cbcec08aafd3381165ab57c (diff)
downloadgnutls-04dd183b81fb9d53ef29448bf290c065646de501.tar.gz
Mark second argument of function gnutls_x509_crt_equals2 as const
This will allow using this function with certificates returned by function gnutls_certificate_get_peers without casts dropping const qualifier or making temporary copies out of retrieved data. Signed-off-by: Aleksei Nikiforov <darktemplar@basealt.ru>
Diffstat (limited to 'lib')
-rw-r--r--lib/includes/gnutls/x509.h2
-rw-r--r--lib/x509/x509.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/includes/gnutls/x509.h b/lib/includes/gnutls/x509.h
index a153f7fac9..a2eca3f983 100644
--- a/lib/includes/gnutls/x509.h
+++ b/lib/includes/gnutls/x509.h
@@ -148,7 +148,7 @@ typedef enum gnutls_x509_crt_flags {
void gnutls_x509_crt_set_flags(gnutls_x509_crt_t cert, unsigned flags);
unsigned gnutls_x509_crt_equals(gnutls_x509_crt_t cert1, gnutls_x509_crt_t cert2);
-unsigned gnutls_x509_crt_equals2(gnutls_x509_crt_t cert1, gnutls_datum_t * der);
+unsigned gnutls_x509_crt_equals2(gnutls_x509_crt_t cert1, const gnutls_datum_t * der);
int gnutls_x509_crt_import(gnutls_x509_crt_t cert,
const gnutls_datum_t * data,
diff --git a/lib/x509/x509.c b/lib/x509/x509.c
index 6abf3ca947..44418cb45f 100644
--- a/lib/x509/x509.c
+++ b/lib/x509/x509.c
@@ -150,7 +150,7 @@ unsigned gnutls_x509_crt_equals(gnutls_x509_crt_t cert1,
**/
unsigned
gnutls_x509_crt_equals2(gnutls_x509_crt_t cert1,
- gnutls_datum_t * der)
+ const gnutls_datum_t * der)
{
bool result;