diff options
author | miod <> | 2014-04-15 20:19:57 +0000 |
---|---|---|
committer | miod <> | 2014-04-15 20:19:57 +0000 |
commit | f6394a1bd8f61db79694977e8d0afdfd4e4ff1a1 (patch) | |
tree | 3b957c0020405f9f6e90af181b1ebb5124c6e68a /src/lib/libcrypto/asn1/a_digest.c | |
parent | 2125ec026993d82b51335463dc7fc5b899a4057a (diff) | |
download | openbsd-f6394a1bd8f61db79694977e8d0afdfd4e4ff1a1.tar.gz openbsd-f6394a1bd8f61db79694977e8d0afdfd4e4ff1a1.tar.bz2 openbsd-f6394a1bd8f61db79694977e8d0afdfd4e4ff1a1.zip |
The NO_ASN1_OLD define was introduced in 0.9.7, 8 years ago, to allow for
obsolete (and mostly internal) routines to be compiled out.
We don't expect any reasonable software to stick to these interfaces, so better
clean up the view and unifdef -DNO_ASN1_OLD.
The astute reader will notice the existence of NO_OLD_ASN1 which serves a
similar purpose, but is more entangled. Its time will come, soon.
Diffstat (limited to 'src/lib/libcrypto/asn1/a_digest.c')
-rw-r--r-- | src/lib/libcrypto/asn1/a_digest.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/lib/libcrypto/asn1/a_digest.c b/src/lib/libcrypto/asn1/a_digest.c index cbdeea6ac0..8a4b24a06b 100644 --- a/src/lib/libcrypto/asn1/a_digest.c +++ b/src/lib/libcrypto/asn1/a_digest.c | |||
@@ -70,32 +70,6 @@ | |||
70 | #include <openssl/buffer.h> | 70 | #include <openssl/buffer.h> |
71 | #include <openssl/x509.h> | 71 | #include <openssl/x509.h> |
72 | 72 | ||
73 | #ifndef NO_ASN1_OLD | ||
74 | |||
75 | int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data, | ||
76 | unsigned char *md, unsigned int *len) | ||
77 | { | ||
78 | int i; | ||
79 | unsigned char *str,*p; | ||
80 | |||
81 | i=i2d(data,NULL); | ||
82 | if ((str=(unsigned char *)OPENSSL_malloc(i)) == NULL) | ||
83 | { | ||
84 | ASN1err(ASN1_F_ASN1_DIGEST,ERR_R_MALLOC_FAILURE); | ||
85 | return(0); | ||
86 | } | ||
87 | p=str; | ||
88 | i2d(data,&p); | ||
89 | |||
90 | if (!EVP_Digest(str, i, md, len, type, NULL)) | ||
91 | return 0; | ||
92 | OPENSSL_free(str); | ||
93 | return(1); | ||
94 | } | ||
95 | |||
96 | #endif | ||
97 | |||
98 | |||
99 | int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *asn, | 73 | int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *asn, |
100 | unsigned char *md, unsigned int *len) | 74 | unsigned char *md, unsigned int *len) |
101 | { | 75 | { |
@@ -110,4 +84,3 @@ int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *asn, | |||
110 | OPENSSL_free(str); | 84 | OPENSSL_free(str); |
111 | return(1); | 85 | return(1); |
112 | } | 86 | } |
113 | |||