diff options
author | tb <> | 2021-10-24 13:46:56 +0000 |
---|---|---|
committer | tb <> | 2021-10-24 13:46:56 +0000 |
commit | 4a45052f637f8486f2bfc31e5cd050e49f7e0064 (patch) | |
tree | 2aa88ada9843aa827734f120177a6285d9c3db50 | |
parent | 8e1b0c908a4c5230da8f867774cf4f8c41b02174 (diff) | |
download | openbsd-4a45052f637f8486f2bfc31e5cd050e49f7e0064.tar.gz openbsd-4a45052f637f8486f2bfc31e5cd050e49f7e0064.tar.bz2 openbsd-4a45052f637f8486f2bfc31e5cd050e49f7e0064.zip |
Prepare to provide BIO_get_init()
ok beck jsing
-rw-r--r-- | src/lib/libcrypto/bio/bio.h | 11 | ||||
-rw-r--r-- | src/lib/libcrypto/bio/bio_lib.c | 8 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/lib/libcrypto/bio/bio.h b/src/lib/libcrypto/bio/bio.h index 82463c6beb..735d16e6b9 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.45 2018/06/02 04:41:12 tb Exp $ */ | 1 | /* $OpenBSD: bio.h,v 1.46 2021/10/24 13:46:56 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 | * |
@@ -605,9 +605,12 @@ BIO *BIO_new(const BIO_METHOD *type); | |||
605 | int BIO_set(BIO *a, const BIO_METHOD *type); | 605 | int BIO_set(BIO *a, const BIO_METHOD *type); |
606 | int BIO_free(BIO *a); | 606 | int BIO_free(BIO *a); |
607 | int BIO_up_ref(BIO *bio); | 607 | int BIO_up_ref(BIO *bio); |
608 | void *BIO_get_data(BIO *a); | 608 | void *BIO_get_data(BIO *a); |
609 | void BIO_set_data(BIO *a, void *ptr); | 609 | void BIO_set_data(BIO *a, void *ptr); |
610 | void BIO_set_init(BIO *a, int init); | 610 | #if defined(LIBRESSL_NEW_API) |
611 | int BIO_get_init(BIO *a); | ||
612 | #endif | ||
613 | void BIO_set_init(BIO *a, int init); | ||
611 | int BIO_get_shutdown(BIO *a); | 614 | int BIO_get_shutdown(BIO *a); |
612 | void BIO_set_shutdown(BIO *a, int shut); | 615 | void BIO_set_shutdown(BIO *a, int shut); |
613 | void BIO_vfree(BIO *a); | 616 | void BIO_vfree(BIO *a); |
diff --git a/src/lib/libcrypto/bio/bio_lib.c b/src/lib/libcrypto/bio/bio_lib.c index 7ef1784e13..05f0258947 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.29 2019/04/14 17:39:03 jsing Exp $ */ | 1 | /* $OpenBSD: bio_lib.c,v 1.30 2021/10/24 13:46:56 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 | * |
@@ -170,6 +170,12 @@ BIO_set_data(BIO *a, void *ptr) | |||
170 | a->ptr = ptr; | 170 | a->ptr = ptr; |
171 | } | 171 | } |
172 | 172 | ||
173 | int | ||
174 | BIO_get_init(BIO *a) | ||
175 | { | ||
176 | return a->init; | ||
177 | } | ||
178 | |||
173 | void | 179 | void |
174 | BIO_set_init(BIO *a, int init) | 180 | BIO_set_init(BIO *a, int init) |
175 | { | 181 | { |