summaryrefslogtreecommitdiff
path: root/lib/libcrypto/evp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcrypto/evp')
-rw-r--r--lib/libcrypto/evp/bio_b64.c6
-rw-r--r--lib/libcrypto/evp/encode.c35
-rw-r--r--lib/libcrypto/evp/evp.h6
-rw-r--r--lib/libcrypto/evp/p_sign.c17
4 files changed, 4 insertions, 60 deletions
diff --git a/lib/libcrypto/evp/bio_b64.c b/lib/libcrypto/evp/bio_b64.c
index 53b8bcf6159..b54e8793ec3 100644
--- a/lib/libcrypto/evp/bio_b64.c
+++ b/lib/libcrypto/evp/bio_b64.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bio_b64.c,v 1.19 2014/07/11 12:04:46 miod Exp $ */
+/* $OpenBSD: bio_b64.c,v 1.20 2015/02/07 13:19:15 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -293,11 +293,7 @@ b64_read(BIO *b, char *out, int outl)
if (BIO_get_flags(b) & BIO_FLAGS_BASE64_NO_NL) {
int z, jj;
-#if 0
- jj = (i >> 2) << 2;
-#else
jj = i & ~3; /* process per 4 */
-#endif
z = EVP_DecodeBlock((unsigned char *)ctx->buf,
(unsigned char *)ctx->tmp, jj);
if (jj > 2) {
diff --git a/lib/libcrypto/evp/encode.c b/lib/libcrypto/evp/encode.c
index 067e62dfe90..725667bfff2 100644
--- a/lib/libcrypto/evp/encode.c
+++ b/lib/libcrypto/evp/encode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: encode.c,v 1.19 2014/08/06 16:01:44 jsing Exp $ */
+/* $OpenBSD: encode.c,v 1.20 2015/02/07 13:19:15 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -415,36 +415,3 @@ EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl)
} else
return (1);
}
-
-#ifdef undef
-int
-EVP_DecodeValid(unsigned char *buf, int len)
-{
- int i, num = 0, bad = 0;
-
- if (len == 0)
- return (-1);
- while (conv_ascii2bin(*buf) == B64_WS) {
- buf++;
- len--;
- if (len == 0)
- return (-1);
- }
-
- for (i = len; i >= 4; i -= 4) {
- if ((conv_ascii2bin(buf[0]) >= 0x40) ||
- (conv_ascii2bin(buf[1]) >= 0x40) ||
- (conv_ascii2bin(buf[2]) >= 0x40) ||
- (conv_ascii2bin(buf[3]) >= 0x40))
- return (-1);
- buf += 4;
- num += 1 + (buf[2] != '=') + (buf[3] != '=');
- }
- if ((i == 1) && (conv_ascii2bin(buf[0]) == B64_EOLN))
- return (num);
- if ((i == 2) && (conv_ascii2bin(buf[0]) == B64_EOLN) &&
- (conv_ascii2bin(buf[0]) == B64_EOLN))
- return (num);
- return (1);
-}
-#endif
diff --git a/lib/libcrypto/evp/evp.h b/lib/libcrypto/evp/evp.h
index 6c1bf6c7cd1..107119883a0 100644
--- a/lib/libcrypto/evp/evp.h
+++ b/lib/libcrypto/evp/evp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: evp.h,v 1.40 2014/11/09 19:17:13 miod Exp $ */
+/* $OpenBSD: evp.h,v 1.41 2015/02/07 13:19:15 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -701,10 +701,6 @@ const EVP_CIPHER *EVP_des_cfb1(void);
const EVP_CIPHER *EVP_des_cfb8(void);
const EVP_CIPHER *EVP_des_ede_cfb64(void);
# define EVP_des_ede_cfb EVP_des_ede_cfb64
-#if 0
-const EVP_CIPHER *EVP_des_ede_cfb1(void);
-const EVP_CIPHER *EVP_des_ede_cfb8(void);
-#endif
const EVP_CIPHER *EVP_des_ede3_cfb64(void);
# define EVP_des_ede3_cfb EVP_des_ede3_cfb64
const EVP_CIPHER *EVP_des_ede3_cfb1(void);
diff --git a/lib/libcrypto/evp/p_sign.c b/lib/libcrypto/evp/p_sign.c
index f68a950c9c4..4058d47f072 100644
--- a/lib/libcrypto/evp/p_sign.c
+++ b/lib/libcrypto/evp/p_sign.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: p_sign.c,v 1.12 2014/07/11 08:44:48 jsing Exp $ */
+/* $OpenBSD: p_sign.c,v 1.13 2015/02/07 13:19:15 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -63,21 +63,6 @@
#include <openssl/objects.h>
#include <openssl/x509.h>
-#ifdef undef
-void
-EVP_SignInit(EVP_MD_CTX *ctx, EVP_MD *type)
-{
- EVP_DigestInit_ex(ctx, type);
-}
-
-void
-EVP_SignUpdate(EVP_MD_CTX *ctx, unsigned char *data,
- unsigned int count)
-{
- EVP_DigestUpdate(ctx, data, count);
-}
-#endif
-
int
EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen,
EVP_PKEY *pkey)