[gnutls-devel] GnuTLS | lib/x509: use common routine for parsing data version (!1209)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Thu Mar 12 12:42:08 CET 2020




Dmitry Baryshkov commented on a discussion on lib/x509/common.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1209#note_303837556

>  	else
>  		return gnutls_assert_val(GNUTLS_GOST_PARAMSET_UNKNOWN);
>  }
> +
> +int _gnutls_x509_get_version(asn1_node root, const char *name)
> +{
> +	uint8_t version[8];
> +	int len, result;
> +
> +	len = sizeof(version);
> +	result = asn1_read_value(root, name, version, &len);
> +	if (result != ASN1_SUCCESS) {
> +		if (result == ASN1_ELEMENT_NOT_FOUND)

@rockdaboot what about switching to `asn1_node` and `asn1_node_const` directly and just having internally the following piece of code?

```c
#if ASN1_VERSION < 0x40d00
#define asn1_node_const asn1_node
#endif
```

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1209#note_303837556
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20200312/3f497b71/attachment-0001.html>


More information about the Gnutls-devel mailing list