diff options
Diffstat (limited to 'src/lib/libcrypto/evp')
| -rw-r--r-- | src/lib/libcrypto/evp/bio_b64.c | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/encode.c | 35 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/evp.h | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/p_sign.c | 17 |
4 files changed, 4 insertions, 60 deletions
diff --git a/src/lib/libcrypto/evp/bio_b64.c b/src/lib/libcrypto/evp/bio_b64.c index 53b8bcf615..b54e8793ec 100644 --- a/src/lib/libcrypto/evp/bio_b64.c +++ b/src/lib/libcrypto/evp/bio_b64.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bio_b64.c,v 1.19 2014/07/11 12:04:46 miod Exp $ */ | 1 | /* $OpenBSD: bio_b64.c,v 1.20 2015/02/07 13:19:15 doug Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -293,11 +293,7 @@ b64_read(BIO *b, char *out, int outl) | |||
| 293 | if (BIO_get_flags(b) & BIO_FLAGS_BASE64_NO_NL) { | 293 | if (BIO_get_flags(b) & BIO_FLAGS_BASE64_NO_NL) { |
| 294 | int z, jj; | 294 | int z, jj; |
| 295 | 295 | ||
| 296 | #if 0 | ||
| 297 | jj = (i >> 2) << 2; | ||
| 298 | #else | ||
| 299 | jj = i & ~3; /* process per 4 */ | 296 | jj = i & ~3; /* process per 4 */ |
| 300 | #endif | ||
| 301 | z = EVP_DecodeBlock((unsigned char *)ctx->buf, | 297 | z = EVP_DecodeBlock((unsigned char *)ctx->buf, |
| 302 | (unsigned char *)ctx->tmp, jj); | 298 | (unsigned char *)ctx->tmp, jj); |
| 303 | if (jj > 2) { | 299 | if (jj > 2) { |
diff --git a/src/lib/libcrypto/evp/encode.c b/src/lib/libcrypto/evp/encode.c index 067e62dfe9..725667bfff 100644 --- a/src/lib/libcrypto/evp/encode.c +++ b/src/lib/libcrypto/evp/encode.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: encode.c,v 1.19 2014/08/06 16:01:44 jsing Exp $ */ | 1 | /* $OpenBSD: encode.c,v 1.20 2015/02/07 13:19:15 doug Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -415,36 +415,3 @@ EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl) | |||
| 415 | } else | 415 | } else |
| 416 | return (1); | 416 | return (1); |
| 417 | } | 417 | } |
| 418 | |||
| 419 | #ifdef undef | ||
| 420 | int | ||
| 421 | EVP_DecodeValid(unsigned char *buf, int len) | ||
| 422 | { | ||
| 423 | int i, num = 0, bad = 0; | ||
| 424 | |||
| 425 | if (len == 0) | ||
| 426 | return (-1); | ||
| 427 | while (conv_ascii2bin(*buf) == B64_WS) { | ||
| 428 | buf++; | ||
| 429 | len--; | ||
| 430 | if (len == 0) | ||
| 431 | return (-1); | ||
| 432 | } | ||
| 433 | |||
| 434 | for (i = len; i >= 4; i -= 4) { | ||
| 435 | if ((conv_ascii2bin(buf[0]) >= 0x40) || | ||
| 436 | (conv_ascii2bin(buf[1]) >= 0x40) || | ||
| 437 | (conv_ascii2bin(buf[2]) >= 0x40) || | ||
| 438 | (conv_ascii2bin(buf[3]) >= 0x40)) | ||
| 439 | return (-1); | ||
| 440 | buf += 4; | ||
| 441 | num += 1 + (buf[2] != '=') + (buf[3] != '='); | ||
| 442 | } | ||
| 443 | if ((i == 1) && (conv_ascii2bin(buf[0]) == B64_EOLN)) | ||
| 444 | return (num); | ||
| 445 | if ((i == 2) && (conv_ascii2bin(buf[0]) == B64_EOLN) && | ||
| 446 | (conv_ascii2bin(buf[0]) == B64_EOLN)) | ||
| 447 | return (num); | ||
| 448 | return (1); | ||
| 449 | } | ||
| 450 | #endif | ||
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h index 6c1bf6c7cd..107119883a 100644 --- a/src/lib/libcrypto/evp/evp.h +++ b/src/lib/libcrypto/evp/evp.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: evp.h,v 1.40 2014/11/09 19:17:13 miod Exp $ */ | 1 | /* $OpenBSD: evp.h,v 1.41 2015/02/07 13:19:15 doug Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -701,10 +701,6 @@ const EVP_CIPHER *EVP_des_cfb1(void); | |||
| 701 | const EVP_CIPHER *EVP_des_cfb8(void); | 701 | const EVP_CIPHER *EVP_des_cfb8(void); |
| 702 | const EVP_CIPHER *EVP_des_ede_cfb64(void); | 702 | const EVP_CIPHER *EVP_des_ede_cfb64(void); |
| 703 | # define EVP_des_ede_cfb EVP_des_ede_cfb64 | 703 | # define EVP_des_ede_cfb EVP_des_ede_cfb64 |
| 704 | #if 0 | ||
| 705 | const EVP_CIPHER *EVP_des_ede_cfb1(void); | ||
| 706 | const EVP_CIPHER *EVP_des_ede_cfb8(void); | ||
| 707 | #endif | ||
| 708 | const EVP_CIPHER *EVP_des_ede3_cfb64(void); | 704 | const EVP_CIPHER *EVP_des_ede3_cfb64(void); |
| 709 | # define EVP_des_ede3_cfb EVP_des_ede3_cfb64 | 705 | # define EVP_des_ede3_cfb EVP_des_ede3_cfb64 |
| 710 | const EVP_CIPHER *EVP_des_ede3_cfb1(void); | 706 | const EVP_CIPHER *EVP_des_ede3_cfb1(void); |
diff --git a/src/lib/libcrypto/evp/p_sign.c b/src/lib/libcrypto/evp/p_sign.c index f68a950c9c..4058d47f07 100644 --- a/src/lib/libcrypto/evp/p_sign.c +++ b/src/lib/libcrypto/evp/p_sign.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: p_sign.c,v 1.12 2014/07/11 08:44:48 jsing Exp $ */ | 1 | /* $OpenBSD: p_sign.c,v 1.13 2015/02/07 13:19:15 doug Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -63,21 +63,6 @@ | |||
| 63 | #include <openssl/objects.h> | 63 | #include <openssl/objects.h> |
| 64 | #include <openssl/x509.h> | 64 | #include <openssl/x509.h> |
| 65 | 65 | ||
| 66 | #ifdef undef | ||
| 67 | void | ||
| 68 | EVP_SignInit(EVP_MD_CTX *ctx, EVP_MD *type) | ||
| 69 | { | ||
| 70 | EVP_DigestInit_ex(ctx, type); | ||
| 71 | } | ||
| 72 | |||
| 73 | void | ||
| 74 | EVP_SignUpdate(EVP_MD_CTX *ctx, unsigned char *data, | ||
| 75 | unsigned int count) | ||
| 76 | { | ||
| 77 | EVP_DigestUpdate(ctx, data, count); | ||
| 78 | } | ||
| 79 | #endif | ||
| 80 | |||
| 81 | int | 66 | int |
| 82 | EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, | 67 | EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, |
| 83 | EVP_PKEY *pkey) | 68 | EVP_PKEY *pkey) |
