summaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2019-07-31 15:24:20 -0400
committerRichard Levitte <levitte@openssl.org>2019-08-02 11:41:54 +0200
commitff988500c2f39ae61b2836167b6e0e7b2021220c (patch)
treeead6acf74e2cf8c8be430e02f78dddcf8281b0cc /engines
parent823ee00a396f91df4517af13dafae679ae10b3f4 (diff)
downloadopenssl-new-ff988500c2f39ae61b2836167b6e0e7b2021220c.tar.gz
Replace FUNCerr with ERR_raise_data
Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9496)
Diffstat (limited to 'engines')
-rw-r--r--engines/e_devcrypto.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/e_devcrypto.c b/engines/e_devcrypto.c
index aa5c1a6cbf..489109a80d 100644
--- a/engines/e_devcrypto.c
+++ b/engines/e_devcrypto.c
@@ -72,7 +72,7 @@ void engine_load_devcrypto_int(void);
static int clean_devcrypto_session(struct session_op *sess) {
if (ioctl(cfd, CIOCFSESSION, &sess->ses) < 0) {
- FUNCerr("ioctl", errno);
+ ERR_raise_data(ERR_LIB_SYS, errno, "calling ioctl()");
return 0;
}
memset(sess, 0, sizeof(struct session_op));
@@ -208,7 +208,7 @@ static int cipher_init(EVP_CIPHER_CTX *ctx, const unsigned char *key,
cipher_ctx->mode = cipher_d->flags & EVP_CIPH_MODE;
cipher_ctx->blocksize = cipher_d->blocksize;
if (ioctl(cfd, CIOCGSESSION, &cipher_ctx->sess) < 0) {
- FUNCerr("ioctl", errno);
+ ERR_raise_data(ERR_LIB_SYS, errno, "calling ioctl()");
return 0;
}
@@ -260,7 +260,7 @@ static int cipher_do_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
#endif
if (ioctl(cfd, CIOCCRYPT, &cryp) < 0) {
- FUNCerr("ioctl", errno);
+ ERR_raise_data(ERR_LIB_SYS, errno, "calling ioctl()");
return 0;
}
@@ -704,7 +704,7 @@ static int digest_init(EVP_MD_CTX *ctx)
memset(&digest_ctx->sess, 0, sizeof(digest_ctx->sess));
digest_ctx->sess.mac = digest_d->devcryptoid;
if (ioctl(cfd, CIOCGSESSION, &digest_ctx->sess) < 0) {
- FUNCerr("ioctl", errno);
+ ERR_raise_data(ERR_LIB_SYS, errno, "calling ioctl()");
return 0;
}
return 1;
@@ -743,7 +743,7 @@ static int digest_update(EVP_MD_CTX *ctx, const void *data, size_t count)
return 1;
}
- FUNCerr("ioctl", errno);
+ ERR_raise_data(ERR_LIB_SYS, errno, "calling ioctl()");
return 0;
}
@@ -758,7 +758,7 @@ static int digest_final(EVP_MD_CTX *ctx, unsigned char *md)
if (EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_ONESHOT)) {
memcpy(md, digest_ctx->digest_res, EVP_MD_CTX_size(ctx));
} else if (digest_op(digest_ctx, NULL, 0, md, COP_FLAG_FINAL) < 0) {
- FUNCerr("ioctl", errno);
+ ERR_raise_data(ERR_LIB_SYS, errno, "calling ioctl()");
return 0;
}
@@ -777,14 +777,14 @@ static int digest_copy(EVP_MD_CTX *to, const EVP_MD_CTX *from)
return 1;
if (!digest_init(to)) {
- FUNCerr("ioctl", errno);
+ ERR_raise_data(ERR_LIB_SYS, errno, "calling ioctl()");
return 0;
}
cphash.src_ses = digest_from->sess.ses;
cphash.dst_ses = digest_to->sess.ses;
if (ioctl(cfd, CIOCCPHASH, &cphash) < 0) {
- FUNCerr("ioctl", errno);
+ ERR_raise_data(ERR_LIB_SYS, errno, "calling ioctl()");
return 0;
}
return 1;