diff options
author | tb <> | 2018-06-02 04:41:12 +0000 |
---|---|---|
committer | tb <> | 2018-06-02 04:41:12 +0000 |
commit | a3c52968413008aa01f7c8f6876331831bf28f03 (patch) | |
tree | c44b6c8b6d298b3a5b0f3fb3775e931c8b5b3d0f /src | |
parent | e5d993a83a8d6ac7bb0256a4a09f128ce3019905 (diff) | |
download | openbsd-a3c52968413008aa01f7c8f6876331831bf28f03.tar.gz openbsd-a3c52968413008aa01f7c8f6876331831bf28f03.tar.bz2 openbsd-a3c52968413008aa01f7c8f6876331831bf28f03.zip |
Add const to the argument of the following callback getters:
BIO_meth_get_callback_ctrl, BIO_meth_get_create, BIO_meth_get_ctrl,
BIO_meth_get_destroy, BIO_meth_get_gets, BIO_meth_get_puts,
BIO_meth_get_read, and BIO_meth_get_write.
ok jsing
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/bio/bio.h | 18 | ||||
-rw-r--r-- | src/lib/libcrypto/bio/bio_meth.c | 18 |
2 files changed, 18 insertions, 18 deletions
diff --git a/src/lib/libcrypto/bio/bio.h b/src/lib/libcrypto/bio/bio.h index 2847d3729e..82463c6beb 100644 --- a/src/lib/libcrypto/bio/bio.h +++ b/src/lib/libcrypto/bio/bio.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bio.h,v 1.44 2018/05/30 00:23:04 tb Exp $ */ | 1 | /* $OpenBSD: bio.h,v 1.45 2018/06/02 04:41:12 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -337,22 +337,22 @@ typedef int asn1_ps_func(BIO *b, unsigned char **pbuf, int *plen, void *parg); | |||
337 | /* BIO_METHOD accessors */ | 337 | /* BIO_METHOD accessors */ |
338 | BIO_METHOD *BIO_meth_new(int type, const char *name); | 338 | BIO_METHOD *BIO_meth_new(int type, const char *name); |
339 | void BIO_meth_free(BIO_METHOD *biom); | 339 | void BIO_meth_free(BIO_METHOD *biom); |
340 | int (*BIO_meth_get_write(BIO_METHOD *biom))(BIO *, const char *, int); | 340 | int (*BIO_meth_get_write(const BIO_METHOD *biom))(BIO *, const char *, int); |
341 | int BIO_meth_set_write(BIO_METHOD *biom, | 341 | int BIO_meth_set_write(BIO_METHOD *biom, |
342 | int (*write)(BIO *, const char *, int)); | 342 | int (*write)(BIO *, const char *, int)); |
343 | int (*BIO_meth_get_read(BIO_METHOD *biom))(BIO *, char *, int); | 343 | int (*BIO_meth_get_read(const BIO_METHOD *biom))(BIO *, char *, int); |
344 | int BIO_meth_set_read(BIO_METHOD *biom, int (*read)(BIO *, char *, int)); | 344 | int BIO_meth_set_read(BIO_METHOD *biom, int (*read)(BIO *, char *, int)); |
345 | int (*BIO_meth_get_puts(BIO_METHOD *biom))(BIO *, const char *); | 345 | int (*BIO_meth_get_puts(const BIO_METHOD *biom))(BIO *, const char *); |
346 | int BIO_meth_set_puts(BIO_METHOD *biom, int (*puts)(BIO *, const char *)); | 346 | int BIO_meth_set_puts(BIO_METHOD *biom, int (*puts)(BIO *, const char *)); |
347 | int (*BIO_meth_get_gets(BIO_METHOD *biom))(BIO *, char *, int); | 347 | int (*BIO_meth_get_gets(const BIO_METHOD *biom))(BIO *, char *, int); |
348 | int BIO_meth_set_gets(BIO_METHOD *biom, int (*gets)(BIO *, char *, int)); | 348 | int BIO_meth_set_gets(BIO_METHOD *biom, int (*gets)(BIO *, char *, int)); |
349 | long (*BIO_meth_get_ctrl(BIO_METHOD *biom))(BIO *, int, long, void *); | 349 | long (*BIO_meth_get_ctrl(const BIO_METHOD *biom))(BIO *, int, long, void *); |
350 | int BIO_meth_set_ctrl(BIO_METHOD *biom, long (*ctrl)(BIO *, int, long, void *)); | 350 | int BIO_meth_set_ctrl(BIO_METHOD *biom, long (*ctrl)(BIO *, int, long, void *)); |
351 | int (*BIO_meth_get_create(BIO_METHOD *biom))(BIO *); | 351 | int (*BIO_meth_get_create(const BIO_METHOD *biom))(BIO *); |
352 | int BIO_meth_set_create(BIO_METHOD *biom, int (*create)(BIO *)); | 352 | int BIO_meth_set_create(BIO_METHOD *biom, int (*create)(BIO *)); |
353 | int (*BIO_meth_get_destroy(BIO_METHOD *biom))(BIO *); | 353 | int (*BIO_meth_get_destroy(const BIO_METHOD *biom))(BIO *); |
354 | int BIO_meth_set_destroy(BIO_METHOD *biom, int (*destroy)(BIO *)); | 354 | int BIO_meth_set_destroy(BIO_METHOD *biom, int (*destroy)(BIO *)); |
355 | long (*BIO_meth_get_callback_ctrl(BIO_METHOD *biom))(BIO *, int, BIO_info_cb *); | 355 | long (*BIO_meth_get_callback_ctrl(const BIO_METHOD *biom))(BIO *, int, BIO_info_cb *); |
356 | int BIO_meth_set_callback_ctrl(BIO_METHOD *biom, | 356 | int BIO_meth_set_callback_ctrl(BIO_METHOD *biom, |
357 | long (*callback_ctrl)(BIO *, int, BIO_info_cb *)); | 357 | long (*callback_ctrl)(BIO *, int, BIO_info_cb *)); |
358 | 358 | ||
diff --git a/src/lib/libcrypto/bio/bio_meth.c b/src/lib/libcrypto/bio/bio_meth.c index c795c3f231..4327c010b1 100644 --- a/src/lib/libcrypto/bio/bio_meth.c +++ b/src/lib/libcrypto/bio/bio_meth.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bio_meth.c,v 1.5 2018/02/20 18:51:35 tb Exp $ */ | 1 | /* $OpenBSD: bio_meth.c,v 1.6 2018/06/02 04:41:12 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> | 3 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> |
4 | * | 4 | * |
@@ -40,7 +40,7 @@ BIO_meth_free(BIO_METHOD *biom) | |||
40 | } | 40 | } |
41 | 41 | ||
42 | int | 42 | int |
43 | (*BIO_meth_get_write(BIO_METHOD *biom))(BIO *, const char *, int) | 43 | (*BIO_meth_get_write(const BIO_METHOD *biom))(BIO *, const char *, int) |
44 | { | 44 | { |
45 | return biom->bwrite; | 45 | return biom->bwrite; |
46 | } | 46 | } |
@@ -53,7 +53,7 @@ BIO_meth_set_write(BIO_METHOD *biom, int (*write)(BIO *, const char *, int)) | |||
53 | } | 53 | } |
54 | 54 | ||
55 | int | 55 | int |
56 | (*BIO_meth_get_read(BIO_METHOD *biom))(BIO *, char *, int) | 56 | (*BIO_meth_get_read(const BIO_METHOD *biom))(BIO *, char *, int) |
57 | { | 57 | { |
58 | return biom->bread; | 58 | return biom->bread; |
59 | } | 59 | } |
@@ -66,7 +66,7 @@ BIO_meth_set_read(BIO_METHOD *biom, int (*read)(BIO *, char *, int)) | |||
66 | } | 66 | } |
67 | 67 | ||
68 | int | 68 | int |
69 | (*BIO_meth_get_puts(BIO_METHOD *biom))(BIO *, const char *) | 69 | (*BIO_meth_get_puts(const BIO_METHOD *biom))(BIO *, const char *) |
70 | { | 70 | { |
71 | return biom->bputs; | 71 | return biom->bputs; |
72 | } | 72 | } |
@@ -79,7 +79,7 @@ BIO_meth_set_puts(BIO_METHOD *biom, int (*puts)(BIO *, const char *)) | |||
79 | } | 79 | } |
80 | 80 | ||
81 | int | 81 | int |
82 | (*BIO_meth_get_gets(BIO_METHOD *biom))(BIO *, char *, int) | 82 | (*BIO_meth_get_gets(const BIO_METHOD *biom))(BIO *, char *, int) |
83 | { | 83 | { |
84 | return biom->bgets; | 84 | return biom->bgets; |
85 | } | 85 | } |
@@ -92,7 +92,7 @@ BIO_meth_set_gets(BIO_METHOD *biom, int (*gets)(BIO *, char *, int)) | |||
92 | } | 92 | } |
93 | 93 | ||
94 | long | 94 | long |
95 | (*BIO_meth_get_ctrl(BIO_METHOD *biom))(BIO *, int, long, void *) | 95 | (*BIO_meth_get_ctrl(const BIO_METHOD *biom))(BIO *, int, long, void *) |
96 | { | 96 | { |
97 | return biom->ctrl; | 97 | return biom->ctrl; |
98 | } | 98 | } |
@@ -105,7 +105,7 @@ BIO_meth_set_ctrl(BIO_METHOD *biom, long (*ctrl)(BIO *, int, long, void *)) | |||
105 | } | 105 | } |
106 | 106 | ||
107 | int | 107 | int |
108 | (*BIO_meth_get_create(BIO_METHOD *biom))(BIO *) | 108 | (*BIO_meth_get_create(const BIO_METHOD *biom))(BIO *) |
109 | { | 109 | { |
110 | return biom->create; | 110 | return biom->create; |
111 | } | 111 | } |
@@ -118,7 +118,7 @@ BIO_meth_set_create(BIO_METHOD *biom, int (*create)(BIO *)) | |||
118 | } | 118 | } |
119 | 119 | ||
120 | int | 120 | int |
121 | (*BIO_meth_get_destroy(BIO_METHOD *biom))(BIO *) | 121 | (*BIO_meth_get_destroy(const BIO_METHOD *biom))(BIO *) |
122 | { | 122 | { |
123 | return biom->destroy; | 123 | return biom->destroy; |
124 | } | 124 | } |
@@ -131,7 +131,7 @@ BIO_meth_set_destroy(BIO_METHOD *biom, int (*destroy)(BIO *)) | |||
131 | } | 131 | } |
132 | 132 | ||
133 | long | 133 | long |
134 | (*BIO_meth_get_callback_ctrl(BIO_METHOD *biom))(BIO *, int, BIO_info_cb *) | 134 | (*BIO_meth_get_callback_ctrl(const BIO_METHOD *biom))(BIO *, int, BIO_info_cb *) |
135 | { | 135 | { |
136 | return | 136 | return |
137 | (long (*)(BIO *, int, BIO_info_cb *))biom->callback_ctrl; /* XXX */ | 137 | (long (*)(BIO *, int, BIO_info_cb *))biom->callback_ctrl; /* XXX */ |