diff options
author | tb <> | 2023-06-13 23:31:53 +0000 |
---|---|---|
committer | tb <> | 2023-06-13 23:31:53 +0000 |
commit | 43590eae3539fd5d49e6658199538406364a5245 (patch) | |
tree | d0793579e68ba3a4fb7ddd27e30fbd59c905e141 | |
parent | 76fac483ab33603d9382e483db0e7bc158578397 (diff) | |
download | openbsd-43590eae3539fd5d49e6658199538406364a5245.tar.gz openbsd-43590eae3539fd5d49e6658199538406364a5245.tar.bz2 openbsd-43590eae3539fd5d49e6658199538406364a5245.zip |
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.
-rw-r--r-- | src/lib/libcrypto/asn1/asn1_item.c | 14 |
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 | |||
128 | int | 122 | int |
129 | ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *asn, | 123 | ASN1_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 | |||
148 | void * | 148 | void * |
149 | ASN1_item_dup(const ASN1_ITEM *it, void *x) | 149 | ASN1_item_dup(const ASN1_ITEM *it, void *x) |
150 | { | 150 | { |