summaryrefslogtreecommitdiff
path: root/lib/libcrypto
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2018-08-24 19:51:32 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2018-08-24 19:51:32 +0000
commitc71cdf4b87ffe4b8c548b137ac4b316b3c6d7e84 (patch)
tree7df8d2759e3ae9b161f48ea834d813256227f8f9 /lib/libcrypto
parent74036f54a982061b45ba2405542f2d12f361fc2d (diff)
Change PEM_Sign{Init,Update}() to return an int.
tested in a bulk by sthen ok jsing
Diffstat (limited to 'lib/libcrypto')
-rw-r--r--lib/libcrypto/pem/pem.h6
-rw-r--r--lib/libcrypto/pem/pem_sign.c10
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 <openssl/pem.h>
#include <openssl/x509.h>
-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