From: tb Date: Tue, 13 Jun 2023 23:31:53 +0000 (+0000) Subject: Move comment about ASN1_item_dup() where it belongs X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0bde1f61c22f27dda25f0011cb54657a1652c6e6;p=openbsd Move comment about ASN1_item_dup() where it belongs Reword it in such a way that it stands on its own and doesn't refer to a non-existent model above. Also tweak grammar and fix typos. --- diff --git a/lib/libcrypto/asn1/asn1_item.c b/lib/libcrypto/asn1/asn1_item.c index 9e7f308ed12..1bdb743a95e 100644 --- a/lib/libcrypto/asn1/asn1_item.c +++ b/lib/libcrypto/asn1/asn1_item.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asn1_item.c,v 1.6 2022/11/26 16:08:50 tb Exp $ */ +/* $OpenBSD: asn1_item.c,v 1.7 2023/06/13 23:31:53 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -119,12 +119,6 @@ #include "asn1_local.h" #include "evp_local.h" -/* - * 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 directly dup - * the underlying structure instead of doing and encode and decode. - */ - int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *asn, unsigned char *md, unsigned int *len) @@ -145,6 +139,12 @@ ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *asn, return (1); } +/* + * ASN1_ITEM version of ASN1_dup(): follows the same model except there's no + * need to allocate the buffer. At some point this could be rewritten to dup + * the underlying structure directly instead of doing an encode and decode. + */ + void * ASN1_item_dup(const ASN1_ITEM *it, void *x) {