diff options
Diffstat (limited to 'src/lib/libcrypto/asn1')
| -rw-r--r-- | src/lib/libcrypto/asn1/a_gentm.c | 39 | ||||
| -rw-r--r-- | src/lib/libcrypto/asn1/a_strex.c | 16 | ||||
| -rw-r--r-- | src/lib/libcrypto/asn1/a_time.c | 14 | ||||
| -rw-r--r-- | src/lib/libcrypto/asn1/asn1_lib.c | 8 | ||||
| -rw-r--r-- | src/lib/libcrypto/asn1/asn1_par.c | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/asn1/t_x509.c | 10 | ||||
| -rw-r--r-- | src/lib/libcrypto/asn1/tasn_prn.c | 12 |
7 files changed, 7 insertions, 98 deletions
diff --git a/src/lib/libcrypto/asn1/a_gentm.c b/src/lib/libcrypto/asn1/a_gentm.c index c658b1ea35..bc3453f410 100644 --- a/src/lib/libcrypto/asn1/a_gentm.c +++ b/src/lib/libcrypto/asn1/a_gentm.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: a_gentm.c,v 1.22 2014/07/11 08:44:47 jsing Exp $ */ | 1 | /* $OpenBSD: a_gentm.c,v 1.23 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 | * |
| @@ -67,43 +67,6 @@ | |||
| 67 | 67 | ||
| 68 | #include "o_time.h" | 68 | #include "o_time.h" |
| 69 | 69 | ||
| 70 | #if 0 | ||
| 71 | |||
| 72 | int | ||
| 73 | i2d_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME *a, unsigned char **pp) | ||
| 74 | { | ||
| 75 | return(i2d_ASN1_bytes((ASN1_STRING *)a, pp, | ||
| 76 | V_ASN1_GENERALIZEDTIME, V_ASN1_UNIVERSAL)); | ||
| 77 | } | ||
| 78 | |||
| 79 | |||
| 80 | ASN1_GENERALIZEDTIME * | ||
| 81 | d2i_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME **a, unsigned char **pp, | ||
| 82 | long length) | ||
| 83 | { | ||
| 84 | ASN1_GENERALIZEDTIME *ret = NULL; | ||
| 85 | |||
| 86 | ret = (ASN1_GENERALIZEDTIME *)d2i_ASN1_bytes((ASN1_STRING **)a, pp, length, | ||
| 87 | V_ASN1_GENERALIZEDTIME, V_ASN1_UNIVERSAL); | ||
| 88 | if (ret == NULL) { | ||
| 89 | ASN1err(ASN1_F_D2I_ASN1_GENERALIZEDTIME, ERR_R_NESTED_ASN1_ERROR); | ||
| 90 | return (NULL); | ||
| 91 | } | ||
| 92 | if (!ASN1_GENERALIZEDTIME_check(ret)) { | ||
| 93 | ASN1err(ASN1_F_D2I_ASN1_GENERALIZEDTIME, ASN1_R_INVALID_TIME_FORMAT); | ||
| 94 | goto err; | ||
| 95 | } | ||
| 96 | |||
| 97 | return (ret); | ||
| 98 | |||
| 99 | err: | ||
| 100 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) | ||
| 101 | M_ASN1_GENERALIZEDTIME_free(ret); | ||
| 102 | return (NULL); | ||
| 103 | } | ||
| 104 | |||
| 105 | #endif | ||
| 106 | |||
| 107 | int | 70 | int |
| 108 | ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *d) | 71 | ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *d) |
| 109 | { | 72 | { |
diff --git a/src/lib/libcrypto/asn1/a_strex.c b/src/lib/libcrypto/asn1/a_strex.c index b592c0e18a..f60a70d94d 100644 --- a/src/lib/libcrypto/asn1/a_strex.c +++ b/src/lib/libcrypto/asn1/a_strex.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: a_strex.c,v 1.24 2014/07/11 08:44:47 jsing Exp $ */ | 1 | /* $OpenBSD: a_strex.c,v 1.25 2015/02/07 13:19:15 doug Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2000. | 3 | * project 2000. |
| 4 | */ | 4 | */ |
| @@ -84,20 +84,6 @@ | |||
| 84 | /* Three IO functions for sending data to memory, a BIO and | 84 | /* Three IO functions for sending data to memory, a BIO and |
| 85 | * and a FILE pointer. | 85 | * and a FILE pointer. |
| 86 | */ | 86 | */ |
| 87 | #if 0 /* never used */ | ||
| 88 | static int | ||
| 89 | send_mem_chars(void *arg, const void *buf, int len) | ||
| 90 | { | ||
| 91 | unsigned char **out = arg; | ||
| 92 | |||
| 93 | if (!out) | ||
| 94 | return 1; | ||
| 95 | memcpy(*out, buf, len); | ||
| 96 | *out += len; | ||
| 97 | return 1; | ||
| 98 | } | ||
| 99 | #endif | ||
| 100 | |||
| 101 | static int | 87 | static int |
| 102 | send_bio_chars(void *arg, const void *buf, int len) | 88 | send_bio_chars(void *arg, const void *buf, int len) |
| 103 | { | 89 | { |
diff --git a/src/lib/libcrypto/asn1/a_time.c b/src/lib/libcrypto/asn1/a_time.c index 94e249960a..c5e882a4f6 100644 --- a/src/lib/libcrypto/asn1/a_time.c +++ b/src/lib/libcrypto/asn1/a_time.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: a_time.c,v 1.21 2014/07/11 08:44:47 jsing Exp $ */ | 1 | /* $OpenBSD: a_time.c,v 1.22 2015/02/07 13:19:15 doug Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| @@ -73,18 +73,6 @@ IMPLEMENT_ASN1_MSTRING(ASN1_TIME, B_ASN1_TIME) | |||
| 73 | 73 | ||
| 74 | IMPLEMENT_ASN1_FUNCTIONS(ASN1_TIME) | 74 | IMPLEMENT_ASN1_FUNCTIONS(ASN1_TIME) |
| 75 | 75 | ||
| 76 | #if 0 | ||
| 77 | int | ||
| 78 | i2d_ASN1_TIME(ASN1_TIME *a, unsigned char **pp) | ||
| 79 | { | ||
| 80 | if (a->type == V_ASN1_UTCTIME || a->type == V_ASN1_GENERALIZEDTIME) | ||
| 81 | return(i2d_ASN1_bytes((ASN1_STRING *)a, pp, | ||
| 82 | a->type, V_ASN1_UNIVERSAL)); | ||
| 83 | ASN1err(ASN1_F_I2D_ASN1_TIME, ASN1_R_EXPECTING_A_TIME); | ||
| 84 | return -1; | ||
| 85 | } | ||
| 86 | #endif | ||
| 87 | |||
| 88 | ASN1_TIME * | 76 | ASN1_TIME * |
| 89 | ASN1_TIME_set(ASN1_TIME *s, time_t t) | 77 | ASN1_TIME_set(ASN1_TIME *s, time_t t) |
| 90 | { | 78 | { |
diff --git a/src/lib/libcrypto/asn1/asn1_lib.c b/src/lib/libcrypto/asn1/asn1_lib.c index 2b952abae6..46de52a050 100644 --- a/src/lib/libcrypto/asn1/asn1_lib.c +++ b/src/lib/libcrypto/asn1/asn1_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: asn1_lib.c,v 1.32 2014/07/11 14:49:12 miod Exp $ */ | 1 | /* $OpenBSD: asn1_lib.c,v 1.33 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 | * |
| @@ -140,12 +140,6 @@ ASN1_get_object(const unsigned char **pp, long *plength, int *ptag, | |||
| 140 | if (inf && !(ret & V_ASN1_CONSTRUCTED)) | 140 | if (inf && !(ret & V_ASN1_CONSTRUCTED)) |
| 141 | goto err; | 141 | goto err; |
| 142 | 142 | ||
| 143 | #if 0 | ||
| 144 | fprintf(stderr, "p=%d + *plength=%ld > omax=%ld + *pp=%d (%d > %d)\n", | ||
| 145 | (int)p, *plength, omax, (int)*pp, (int)(p+ *plength), | ||
| 146 | (int)(omax+ *pp)); | ||
| 147 | |||
| 148 | #endif | ||
| 149 | if (*plength > (omax - (p - *pp))) { | 143 | if (*plength > (omax - (p - *pp))) { |
| 150 | ASN1err(ASN1_F_ASN1_GET_OBJECT, ASN1_R_TOO_LONG); | 144 | ASN1err(ASN1_F_ASN1_GET_OBJECT, ASN1_R_TOO_LONG); |
| 151 | /* Set this so that even if things are not long enough | 145 | /* Set this so that even if things are not long enough |
diff --git a/src/lib/libcrypto/asn1/asn1_par.c b/src/lib/libcrypto/asn1/asn1_par.c index 2c8062bb8a..b5742fe97d 100644 --- a/src/lib/libcrypto/asn1/asn1_par.c +++ b/src/lib/libcrypto/asn1/asn1_par.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: asn1_par.c,v 1.21 2014/10/03 06:02:38 doug Exp $ */ | 1 | /* $OpenBSD: asn1_par.c,v 1.22 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 | * |
| @@ -126,11 +126,7 @@ asn1_parse2(BIO *bp, const unsigned char **pp, long length, int offset, | |||
| 126 | /* ASN1_BMPSTRING *bmp=NULL;*/ | 126 | /* ASN1_BMPSTRING *bmp=NULL;*/ |
| 127 | int dump_indent; | 127 | int dump_indent; |
| 128 | 128 | ||
| 129 | #if 0 | ||
| 130 | dump_indent = indent; | ||
| 131 | #else | ||
| 132 | dump_indent = 6; /* Because we know BIO_dump_indent() */ | 129 | dump_indent = 6; /* Because we know BIO_dump_indent() */ |
| 133 | #endif | ||
| 134 | p = *pp; | 130 | p = *pp; |
| 135 | tot = p + length; | 131 | tot = p + length; |
| 136 | op = p - 1; | 132 | op = p - 1; |
diff --git a/src/lib/libcrypto/asn1/t_x509.c b/src/lib/libcrypto/asn1/t_x509.c index f4872d8b24..1c83fc5608 100644 --- a/src/lib/libcrypto/asn1/t_x509.c +++ b/src/lib/libcrypto/asn1/t_x509.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: t_x509.c,v 1.25 2014/07/12 16:33:25 miod Exp $ */ | 1 | /* $OpenBSD: t_x509.c,v 1.26 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 | * |
| @@ -172,14 +172,6 @@ X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, unsigned long cflag) | |||
| 172 | if (!(cflag & X509_FLAG_NO_SIGNAME)) { | 172 | if (!(cflag & X509_FLAG_NO_SIGNAME)) { |
| 173 | if (X509_signature_print(bp, x->sig_alg, NULL) <= 0) | 173 | if (X509_signature_print(bp, x->sig_alg, NULL) <= 0) |
| 174 | goto err; | 174 | goto err; |
| 175 | #if 0 | ||
| 176 | if (BIO_printf(bp, "%8sSignature Algorithm: ", "") <= 0) | ||
| 177 | goto err; | ||
| 178 | if (i2a_ASN1_OBJECT(bp, ci->signature->algorithm) <= 0) | ||
| 179 | goto err; | ||
| 180 | if (BIO_puts(bp, "\n") <= 0) | ||
| 181 | goto err; | ||
| 182 | #endif | ||
| 183 | } | 175 | } |
| 184 | 176 | ||
| 185 | if (!(cflag & X509_FLAG_NO_ISSUER)) { | 177 | if (!(cflag & X509_FLAG_NO_ISSUER)) { |
diff --git a/src/lib/libcrypto/asn1/tasn_prn.c b/src/lib/libcrypto/asn1/tasn_prn.c index 9383750a82..844960fc77 100644 --- a/src/lib/libcrypto/asn1/tasn_prn.c +++ b/src/lib/libcrypto/asn1/tasn_prn.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tasn_prn.c,v 1.11 2014/07/11 08:44:47 jsing Exp $ */ | 1 | /* $OpenBSD: tasn_prn.c,v 1.12 2015/02/07 13:19:15 doug Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2000. | 3 | * project 2000. |
| 4 | */ | 4 | */ |
| @@ -260,11 +260,6 @@ asn1_item_print_ctx(BIO *out, ASN1_VALUE **fld, int indent, const ASN1_ITEM *it, | |||
| 260 | break; | 260 | break; |
| 261 | 261 | ||
| 262 | case ASN1_ITYPE_CHOICE: | 262 | case ASN1_ITYPE_CHOICE: |
| 263 | #if 0 | ||
| 264 | if (!nohdr && | ||
| 265 | !asn1_print_fsname(out, indent, fname, sname, pctx)) | ||
| 266 | return 0; | ||
| 267 | #endif | ||
| 268 | /* CHOICE type, get selector */ | 263 | /* CHOICE type, get selector */ |
| 269 | i = asn1_get_choice_selector(fld, it); | 264 | i = asn1_get_choice_selector(fld, it); |
| 270 | /* This should never happen... */ | 265 | /* This should never happen... */ |
| @@ -395,11 +390,6 @@ asn1_print_fsname(BIO *out, int indent, const char *fname, const char *sname, | |||
| 395 | static char spaces[] = " "; | 390 | static char spaces[] = " "; |
| 396 | const int nspaces = sizeof(spaces) - 1; | 391 | const int nspaces = sizeof(spaces) - 1; |
| 397 | 392 | ||
| 398 | #if 0 | ||
| 399 | if (!sname && !fname) | ||
| 400 | return 1; | ||
| 401 | #endif | ||
| 402 | |||
| 403 | while (indent > nspaces) { | 393 | while (indent > nspaces) { |
| 404 | if (BIO_write(out, spaces, nspaces) != nspaces) | 394 | if (BIO_write(out, spaces, nspaces) != nspaces) |
| 405 | return 0; | 395 | return 0; |
