diff options
Diffstat (limited to 'src/crypto/asn1/a_dup.c')
-rw-r--r-- | src/crypto/asn1/a_dup.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/crypto/asn1/a_dup.c b/src/crypto/asn1/a_dup.c index 57394f58..9ede8511 100644 --- a/src/crypto/asn1/a_dup.c +++ b/src/crypto/asn1/a_dup.c @@ -59,30 +59,6 @@ #include <openssl/err.h> #include <openssl/mem.h> -void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x) -{ - unsigned char *b, *p; - const unsigned char *p2; - int i; - char *ret; - - if (x == NULL) - return (NULL); - - i = i2d(x, NULL); - b = OPENSSL_malloc(i + 10); - if (b == NULL) { - OPENSSL_PUT_ERROR(ASN1, ERR_R_MALLOC_FAILURE); - return (NULL); - } - p = b; - i = i2d(x, &p); - p2 = b; - ret = d2i(NULL, &p2, i); - OPENSSL_free(b); - return (ret); -} - /* * ASN1_ITEM version of dup: this follows the model above except we don't * need to allocate the buffer. At some point this could be rewritten to |