Age | Commit message (Collapse) | Author | Files | Lines |
|
For debugging purposed vreader_xfr_bytes print all structure
fields using even not initialized fields causing some warnings.
Remove this issue.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
|
|
This never worked as the apdu->a_type was never enum, but these
instructions are not frequently used so it did not matter.
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
|
|
src/vscard_common.h is part of the libcacard public API contains
`#include <glib.h>` which is part of the glib API.
This redundant include breaks xf86-video-qxl build.
Signed-off-by: Tomasz Kłoczko <kloczek@github.com>
|
|
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
|
|
This is needed to avoid non-deterministic order of the certificates in
case the underlying pkcs11 module does not guarantee that (such as
softhsm). Without this change, the signing and encryption certificate
might get mixed up and application might try to use wrong one for
verification or decryption.
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
|
|
glib.h is used in the public header. However, the public headers do not
require any function in Glib library, just its headers. This cannot
be handled automatically by Meson so we need to explicitly tell
the GLib dependency in the .pc file. Use Requires.private to avoid
libraries using libcacard to have a direct dependency to GLib.
The crypto library NSS is already handled automatically by Meson using
dependencies in library so remove it from .pc file.
This undos part of commit 2d273ec9
Signed-off-by: Alexander Traud <pabstraud@compuserve.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
|
|
Due to the way Autoconf works you cannot reuse PKG_CHECK_MODULES
for the same library so the compilation failed on some systems.
Check using just code and defines instead of using configuration
software.
Also avoids macros to avoid side effects.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
|
|
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
|
|
It is suppressed also by using NSS_IGNORE_SYSTEM_POLICY=1 but we want to run
as closely as possible to existing systems so we rather supress it. The leak
did not have very useful trace, but from code review it was certainly related
to the system policy in NSS.
==6995==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 4097 byte(s) in 1 object(s) allocated from:
#0 0x7f973a3c33cf in __interceptor_malloc (/lib64/libasan.so.6+0xab3cf)
#1 0x7f973a35b4b8 (/lib64/libasan.so.6+0x434b8)
#2 0x7f9735bc47dd (<unknown module>)
#3 0x7f9735bc9338 (<unknown module>)
#4 0x7f9735bcd149 (<unknown module>)
#5 0x7f973a03316a (/lib64/libnss3.so+0x4616a)
#6 0x7f973a03ffbc in SECMOD_LoadModule (/lib64/libnss3.so+0x52fbc)
#7 0x7f973a0400f7 in SECMOD_LoadModule (/lib64/libnss3.so+0x530f7)
#8 0x7f973a009820 (/lib64/libnss3.so+0x1c820)
#9 0x7f973a009d9b in NSS_InitContext (/lib64/libnss3.so+0x1cd9b)
#10 0x7f973a2ffc3f in vcard_emul_init (/builds/jjelen/libcacard/.libs/libcacard.so.0+0x21c3f)
#11 0x40eed3 in libcacard_init (/builds/jjelen/libcacard/tests/.libs/lt-libcacard+0x40eed3)
#12 0x41b2c1 in main (/builds/jjelen/libcacard/tests/.libs/lt-libcacard+0x41b2c1)
#13 0x7f9739d9d1a1 in __libc_start_main (/lib64/libc.so.6+0x281a1)
#14 0x40258d in _start (/builds/jjelen/libcacard/tests/.libs/lt-libcacard+0x40258d)
SUMMARY: AddressSanitizer: 4097 byte(s) leaked in 1 allocation(s).
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
This helps making sure we use for deciphering the same key that
was used for encrypting the plaintext as we can not affect the
ordering of the keys coming from softhsm to libcacard in any
simple way.
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
This reverts the commit c3838328 which technically made this
code dead code.
I got a clarifiction from Bob, that the code was wrong, including
the assert, which caused a lot of confusion in the past.
Fixes #25
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
This helps to catch errors earlier than in oss-fuzz and avoids
0% code coverages of fuzzers when generated by meson.
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
|
|
Fixes !9
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|