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 | |
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 'src/lib')
-rw-r--r-- | src/lib/libcrypto/bio/bio.h | 8 | ||||
-rw-r--r-- | src/lib/libcrypto/bio/bss_acpt.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/bio/bss_conn.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/bio/bss_mem.c | 6 |
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 | ||
644 | const BIO_METHOD *BIO_s_mem(void); | 644 | const BIO_METHOD *BIO_s_mem(void); |
645 | BIO *BIO_new_mem_buf(void *buf, int len); | 645 | BIO *BIO_new_mem_buf(const void *buf, int len); |
646 | const BIO_METHOD *BIO_s_socket(void); | 646 | const BIO_METHOD *BIO_s_socket(void); |
647 | const BIO_METHOD *BIO_s_connect(void); | 647 | const BIO_METHOD *BIO_s_connect(void); |
648 | const BIO_METHOD *BIO_s_accept(void); | 648 | const BIO_METHOD *BIO_s_accept(void); |
@@ -698,8 +698,8 @@ int BIO_set_tcp_ndelay(int sock, int turn_on); | |||
698 | BIO *BIO_new_socket(int sock, int close_flag); | 698 | BIO *BIO_new_socket(int sock, int close_flag); |
699 | BIO *BIO_new_dgram(int fd, int close_flag); | 699 | BIO *BIO_new_dgram(int fd, int close_flag); |
700 | BIO *BIO_new_fd(int fd, int close_flag); | 700 | BIO *BIO_new_fd(int fd, int close_flag); |
701 | BIO *BIO_new_connect(char *host_port); | 701 | BIO *BIO_new_connect(const char *host_port); |
702 | BIO *BIO_new_accept(char *host_port); | 702 | BIO *BIO_new_accept(const char *host_port); |
703 | 703 | ||
704 | int | 704 | int |
705 | BIO_new_bio_pair(BIO **bio1, size_t writebuf1, | 705 | BIO_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 | ||
438 | BIO * | 438 | BIO * |
439 | BIO_new_accept(char *str) | 439 | BIO_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 | ||
585 | BIO * | 585 | BIO * |
586 | BIO_new_connect(char *str) | 586 | BIO_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 | ||
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; |