-/* $OpenBSD: dh_ameth.c,v 1.26 2022/12/26 07:18:51 jmc Exp $ */
+/* $OpenBSD: dh_ameth.c,v 1.27 2023/04/17 05:51:16 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
return do_dh_print(bp, x, 4, NULL, 0);
}
+int
+DHparams_print_fp(FILE *fp, const DH *x)
+{
+ BIO *b;
+ int ret;
+
+ if ((b = BIO_new(BIO_s_file())) == NULL) {
+ DHerror(ERR_R_BUF_LIB);
+ return 0;
+ }
+ BIO_set_fp(b,fp,BIO_NOCLOSE);
+ ret = DHparams_print(b, x);
+ BIO_free(b);
+ return ret;
+}
+
static int
dh_pkey_public_check(const EVP_PKEY *pkey)
{
-/* $OpenBSD: dh_prn.c,v 1.6 2017/01/29 17:49:22 beck Exp $ */
+/* $OpenBSD: dh_prn.c,v 1.7 2023/04/17 05:51:16 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
#include <openssl/err.h>
#include <openssl/evp.h>
-int
-DHparams_print_fp(FILE *fp, const DH *x)
-{
- BIO *b;
- int ret;
-
- if ((b = BIO_new(BIO_s_file())) == NULL) {
- DHerror(ERR_R_BUF_LIB);
- return 0;
- }
- BIO_set_fp(b,fp,BIO_NOCLOSE);
- ret = DHparams_print(b, x);
- BIO_free(b);
- return ret;
-}