diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2015-06-16 17:15:04 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2015-06-16 17:15:04 +0200 |
commit | afa0e506834afd848ca5461f6450b528dde49fb2 (patch) | |
tree | 2c3afe270db4af43b4f518e59d5b2cf92168f1ad /lib/x509/pkcs7.c | |
parent | f57e1c528cd4ac802519051cd1964e5a24dd7c6c (diff) | |
download | gnutls-afa0e506834afd848ca5461f6450b528dde49fb2.tar.gz |
pkcs7: write the DER encoded time
Diffstat (limited to 'lib/x509/pkcs7.c')
-rw-r--r-- | lib/x509/pkcs7.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/x509/pkcs7.c b/lib/x509/pkcs7.c index 9001a61edd..5ab06b1b05 100644 --- a/lib/x509/pkcs7.c +++ b/lib/x509/pkcs7.c @@ -1756,7 +1756,7 @@ static int add_attrs(ASN1_TYPE c2, const char *root, gnutls_pkcs7_attrs_t attrs, return _gnutls_asn2err(result); } - snprintf(name, sizeof(name), "%s.?LAST.values.?LAST", root); + snprintf(name, sizeof(name), "%s.?LAST.values.?1", root); result = asn1_write_value(c2, name, p->data.data, p->data.size); if (result != ASN1_SUCCESS) { gnutls_assert(); @@ -1811,8 +1811,8 @@ static int write_attributes(ASN1_TYPE c2, const char *root, const gnutls_datum_t return ret; } - snprintf(name, sizeof(name), "%s.?LAST.values.?LAST", root); - ret = _gnutls_x509_set_time(c2, name, gnutls_time(0), 1); + snprintf(name, sizeof(name), "%s.?LAST.values.?1", root); + ret = _gnutls_x509_set_raw_time(c2, name, gnutls_time(0)); if (result != ASN1_SUCCESS) { gnutls_assert(); ret = _gnutls_asn2err(result); |