summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2018-05-12 17:47:53 +0000
committertb <>2018-05-12 17:47:53 +0000
commitd179dae307ac7f37cfdcb0967d16dd7186146e55 (patch)
tree9640075a182e16820fe72579b61fa8385d40e591 /src/lib
parent4472f3d68a4cfdda378061fd79bb5cfbb348752d (diff)
downloadopenbsd-d179dae307ac7f37cfdcb0967d16dd7186146e55.tar.gz
openbsd-d179dae307ac7f37cfdcb0967d16dd7186146e55.tar.bz2
openbsd-d179dae307ac7f37cfdcb0967d16dd7186146e55.zip
Add const qualifiers to the return values of BIO_s_mem() and
BIO_s_datagram(). ok jsing
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/bio/bio.h6
-rw-r--r--src/lib/libcrypto/bio/bss_dgram.c6
-rw-r--r--src/lib/libcrypto/bio/bss_mem.c6
3 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/libcrypto/bio/bio.h b/src/lib/libcrypto/bio/bio.h
index 8a473ca20a..678155c34e 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.41 2018/05/01 13:29:09 tb Exp $ */ 1/* $OpenBSD: bio.h,v 1.42 2018/05/12 17:47:53 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 *
@@ -641,7 +641,7 @@ int BIO_nwrite(BIO *bio, char **buf, int num);
641long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi, 641long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi,
642 long argl, long ret); 642 long argl, long ret);
643 643
644BIO_METHOD *BIO_s_mem(void); 644const BIO_METHOD *BIO_s_mem(void);
645BIO *BIO_new_mem_buf(void *buf, int len); 645BIO *BIO_new_mem_buf(void *buf, int len);
646const BIO_METHOD *BIO_s_socket(void); 646const BIO_METHOD *BIO_s_socket(void);
647const BIO_METHOD *BIO_s_connect(void); 647const BIO_METHOD *BIO_s_connect(void);
@@ -654,7 +654,7 @@ const BIO_METHOD *BIO_f_null(void);
654const BIO_METHOD *BIO_f_buffer(void); 654const BIO_METHOD *BIO_f_buffer(void);
655const BIO_METHOD *BIO_f_nbio_test(void); 655const BIO_METHOD *BIO_f_nbio_test(void);
656#ifndef OPENSSL_NO_DGRAM 656#ifndef OPENSSL_NO_DGRAM
657BIO_METHOD *BIO_s_datagram(void); 657const BIO_METHOD *BIO_s_datagram(void);
658#endif 658#endif
659 659
660/* BIO_METHOD *BIO_f_ber(void); */ 660/* BIO_METHOD *BIO_f_ber(void); */
diff --git a/src/lib/libcrypto/bio/bss_dgram.c b/src/lib/libcrypto/bio/bss_dgram.c
index a9657402ce..794b6d1b56 100644
--- a/src/lib/libcrypto/bio/bss_dgram.c
+++ b/src/lib/libcrypto/bio/bss_dgram.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_dgram.c,v 1.41 2015/07/20 23:15:28 doug Exp $ */ 1/* $OpenBSD: bss_dgram.c,v 1.42 2018/05/12 17:47:53 tb Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -86,7 +86,7 @@ static int dgram_clear(BIO *bio);
86 86
87static int BIO_dgram_should_retry(int s); 87static int BIO_dgram_should_retry(int s);
88 88
89static BIO_METHOD methods_dgramp = { 89static const BIO_METHOD methods_dgramp = {
90 .type = BIO_TYPE_DGRAM, 90 .type = BIO_TYPE_DGRAM,
91 .name = "datagram socket", 91 .name = "datagram socket",
92 .bwrite = dgram_write, 92 .bwrite = dgram_write,
@@ -112,7 +112,7 @@ typedef struct bio_dgram_data_st {
112} bio_dgram_data; 112} bio_dgram_data;
113 113
114 114
115BIO_METHOD * 115const BIO_METHOD *
116BIO_s_datagram(void) 116BIO_s_datagram(void)
117{ 117{
118 return (&methods_dgramp); 118 return (&methods_dgramp);
diff --git a/src/lib/libcrypto/bio/bss_mem.c b/src/lib/libcrypto/bio/bss_mem.c
index be491ca152..a699dc51c3 100644
--- a/src/lib/libcrypto/bio/bss_mem.c
+++ b/src/lib/libcrypto/bio/bss_mem.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_mem.c,v 1.15 2017/01/29 17:49:22 beck Exp $ */ 1/* $OpenBSD: bss_mem.c,v 1.16 2018/05/12 17:47:53 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 *
@@ -72,7 +72,7 @@ static long mem_ctrl(BIO *h, int cmd, long arg1, void *arg2);
72static int mem_new(BIO *h); 72static int mem_new(BIO *h);
73static int mem_free(BIO *data); 73static int mem_free(BIO *data);
74 74
75static BIO_METHOD mem_method = { 75static const BIO_METHOD mem_method = {
76 .type = BIO_TYPE_MEM, 76 .type = BIO_TYPE_MEM,
77 .name = "memory buffer", 77 .name = "memory buffer",
78 .bwrite = mem_write, 78 .bwrite = mem_write,
@@ -87,7 +87,7 @@ static BIO_METHOD mem_method = {
87/* bio->num is used to hold the value to return on 'empty', if it is 87/* bio->num is used to hold the value to return on 'empty', if it is
88 * 0, should_retry is not set */ 88 * 0, should_retry is not set */
89 89
90BIO_METHOD * 90const BIO_METHOD *
91BIO_s_mem(void) 91BIO_s_mem(void)
92{ 92{
93 return (&mem_method); 93 return (&mem_method);