From f02021dd12acf95cb71ba0ab28bb0ac363bc53ca Mon Sep 17 00:00:00 2001 From: tb Date: Sun, 18 Feb 2018 12:59:06 +0000 Subject: [PATCH] Provide BIO_meth_set_gets(). ok jsing --- lib/libcrypto/Symbols.list | 1 + lib/libcrypto/bio/bio.h | 3 ++- lib/libcrypto/bio/bio_meth.c | 9 ++++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list index f8125ad9f7b..77cf4399e78 100644 --- a/lib/libcrypto/Symbols.list +++ b/lib/libcrypto/Symbols.list @@ -292,6 +292,7 @@ BIO_meth_new BIO_meth_set_create BIO_meth_set_ctrl BIO_meth_set_destroy +BIO_meth_set_gets BIO_meth_set_puts BIO_meth_set_read BIO_meth_set_write diff --git a/lib/libcrypto/bio/bio.h b/lib/libcrypto/bio/bio.h index c60ab389a04..8efeba20053 100644 --- a/lib/libcrypto/bio/bio.h +++ b/lib/libcrypto/bio/bio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bio.h,v 1.32 2018/02/18 12:58:25 tb Exp $ */ +/* $OpenBSD: bio.h,v 1.33 2018/02/18 12:59:06 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -334,6 +334,7 @@ int BIO_meth_set_write(BIO_METHOD *biom, int (*write)(BIO *, const char *, int)); int BIO_meth_set_read(BIO_METHOD *biom, int (*read)(BIO *, char *, int)); int BIO_meth_set_puts(BIO_METHOD *biom, int (*puts)(BIO *, const char *)); +int BIO_meth_set_gets(BIO_METHOD *biom, int (*gets)(BIO *, char *, int)); int BIO_meth_set_ctrl(BIO_METHOD *biom, int long (*ctrl)(BIO *, int, long, void *)); int BIO_meth_set_create(BIO_METHOD *biom, int (*create)(BIO *)); diff --git a/lib/libcrypto/bio/bio_meth.c b/lib/libcrypto/bio/bio_meth.c index 83e5254304b..65437a8e603 100644 --- a/lib/libcrypto/bio/bio_meth.c +++ b/lib/libcrypto/bio/bio_meth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bio_meth.c,v 1.1 2018/02/17 13:57:14 tb Exp $ */ +/* $OpenBSD: bio_meth.c,v 1.2 2018/02/18 12:59:06 tb Exp $ */ /* * Copyright (c) 2018 Theo Buehler * @@ -60,6 +60,13 @@ BIO_meth_set_puts(BIO_METHOD *biom, int (*puts)(BIO *, const char *)) return 1; } +int +BIO_meth_set_gets(BIO_METHOD *biom, int (*gets)(BIO *, char *, int)) +{ + biom->bgets = gets; + return 1; +} + int BIO_meth_set_ctrl(BIO_METHOD *biom, long (*ctrl)(BIO *, int, long, void *)) { -- 2.20.1