summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/asn1/asn1_item.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libcrypto/asn1/asn1_item.c b/src/lib/libcrypto/asn1/asn1_item.c
index 9e7f308ed1..1bdb743a95 100644
--- a/src/lib/libcrypto/asn1/asn1_item.c
+++ b/src/lib/libcrypto/asn1/asn1_item.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1_item.c,v 1.6 2022/11/26 16:08:50 tb Exp $ */ 1/* $OpenBSD: asn1_item.c,v 1.7 2023/06/13 23:31:53 tb 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 *
@@ -119,12 +119,6 @@
119#include "asn1_local.h" 119#include "asn1_local.h"
120#include "evp_local.h" 120#include "evp_local.h"
121 121
122/*
123 * ASN1_ITEM version of dup: this follows the model above except we don't need
124 * to allocate the buffer. At some point this could be rewritten to directly dup
125 * the underlying structure instead of doing and encode and decode.
126 */
127
128int 122int
129ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *asn, 123ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *asn,
130 unsigned char *md, unsigned int *len) 124 unsigned char *md, unsigned int *len)
@@ -145,6 +139,12 @@ ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *asn,
145 return (1); 139 return (1);
146} 140}
147 141
142/*
143 * ASN1_ITEM version of ASN1_dup(): follows the same model except there's no
144 * need to allocate the buffer. At some point this could be rewritten to dup
145 * the underlying structure directly instead of doing an encode and decode.
146 */
147
148void * 148void *
149ASN1_item_dup(const ASN1_ITEM *it, void *x) 149ASN1_item_dup(const ASN1_ITEM *it, void *x)
150{ 150{