diff options
| author | tb <> | 2018-02-18 12:58:25 +0000 |
|---|---|---|
| committer | tb <> | 2018-02-18 12:58:25 +0000 |
| commit | 887ca5dd6147b9b6e43391786aeb989c83a92993 (patch) | |
| tree | ac1d981df5d82d44a2761e1df0287d35d5e39bca /src | |
| parent | 04e0c62f5644571d8d5db6b09704dd39d3be079c (diff) | |
| download | openbsd-887ca5dd6147b9b6e43391786aeb989c83a92993.tar.gz openbsd-887ca5dd6147b9b6e43391786aeb989c83a92993.tar.bz2 openbsd-887ca5dd6147b9b6e43391786aeb989c83a92993.zip | |
Provide BIO_{g,s}et_data() and BIO_set_init().
ok jsing
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/Symbols.list | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/bio/bio.h | 5 | ||||
| -rw-r--r-- | src/lib/libcrypto/bio/bio_lib.c | 20 |
3 files changed, 26 insertions, 2 deletions
diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list index e5997cc76d..f8125ad9f7 100644 --- a/src/lib/libcrypto/Symbols.list +++ b/src/lib/libcrypto/Symbols.list | |||
| @@ -276,6 +276,7 @@ BIO_free_all | |||
| 276 | BIO_get_accept_socket | 276 | BIO_get_accept_socket |
| 277 | BIO_get_callback | 277 | BIO_get_callback |
| 278 | BIO_get_callback_arg | 278 | BIO_get_callback_arg |
| 279 | BIO_get_data | ||
| 279 | BIO_get_ex_data | 280 | BIO_get_ex_data |
| 280 | BIO_get_ex_new_index | 281 | BIO_get_ex_new_index |
| 281 | BIO_get_host_ip | 282 | BIO_get_host_ip |
| @@ -334,9 +335,11 @@ BIO_s_socket | |||
| 334 | BIO_set | 335 | BIO_set |
| 335 | BIO_set_callback | 336 | BIO_set_callback |
| 336 | BIO_set_callback_arg | 337 | BIO_set_callback_arg |
| 338 | BIO_set_data | ||
| 337 | BIO_set_cipher | 339 | BIO_set_cipher |
| 338 | BIO_set_ex_data | 340 | BIO_set_ex_data |
| 339 | BIO_set_flags | 341 | BIO_set_flags |
| 342 | BIO_set_init | ||
| 340 | BIO_set_tcp_ndelay | 343 | BIO_set_tcp_ndelay |
| 341 | BIO_snprintf | 344 | BIO_snprintf |
| 342 | BIO_sock_cleanup | 345 | BIO_sock_cleanup |
diff --git a/src/lib/libcrypto/bio/bio.h b/src/lib/libcrypto/bio/bio.h index 3a1577ab37..c60ab389a0 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.31 2018/02/17 13:57:14 tb Exp $ */ | 1 | /* $OpenBSD: bio.h,v 1.32 2018/02/18 12:58:25 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 | * |
| @@ -586,6 +586,9 @@ BIO *BIO_new_fp(FILE *stream, int close_flag); | |||
| 586 | BIO * BIO_new(BIO_METHOD *type); | 586 | BIO * BIO_new(BIO_METHOD *type); |
| 587 | int BIO_set(BIO *a, BIO_METHOD *type); | 587 | int BIO_set(BIO *a, BIO_METHOD *type); |
| 588 | int BIO_free(BIO *a); | 588 | int BIO_free(BIO *a); |
| 589 | void *BIO_get_data(BIO *a); | ||
| 590 | void BIO_set_data(BIO *a, void *ptr); | ||
| 591 | void BIO_set_init(BIO *a, int init); | ||
| 589 | void BIO_vfree(BIO *a); | 592 | void BIO_vfree(BIO *a); |
| 590 | int BIO_read(BIO *b, void *data, int len) | 593 | int BIO_read(BIO *b, void *data, int len) |
| 591 | __attribute__((__bounded__(__buffer__,2,3))); | 594 | __attribute__((__bounded__(__buffer__,2,3))); |
diff --git a/src/lib/libcrypto/bio/bio_lib.c b/src/lib/libcrypto/bio/bio_lib.c index 86ccbdc202..4e5405d6af 100644 --- a/src/lib/libcrypto/bio/bio_lib.c +++ b/src/lib/libcrypto/bio/bio_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bio_lib.c,v 1.23 2017/01/29 17:49:22 beck Exp $ */ | 1 | /* $OpenBSD: bio_lib.c,v 1.24 2018/02/18 12:58:25 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 | * |
| @@ -137,6 +137,24 @@ BIO_vfree(BIO *a) | |||
| 137 | BIO_free(a); | 137 | BIO_free(a); |
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | void * | ||
| 141 | BIO_get_data(BIO *a) | ||
| 142 | { | ||
| 143 | return (a->ptr); | ||
| 144 | } | ||
| 145 | |||
| 146 | void | ||
| 147 | BIO_set_data(BIO *a, void *ptr) | ||
| 148 | { | ||
| 149 | a->ptr = ptr; | ||
| 150 | } | ||
| 151 | |||
| 152 | void | ||
| 153 | BIO_set_init(BIO *a, int init) | ||
| 154 | { | ||
| 155 | a->init = init; | ||
| 156 | } | ||
| 157 | |||
| 140 | void | 158 | void |
| 141 | BIO_clear_flags(BIO *b, int flags) | 159 | BIO_clear_flags(BIO *b, int flags) |
| 142 | { | 160 | { |
