From d1a01a2c3d1eceb61c7402f7b9b3f4685059a3a4 Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Wed, 19 Jun 2002 18:20:40 +0000 Subject: do not syslog from libraries! --- src/lib/libcrypto/engine/hw_cryptodev.c | 11 +---------- src/lib/libssl/src/crypto/engine/hw_cryptodev.c | 11 +---------- 2 files changed, 2 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/engine/hw_cryptodev.c b/src/lib/libcrypto/engine/hw_cryptodev.c index 98d690abd0..b8aa3cd62c 100644 --- a/src/lib/libcrypto/engine/hw_cryptodev.c +++ b/src/lib/libcrypto/engine/hw_cryptodev.c @@ -37,8 +37,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -361,7 +361,6 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, struct session_op *sess = &state->d_sess; void *iiv; unsigned char save_iv[EVP_MAX_IV_LENGTH]; - struct syslog_data sd = SYSLOG_DATA_INIT; if (state->d_fd < 0) return (0); @@ -394,7 +393,6 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, /* XXX need better errror handling * this can fail for a number of different reasons. */ - syslog_r(LOG_ERR, &sd, "CIOCCRYPT failed (%m)"); return (0); } @@ -414,7 +412,6 @@ cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, { struct dev_crypto_state *state = ctx->cipher_data; struct session_op *sess = &state->d_sess; - struct syslog_data sd = SYSLOG_DATA_INIT; int cipher; if ((cipher = cipher_nid_to_cryptodev(ctx->cipher->nid)) == NID_undef) @@ -436,8 +433,6 @@ cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, sess->cipher = cipher; if (ioctl(state->d_fd, CIOCGSESSION, sess) == -1) { - syslog_r(LOG_ERR, &sd, "CIOCGSESSION failed (%m)"); - close(state->d_fd); state->d_fd = -1; return (0); @@ -455,7 +450,6 @@ cryptodev_cleanup(EVP_CIPHER_CTX *ctx) int ret = 0; struct dev_crypto_state *state = ctx->cipher_data; struct session_op *sess = &state->d_sess; - struct syslog_data sd = SYSLOG_DATA_INIT; if (state->d_fd < 0) return (0); @@ -472,7 +466,6 @@ cryptodev_cleanup(EVP_CIPHER_CTX *ctx) */ if (ioctl(state->d_fd, CIOCFSESSION, &sess->ses) == -1) { - syslog_r(LOG_ERR, &sd, "CIOCFSESSION failed (%m)"); ret = 0; } else { ret = 1; @@ -1052,7 +1045,6 @@ void ENGINE_load_cryptodev(void) { ENGINE *engine = ENGINE_new(); - struct syslog_data sd = SYSLOG_DATA_INIT; int fd; if (engine == NULL) @@ -1064,7 +1056,6 @@ ENGINE_load_cryptodev(void) * find out what asymmetric crypto algorithms we support */ if (ioctl(fd, CIOCASYMFEAT, &cryptodev_asymfeat) == -1) { - syslog_r(LOG_ERR, &sd, "CIOCASYMFEAT failed (%m)"); close(fd); return; } diff --git a/src/lib/libssl/src/crypto/engine/hw_cryptodev.c b/src/lib/libssl/src/crypto/engine/hw_cryptodev.c index 98d690abd0..b8aa3cd62c 100644 --- a/src/lib/libssl/src/crypto/engine/hw_cryptodev.c +++ b/src/lib/libssl/src/crypto/engine/hw_cryptodev.c @@ -37,8 +37,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -361,7 +361,6 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, struct session_op *sess = &state->d_sess; void *iiv; unsigned char save_iv[EVP_MAX_IV_LENGTH]; - struct syslog_data sd = SYSLOG_DATA_INIT; if (state->d_fd < 0) return (0); @@ -394,7 +393,6 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, /* XXX need better errror handling * this can fail for a number of different reasons. */ - syslog_r(LOG_ERR, &sd, "CIOCCRYPT failed (%m)"); return (0); } @@ -414,7 +412,6 @@ cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, { struct dev_crypto_state *state = ctx->cipher_data; struct session_op *sess = &state->d_sess; - struct syslog_data sd = SYSLOG_DATA_INIT; int cipher; if ((cipher = cipher_nid_to_cryptodev(ctx->cipher->nid)) == NID_undef) @@ -436,8 +433,6 @@ cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, sess->cipher = cipher; if (ioctl(state->d_fd, CIOCGSESSION, sess) == -1) { - syslog_r(LOG_ERR, &sd, "CIOCGSESSION failed (%m)"); - close(state->d_fd); state->d_fd = -1; return (0); @@ -455,7 +450,6 @@ cryptodev_cleanup(EVP_CIPHER_CTX *ctx) int ret = 0; struct dev_crypto_state *state = ctx->cipher_data; struct session_op *sess = &state->d_sess; - struct syslog_data sd = SYSLOG_DATA_INIT; if (state->d_fd < 0) return (0); @@ -472,7 +466,6 @@ cryptodev_cleanup(EVP_CIPHER_CTX *ctx) */ if (ioctl(state->d_fd, CIOCFSESSION, &sess->ses) == -1) { - syslog_r(LOG_ERR, &sd, "CIOCFSESSION failed (%m)"); ret = 0; } else { ret = 1; @@ -1052,7 +1045,6 @@ void ENGINE_load_cryptodev(void) { ENGINE *engine = ENGINE_new(); - struct syslog_data sd = SYSLOG_DATA_INIT; int fd; if (engine == NULL) @@ -1064,7 +1056,6 @@ ENGINE_load_cryptodev(void) * find out what asymmetric crypto algorithms we support */ if (ioctl(fd, CIOCASYMFEAT, &cryptodev_asymfeat) == -1) { - syslog_r(LOG_ERR, &sd, "CIOCASYMFEAT failed (%m)"); close(fd); return; } -- cgit v1.2.3-55-g6feb