From 40ff503a4db30956cca34dc3bdf38f21654f9c10 Mon Sep 17 00:00:00 2001 From: tb Date: Fri, 24 Aug 2018 19:51:31 +0000 Subject: [PATCH] Change PEM_Sign{Init,Update}() to return an int. tested in a bulk by sthen ok jsing --- lib/libcrypto/pem/pem.h | 6 +++--- lib/libcrypto/pem/pem_sign.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/libcrypto/pem/pem.h b/lib/libcrypto/pem/pem.h index d4fb25d47ab..adc85226e87 100644 --- a/lib/libcrypto/pem/pem.h +++ b/lib/libcrypto/pem/pem.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pem.h,v 1.18 2018/05/13 10:47:54 tb Exp $ */ +/* $OpenBSD: pem.h,v 1.19 2018/08/24 19:51:31 tb Exp $ */ /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -421,8 +421,8 @@ void PEM_SealUpdate(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *out, int *outl, int PEM_SealFinal(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *sig, int *sigl, unsigned char *out, int *outl, EVP_PKEY *priv); -void PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type); -void PEM_SignUpdate(EVP_MD_CTX *ctx, unsigned char *d, unsigned int cnt); +int PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type); +int PEM_SignUpdate(EVP_MD_CTX *ctx, unsigned char *d, unsigned int cnt); int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, EVP_PKEY *pkey); diff --git a/lib/libcrypto/pem/pem_sign.c b/lib/libcrypto/pem/pem_sign.c index a225e8970f9..fddeec79f3e 100644 --- a/lib/libcrypto/pem/pem_sign.c +++ b/lib/libcrypto/pem/pem_sign.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pem_sign.c,v 1.13 2017/01/29 17:49:23 beck Exp $ */ +/* $OpenBSD: pem_sign.c,v 1.14 2018/08/24 19:51:31 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -64,17 +64,17 @@ #include #include -void +int PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type) { - EVP_DigestInit_ex(ctx, type, NULL); + return EVP_DigestInit_ex(ctx, type, NULL); } -void +int PEM_SignUpdate(EVP_MD_CTX *ctx, unsigned char *data, unsigned int count) { - EVP_DigestUpdate(ctx, data, count); + return EVP_DigestUpdate(ctx, data, count); } int -- 2.20.1