Re: How to run OpenSSL command line utility under debugger?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Anton,

On Tue, Oct 15, 2019 at 9:00 AM Anton Schmidt <schmidt.ajax@xxxxxxxxx> wrote:
I've got an error in openssl library function when trying to read a pkcs7 message

[schmidt@localhost ssl]$ ./bin/openssl version
OpenSSL 3.0.0-dev xx XXX xxxx (Library: OpenSSL 3.0.0-dev xx XXX xxxx)
[schmidt@localhost ssl]$ ./bin/openssl pkcs7 -in /tmp/55b0822e148e4ffaa0bd9ebc41814f54.der -inform DER -print_certs
unable to load PKCS7 object
40:57:70:89:A5:7F:00:00:error:asn1 encoding routines:(unknown function):sequence length mismatch:crypto/asn1/tasn_dec.c:388:Type=PKCS7_ENVELOPE
40:57:70:89:A5:7F:00:00:error:asn1 encoding routines:(unknown function):nested asn1 error:crypto/asn1/tasn_dec.c:629:
40:57:70:89:A5:7F:00:00:error:asn1 encoding routines:(unknown function):nested asn1 error:crypto/asn1/tasn_dec.c:479:Field=d.enveloped, Type=PKCS7 

openssl asn1parse and other online tools correctly parse and display ASN1 of pkcs7 envelopedData.

I want to run openssl utility under debugger to see what is happening inside the library function.

I've found OpenSSL library source code https://github.com/openssl/openssl but not the sources for command line utility. Are the sources available? 

Or as an option is there a guide how I could write a simple pkcs7 envelopedData reader to debug the library function?

You can build openssl using the following steps:
./config -ggdb
make

and then debug
LD_LIBRARY_PATH=. gdb --args apps/openssl ...

--
SY, Dmitry Belyavsky

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux