diff options
author | deraadt <> | 2002-06-19 18:20:40 +0000 |
---|---|---|
committer | deraadt <> | 2002-06-19 18:20:40 +0000 |
commit | d1a01a2c3d1eceb61c7402f7b9b3f4685059a3a4 (patch) | |
tree | 9025fb01484ec75d6ec5c498bd6ec30082c1155f /src | |
parent | 3f0857c77df4ed44541226bd4f586edfe44b499b (diff) | |
download | openbsd-d1a01a2c3d1eceb61c7402f7b9b3f4685059a3a4.tar.gz openbsd-d1a01a2c3d1eceb61c7402f7b9b3f4685059a3a4.tar.bz2 openbsd-d1a01a2c3d1eceb61c7402f7b9b3f4685059a3a4.zip |
do not syslog from libraries!
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/engine/hw_cryptodev.c | 11 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/engine/hw_cryptodev.c | 11 |
2 files changed, 2 insertions, 20 deletions
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 @@ | |||
37 | #include <stdio.h> | 37 | #include <stdio.h> |
38 | #include <unistd.h> | 38 | #include <unistd.h> |
39 | #include <fcntl.h> | 39 | #include <fcntl.h> |
40 | #include <syslog.h> | ||
41 | #include <stdarg.h> | 40 | #include <stdarg.h> |
41 | #include <syslog.h> | ||
42 | #include <ssl/objects.h> | 42 | #include <ssl/objects.h> |
43 | #include <ssl/engine.h> | 43 | #include <ssl/engine.h> |
44 | #include <ssl/evp.h> | 44 | #include <ssl/evp.h> |
@@ -361,7 +361,6 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | |||
361 | struct session_op *sess = &state->d_sess; | 361 | struct session_op *sess = &state->d_sess; |
362 | void *iiv; | 362 | void *iiv; |
363 | unsigned char save_iv[EVP_MAX_IV_LENGTH]; | 363 | unsigned char save_iv[EVP_MAX_IV_LENGTH]; |
364 | struct syslog_data sd = SYSLOG_DATA_INIT; | ||
365 | 364 | ||
366 | if (state->d_fd < 0) | 365 | if (state->d_fd < 0) |
367 | return (0); | 366 | return (0); |
@@ -394,7 +393,6 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | |||
394 | /* XXX need better errror handling | 393 | /* XXX need better errror handling |
395 | * this can fail for a number of different reasons. | 394 | * this can fail for a number of different reasons. |
396 | */ | 395 | */ |
397 | syslog_r(LOG_ERR, &sd, "CIOCCRYPT failed (%m)"); | ||
398 | return (0); | 396 | return (0); |
399 | } | 397 | } |
400 | 398 | ||
@@ -414,7 +412,6 @@ cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | |||
414 | { | 412 | { |
415 | struct dev_crypto_state *state = ctx->cipher_data; | 413 | struct dev_crypto_state *state = ctx->cipher_data; |
416 | struct session_op *sess = &state->d_sess; | 414 | struct session_op *sess = &state->d_sess; |
417 | struct syslog_data sd = SYSLOG_DATA_INIT; | ||
418 | int cipher; | 415 | int cipher; |
419 | 416 | ||
420 | if ((cipher = cipher_nid_to_cryptodev(ctx->cipher->nid)) == NID_undef) | 417 | 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, | |||
436 | sess->cipher = cipher; | 433 | sess->cipher = cipher; |
437 | 434 | ||
438 | if (ioctl(state->d_fd, CIOCGSESSION, sess) == -1) { | 435 | if (ioctl(state->d_fd, CIOCGSESSION, sess) == -1) { |
439 | syslog_r(LOG_ERR, &sd, "CIOCGSESSION failed (%m)"); | ||
440 | |||
441 | close(state->d_fd); | 436 | close(state->d_fd); |
442 | state->d_fd = -1; | 437 | state->d_fd = -1; |
443 | return (0); | 438 | return (0); |
@@ -455,7 +450,6 @@ cryptodev_cleanup(EVP_CIPHER_CTX *ctx) | |||
455 | int ret = 0; | 450 | int ret = 0; |
456 | struct dev_crypto_state *state = ctx->cipher_data; | 451 | struct dev_crypto_state *state = ctx->cipher_data; |
457 | struct session_op *sess = &state->d_sess; | 452 | struct session_op *sess = &state->d_sess; |
458 | struct syslog_data sd = SYSLOG_DATA_INIT; | ||
459 | 453 | ||
460 | if (state->d_fd < 0) | 454 | if (state->d_fd < 0) |
461 | return (0); | 455 | return (0); |
@@ -472,7 +466,6 @@ cryptodev_cleanup(EVP_CIPHER_CTX *ctx) | |||
472 | */ | 466 | */ |
473 | 467 | ||
474 | if (ioctl(state->d_fd, CIOCFSESSION, &sess->ses) == -1) { | 468 | if (ioctl(state->d_fd, CIOCFSESSION, &sess->ses) == -1) { |
475 | syslog_r(LOG_ERR, &sd, "CIOCFSESSION failed (%m)"); | ||
476 | ret = 0; | 469 | ret = 0; |
477 | } else { | 470 | } else { |
478 | ret = 1; | 471 | ret = 1; |
@@ -1052,7 +1045,6 @@ void | |||
1052 | ENGINE_load_cryptodev(void) | 1045 | ENGINE_load_cryptodev(void) |
1053 | { | 1046 | { |
1054 | ENGINE *engine = ENGINE_new(); | 1047 | ENGINE *engine = ENGINE_new(); |
1055 | struct syslog_data sd = SYSLOG_DATA_INIT; | ||
1056 | int fd; | 1048 | int fd; |
1057 | 1049 | ||
1058 | if (engine == NULL) | 1050 | if (engine == NULL) |
@@ -1064,7 +1056,6 @@ ENGINE_load_cryptodev(void) | |||
1064 | * find out what asymmetric crypto algorithms we support | 1056 | * find out what asymmetric crypto algorithms we support |
1065 | */ | 1057 | */ |
1066 | if (ioctl(fd, CIOCASYMFEAT, &cryptodev_asymfeat) == -1) { | 1058 | if (ioctl(fd, CIOCASYMFEAT, &cryptodev_asymfeat) == -1) { |
1067 | syslog_r(LOG_ERR, &sd, "CIOCASYMFEAT failed (%m)"); | ||
1068 | close(fd); | 1059 | close(fd); |
1069 | return; | 1060 | return; |
1070 | } | 1061 | } |
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 @@ | |||
37 | #include <stdio.h> | 37 | #include <stdio.h> |
38 | #include <unistd.h> | 38 | #include <unistd.h> |
39 | #include <fcntl.h> | 39 | #include <fcntl.h> |
40 | #include <syslog.h> | ||
41 | #include <stdarg.h> | 40 | #include <stdarg.h> |
41 | #include <syslog.h> | ||
42 | #include <ssl/objects.h> | 42 | #include <ssl/objects.h> |
43 | #include <ssl/engine.h> | 43 | #include <ssl/engine.h> |
44 | #include <ssl/evp.h> | 44 | #include <ssl/evp.h> |
@@ -361,7 +361,6 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | |||
361 | struct session_op *sess = &state->d_sess; | 361 | struct session_op *sess = &state->d_sess; |
362 | void *iiv; | 362 | void *iiv; |
363 | unsigned char save_iv[EVP_MAX_IV_LENGTH]; | 363 | unsigned char save_iv[EVP_MAX_IV_LENGTH]; |
364 | struct syslog_data sd = SYSLOG_DATA_INIT; | ||
365 | 364 | ||
366 | if (state->d_fd < 0) | 365 | if (state->d_fd < 0) |
367 | return (0); | 366 | return (0); |
@@ -394,7 +393,6 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | |||
394 | /* XXX need better errror handling | 393 | /* XXX need better errror handling |
395 | * this can fail for a number of different reasons. | 394 | * this can fail for a number of different reasons. |
396 | */ | 395 | */ |
397 | syslog_r(LOG_ERR, &sd, "CIOCCRYPT failed (%m)"); | ||
398 | return (0); | 396 | return (0); |
399 | } | 397 | } |
400 | 398 | ||
@@ -414,7 +412,6 @@ cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | |||
414 | { | 412 | { |
415 | struct dev_crypto_state *state = ctx->cipher_data; | 413 | struct dev_crypto_state *state = ctx->cipher_data; |
416 | struct session_op *sess = &state->d_sess; | 414 | struct session_op *sess = &state->d_sess; |
417 | struct syslog_data sd = SYSLOG_DATA_INIT; | ||
418 | int cipher; | 415 | int cipher; |
419 | 416 | ||
420 | if ((cipher = cipher_nid_to_cryptodev(ctx->cipher->nid)) == NID_undef) | 417 | 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, | |||
436 | sess->cipher = cipher; | 433 | sess->cipher = cipher; |
437 | 434 | ||
438 | if (ioctl(state->d_fd, CIOCGSESSION, sess) == -1) { | 435 | if (ioctl(state->d_fd, CIOCGSESSION, sess) == -1) { |
439 | syslog_r(LOG_ERR, &sd, "CIOCGSESSION failed (%m)"); | ||
440 | |||
441 | close(state->d_fd); | 436 | close(state->d_fd); |
442 | state->d_fd = -1; | 437 | state->d_fd = -1; |
443 | return (0); | 438 | return (0); |
@@ -455,7 +450,6 @@ cryptodev_cleanup(EVP_CIPHER_CTX *ctx) | |||
455 | int ret = 0; | 450 | int ret = 0; |
456 | struct dev_crypto_state *state = ctx->cipher_data; | 451 | struct dev_crypto_state *state = ctx->cipher_data; |
457 | struct session_op *sess = &state->d_sess; | 452 | struct session_op *sess = &state->d_sess; |
458 | struct syslog_data sd = SYSLOG_DATA_INIT; | ||
459 | 453 | ||
460 | if (state->d_fd < 0) | 454 | if (state->d_fd < 0) |
461 | return (0); | 455 | return (0); |
@@ -472,7 +466,6 @@ cryptodev_cleanup(EVP_CIPHER_CTX *ctx) | |||
472 | */ | 466 | */ |
473 | 467 | ||
474 | if (ioctl(state->d_fd, CIOCFSESSION, &sess->ses) == -1) { | 468 | if (ioctl(state->d_fd, CIOCFSESSION, &sess->ses) == -1) { |
475 | syslog_r(LOG_ERR, &sd, "CIOCFSESSION failed (%m)"); | ||
476 | ret = 0; | 469 | ret = 0; |
477 | } else { | 470 | } else { |
478 | ret = 1; | 471 | ret = 1; |
@@ -1052,7 +1045,6 @@ void | |||
1052 | ENGINE_load_cryptodev(void) | 1045 | ENGINE_load_cryptodev(void) |
1053 | { | 1046 | { |
1054 | ENGINE *engine = ENGINE_new(); | 1047 | ENGINE *engine = ENGINE_new(); |
1055 | struct syslog_data sd = SYSLOG_DATA_INIT; | ||
1056 | int fd; | 1048 | int fd; |
1057 | 1049 | ||
1058 | if (engine == NULL) | 1050 | if (engine == NULL) |
@@ -1064,7 +1056,6 @@ ENGINE_load_cryptodev(void) | |||
1064 | * find out what asymmetric crypto algorithms we support | 1056 | * find out what asymmetric crypto algorithms we support |
1065 | */ | 1057 | */ |
1066 | if (ioctl(fd, CIOCASYMFEAT, &cryptodev_asymfeat) == -1) { | 1058 | if (ioctl(fd, CIOCASYMFEAT, &cryptodev_asymfeat) == -1) { |
1067 | syslog_r(LOG_ERR, &sd, "CIOCASYMFEAT failed (%m)"); | ||
1068 | close(fd); | 1059 | close(fd); |
1069 | return; | 1060 | return; |
1070 | } | 1061 | } |