summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2018-05-12 18:51:59 +0000
committertb <>2018-05-12 18:51:59 +0000
commit79813f3abca6cad2f925122889a740ad8d016c5b (patch)
tree5f970340a82f0750b045fd9489efa2e59be63789 /src/lib
parentd179dae307ac7f37cfdcb0967d16dd7186146e55 (diff)
downloadopenbsd-79813f3abca6cad2f925122889a740ad8d016c5b.tar.gz
openbsd-79813f3abca6cad2f925122889a740ad8d016c5b.tar.bz2
openbsd-79813f3abca6cad2f925122889a740ad8d016c5b.zip
const qualifiers for BIO_new_mem_buf(), BIO_new_connect() and
BIO_new_accept(). The one for BIO_new_mem_buf() is a bit ugly since it needs to cast away the newly added const qualifier, as in OpenSSL commit 8ab31975bac. ok jsing
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/bio/bio.h8
-rw-r--r--src/lib/libcrypto/bio/bss_acpt.c4
-rw-r--r--src/lib/libcrypto/bio/bss_conn.c4
-rw-r--r--src/lib/libcrypto/bio/bss_mem.c6
4 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/libcrypto/bio/bio.h b/src/lib/libcrypto/bio/bio.h
index 678155c34e..105d3ff3af 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.42 2018/05/12 17:47:53 tb Exp $ */ 1/* $OpenBSD: bio.h,v 1.43 2018/05/12 18:51:59 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 *
@@ -642,7 +642,7 @@ long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi,
642 long argl, long ret); 642 long argl, long ret);
643 643
644const BIO_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(const 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);
648const BIO_METHOD *BIO_s_accept(void); 648const BIO_METHOD *BIO_s_accept(void);
@@ -698,8 +698,8 @@ int BIO_set_tcp_ndelay(int sock, int turn_on);
698BIO *BIO_new_socket(int sock, int close_flag); 698BIO *BIO_new_socket(int sock, int close_flag);
699BIO *BIO_new_dgram(int fd, int close_flag); 699BIO *BIO_new_dgram(int fd, int close_flag);
700BIO *BIO_new_fd(int fd, int close_flag); 700BIO *BIO_new_fd(int fd, int close_flag);
701BIO *BIO_new_connect(char *host_port); 701BIO *BIO_new_connect(const char *host_port);
702BIO *BIO_new_accept(char *host_port); 702BIO *BIO_new_accept(const char *host_port);
703 703
704int 704int
705BIO_new_bio_pair(BIO **bio1, size_t writebuf1, 705BIO_new_bio_pair(BIO **bio1, size_t writebuf1,
diff --git a/src/lib/libcrypto/bio/bss_acpt.c b/src/lib/libcrypto/bio/bss_acpt.c
index b270199da1..c95ddde7bb 100644
--- a/src/lib/libcrypto/bio/bss_acpt.c
+++ b/src/lib/libcrypto/bio/bss_acpt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_acpt.c,v 1.28 2018/05/01 13:29:09 tb Exp $ */ 1/* $OpenBSD: bss_acpt.c,v 1.29 2018/05/12 18:51:59 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 *
@@ -436,7 +436,7 @@ acpt_puts(BIO *bp, const char *str)
436} 436}
437 437
438BIO * 438BIO *
439BIO_new_accept(char *str) 439BIO_new_accept(const char *str)
440{ 440{
441 BIO *ret; 441 BIO *ret;
442 442
diff --git a/src/lib/libcrypto/bio/bss_conn.c b/src/lib/libcrypto/bio/bss_conn.c
index 575d163371..46a37b0608 100644
--- a/src/lib/libcrypto/bio/bss_conn.c
+++ b/src/lib/libcrypto/bio/bss_conn.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_conn.c,v 1.34 2018/05/01 13:29:09 tb Exp $ */ 1/* $OpenBSD: bss_conn.c,v 1.35 2018/05/12 18:51:59 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 *
@@ -583,7 +583,7 @@ conn_puts(BIO *bp, const char *str)
583} 583}
584 584
585BIO * 585BIO *
586BIO_new_connect(char *str) 586BIO_new_connect(const char *str)
587{ 587{
588 BIO *ret; 588 BIO *ret;
589 589
diff --git a/src/lib/libcrypto/bio/bss_mem.c b/src/lib/libcrypto/bio/bss_mem.c
index a699dc51c3..e76e1ad2e7 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.16 2018/05/12 17:47:53 tb Exp $ */ 1/* $OpenBSD: bss_mem.c,v 1.17 2018/05/12 18:51:59 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 *
@@ -94,7 +94,7 @@ BIO_s_mem(void)
94} 94}
95 95
96BIO * 96BIO *
97BIO_new_mem_buf(void *buf, int len) 97BIO_new_mem_buf(const void *buf, int len)
98{ 98{
99 BIO *ret; 99 BIO *ret;
100 BUF_MEM *b; 100 BUF_MEM *b;
@@ -108,7 +108,7 @@ BIO_new_mem_buf(void *buf, int len)
108 if (!(ret = BIO_new(BIO_s_mem()))) 108 if (!(ret = BIO_new(BIO_s_mem())))
109 return NULL; 109 return NULL;
110 b = (BUF_MEM *)ret->ptr; 110 b = (BUF_MEM *)ret->ptr;
111 b->data = buf; 111 b->data = (void *)buf; /* Trust in the BIO_FLAGS_MEM_RDONLY flag. */
112 b->length = sz; 112 b->length = sz;
113 b->max = sz; 113 b->max = sz;
114 ret->flags |= BIO_FLAGS_MEM_RDONLY; 114 ret->flags |= BIO_FLAGS_MEM_RDONLY;