diff options
author | tb <> | 2018-05-12 18:51:59 +0000 |
---|---|---|
committer | tb <> | 2018-05-12 18:51:59 +0000 |
commit | 79813f3abca6cad2f925122889a740ad8d016c5b (patch) | |
tree | 5f970340a82f0750b045fd9489efa2e59be63789 /src/lib/libcrypto/bio/bss_mem.c | |
parent | d179dae307ac7f37cfdcb0967d16dd7186146e55 (diff) | |
download | openbsd-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 '')
-rw-r--r-- | src/lib/libcrypto/bio/bss_mem.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 | ||
96 | BIO * | 96 | BIO * |
97 | BIO_new_mem_buf(void *buf, int len) | 97 | BIO_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; |