summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Baryshkov <dbaryshkov@gmail.com>2020-05-12 03:54:32 +0300
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>2022-09-11 16:24:47 +0300
commit078ad4564db1b922d076236f2ac85d5a1b9ed7c9 (patch)
tree370be5e8070e7bcf7efc517c777599f858744006
parentdab8d5b9aae120fe16294aaba09511647aa00b98 (diff)
downloadgnutls-078ad4564db1b922d076236f2ac85d5a1b9ed7c9.tar.gz
pkcs7: drop expanded field, just reinit always
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
-rw-r--r--lib/x509/pkcs7.c11
-rw-r--r--lib/x509/x509_int.h1
2 files changed, 4 insertions, 8 deletions
diff --git a/lib/x509/pkcs7.c b/lib/x509/pkcs7.c
index 984e4d90af..b10faa3a3b 100644
--- a/lib/x509/pkcs7.c
+++ b/lib/x509/pkcs7.c
@@ -145,14 +145,11 @@ gnutls_pkcs7_import(gnutls_pkcs7_t pkcs7, const gnutls_datum_t * data,
need_free = 1;
}
- if (pkcs7->expanded) {
- result = pkcs7_reinit(pkcs7);
- if (result < 0) {
- gnutls_assert();
- goto cleanup;
- }
+ result = pkcs7_reinit(pkcs7);
+ if (result < 0) {
+ gnutls_assert();
+ goto cleanup;
}
- pkcs7->expanded = 1;
result = asn1_der_decoding(&pkcs7->pkcs7, _data.data, _data.size, NULL);
if (result != ASN1_SUCCESS) {
diff --git a/lib/x509/x509_int.h b/lib/x509/x509_int.h
index acbc185c71..55cbd240ab 100644
--- a/lib/x509/x509_int.h
+++ b/lib/x509/x509_int.h
@@ -128,7 +128,6 @@ typedef struct gnutls_pkcs7_int {
gnutls_datum_t der_signed_data;
asn1_node signed_data;
- unsigned expanded;
} gnutls_pkcs7_int;
struct pbkdf2_params {