[gnutls-devel] libtasn1 | fail to parse certificate then build with clang (#31)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Sun Jan 10 02:53:21 CET 2021



rim created an issue: https://gitlab.com/gnutls/libtasn1/-/issues/31



## Description of problem:
Not sure that this is a libtasn1 error or clang.

I am update my desktop to current and claws-mail show me certs errors, I dig inside and found that gnutls_x509_crt_get_fingerprint() fails.
At next step I found that if I rebuild libtasn1 with debug then it fixes errors.

I wrote test app to reproduce error and check on other systems.
On my home server (12.2) gnutls+libtasn1 was already installed and no errors happen. But after I rebuild libtasn1 - test app show error.
Now I can not fix because even with -O0 it produces error.

With:
clang version 11.0.1 (git at github.com:llvm/llvm-project.git llvmorg-11.0.1-rc2-0-g43ff75f2c3f)
13.0-CURRENT FreeBSD 13.0-CURRENT
even -O2 gives code that does not work.
-O1, -O0 - work.

With:
clang version 10.0.1 (git at github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2)
12.2-STABLE 5586a4e13931(stable/12)
does not work with any -O values.


## Version of libtasn1 used:
libtasn1-4.16.0

## Distributor of libtasn1 (e.g., Ubuntu, Fedora, RHEL)
FreeBSD

## How reproducible:
Build test tool:
cc gnutls_test.c -O0 -DDEBUG -I/usr/local/include -L/usr/local/lib -lm -lgnutls -o gnutls_test

Run test:
./gnutls_test ./pop.mail.ru.995.cert

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/libtasn1/-/issues/31
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/20210110/856eace9/attachment.html>


More information about the Gnutls-devel mailing list