summaryrefslogtreecommitdiff
path: root/egg
Commit message (Collapse)AuthorAgeFilesLines
* Stop using volatile in conjunction with atomic operationswip/smcv/fix-ciSimon McVittie2022-05-213-3/+3
| | | | | | | | | | | | As discussed in <https://gitlab.gnome.org/GNOME/glib/-/issues/600>, the volatile qualifier rarely has the semantics that are desired in C/C++. With recent gcc versions, combining pointers to volatile-qualified types with the __atomic_foo() family of builtins causes compiler warnings. http://c.isvolatileusefulwiththreads.com/ has some other useful references. Signed-off-by: Simon McVittie <smcv@debian.org>
* egg-asn1x: Avoid signed integer overflowDaiki Ueno2019-09-241-9/+5
|
* egg: Fix undefined behavior on excessive left shiftDaiki Ueno2019-09-241-1/+1
|
* build: Remove configure check for MADV_DONTDUMPDaiki Ueno2019-05-151-1/+1
| | | | It can be checked in the source code instead.
* egg: Request that secure memory not be dumped to diskMatthew Garrett2019-04-201-0/+13
| | | | | | | | | | Linux 3.4 added support for the MADV_DONTDUMP option to madvise(), which requests that the covered memory not be included in coredumps. It makes sense to use this to prevent cases where application crashes could result in secrets being persisted to disk or included in dumps that are uploaded to remote servers for analysis. I've avoided making this fatal since there's a chance this code could be built on systems that have MADV_DONTDUMP but run on systems that don't.
* egg: Write Proc-Type header before DEK-InfoIain Lane2019-01-291-5/+21
| | | | | | | | | These headers (at least for OpenSSL) must come in this order. We shouldn't assume that `g_hash_table_foreach` is going to give a particular ordering - it's not guaranteed, and has changed with GLib 2.59. Fixes #21
* egg: Port cosmetic fixes to egg-secure-memory.c from libsecretDaiki Ueno2018-03-231-4/+4
|
* build: Fix linking of test modules with "-z defs"Daiki Ueno2018-03-131-1/+0
| | | | | | Split out mock-interaction.c from libegg.la to libegg-test.la. https://bugzilla.gnome.org/show_bug.cgi?id=794274
* egg: Import mock-interaction.[ch] from gcrDaiki Ueno2018-03-043-1/+141
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=775981
* egg: Fix null termination behavior of egg_secure_strndup()Daiki Ueno2018-02-212-0/+26
| | | | | Even if the given string is shorter than n, the result should be null terminated. This matches the behavior of strndup().
* ASN.1 definitions of ECDSA and helper functions for DER encoding and decodingJakub Jelen2017-10-132-1/+41
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=641082
* DH: Ensure that generated secret occupies the same number of bytes as prime.Tomasz Miąsko2017-02-281-4/+11
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=778357
* egg-armor: Use g_strrstr_len() instead of memrchr()Philip Chimento2016-11-151-1/+1
| | | | | | | Not all systems have memrchr(), so g_strrstr_len() is more portable, though probably slower. https://bugzilla.gnome.org/show_bug.cgi?id=774311
* egg-asn1x: Change EggAsn1xFlags to typedefPhilip Chimento2016-11-141-1/+1
| | | | | | | Otherwise, including this header in two translation units later linked together will fail compilation. https://bugzilla.gnome.org/show_bug.cgi?id=774312
* Remove egg-spawnbaserock/3.18.3-5-geb16c03Giovanni Campagna2015-11-124-745/+1
| | | | | | | In looking for places where gnome-keyring-daemon potentially spawns subprocesses, I found this piece of unused code. Remove it. https://bugzilla.gnome.org/show_bug.cgi?id=756324
* egg: Fix bad precondation checking timegm() resultStef Walter2015-10-191-1/+1
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=92383
* egg: Make sure names for encode-decode tests are differentDmitry Shachnev2015-10-011-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=755873
* egg: remove egg-dbus.[ch]Cosimo Cecchi2015-06-293-469/+1
| | | | | | They're not used anymore. https://bugzilla.gnome.org/show_bug.cgi?id=622905
* egg: Don't crash tests if test directory was removedStef Walter2015-04-081-1/+1
| | | | | It's okay if the directory is gone, it may have been removed by a test.
* egg: Fix regression caused by earlier GCC fixStef Walter2015-04-081-1/+1
|
* Fix issues highlighted by GCC 5.0.xStef Walter2015-03-231-1/+1
|
* asn1x: Sanitize use of asn1_set_value/asn1_take_valueChristophe Fergeau2014-11-131-7/+7
| | | | | | | | Most callers of asn1_set_value() seems to assume this function will take ownership of the passed in GBytes, while it actually takes an additional reference. https://bugzilla.gnome.org/show_bug.cgi?id=738508
* test-spawn: Fix leaks of EchoData contentChristophe Fergeau2014-10-141-0/+6
| | | | | | | EchoData::error and EchoData::output must be freed after use. https://bugzilla.gnome.org/show_bug.cgi?id=738508
* egg-hkdf: Fix gcry_md_ht_t leak in egg_hkdf_performChristophe Fergeau2014-10-141-0/+1
| | | | | | | The 'md2' gcry_md_ht_t variable is opened with gcry_md_open() in that method but is never closed, which causes a leak. https://bugzilla.gnome.org/show_bug.cgi?id=738508
* egg-asn1x: Fix memory leak in egg_asn1x_set_any_raw()Christophe Fergeau2014-10-141-0/+1
| | | | | | | In error cases, the Atlv variable 'tlv' which was created in this function is not going to be used, so we must free it before returning. https://bugzilla.gnome.org/show_bug.cgi?id=738508
* test-padding: Don't leak egg_padding_pkcs1_pad_02 return valueChristophe Fergeau2014-10-141-0/+1
| | | | | | | egg_padding_pkcs1_pad_02 returns newly allocated data which must be g_free'ed after use. https://bugzilla.gnome.org/show_bug.cgi?id=738508
* test-asn1: Don't leak 'asn' in test_create_quark()Christophe Fergeau2014-10-141-0/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=738508
* egg/test-dn: Don't leak GBytes created in test_dn_value()Christophe Fergeau2014-10-141-0/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=738508
* egg-cleanup: Don't leak 'cleanup' on unregisterChristophe Fergeau2014-10-141-0/+1
| | | | | | | When unregistering a cleanup instance, the memory allocated for the cleanup was not freed causing a memory leak. https://bugzilla.gnome.org/show_bug.cgi?id=738508
* egg: Fix libgcrypt initialization for libgcrypt older than 1.6Stef Walter2014-09-131-0/+1
| | | | A header was missing
* egg: Move file tracker code to egg/ directoryStef Walter2014-09-134-0/+619
| | | | So that it can be used in other parts of gnome-keyring.
* egg: Accomodate thread-safe libgcrypt 1.6+Stef Walter2014-09-091-37/+8
| | | | | | | | | | | | | libcrypt no longer supports setting our own threading callbacks, and is thread-safe if we call gcry_check_version() before creating threads. Unfortunately we can't guarantee that we call gcry_check_version() early enough, we try our best. Most of the callers of Gcr either don't use libgcrypt, or also initialize it appropriately themselves. Bump libgcrypt dependency to 1.4.5+, and have earlier versions use the native pthread implementation of locking.
* egg: Add egg_tests_copy_scratch_file() method for fixture filesStef Walter2014-03-062-4/+7
|
* daemon: Exit gnome-keyring-daemon when the DBus connection closesStef Walter2014-03-062-5/+20
| | | | | | | | | We don't do this via the standard mechanism, as it means that libdbus just calls _exit() (not even exit()) when the connection goes away. This can lead to inconsistent state. Shutdown should be orderly. https://bugzilla.gnome.org/show_bug.cgi?id=708765
* egg: Support nested directories in egg_tests_remove_scratch_directory()Stef Walter2014-03-061-16/+8
| | | | | Call 'rm' to cleanup the directory instead of removing files ourselves. We want to use nested directories in some tests.
* egg: Remove egg_mkdtemp() functions and use g_mkdtemp() insteadStef Walter2014-03-066-231/+1
|
* Makefile.am: Use parallel tests for 'make check'Stef Walter2014-03-052-5/+8
| | | | | Also build in a 'make check-memory' and related functionality which drives valgrind.
* Makefile.am: Use a single non-recursive MakefileStef Walter2014-03-0510-90/+107
| | | | | | | | This allows all the code to be built in parallel, and only rebuilding stuff that's changed when developing. Much quicker. In the meantime disable the p11-tests checks, which were very rarely used. We'll need to migrate them to TAP.
* Makefile.am: Move tests into same directories as tested codeStef Walter2014-03-0529-76/+67
| | | | | This allows for a cleaner build tree, and will provide benefits when moving to a single Makefile.
* Remove old FSF license from header filesStef Walter2014-01-0854-125/+71
| | | | | | And refresh the COPYING and COPYING.LIB files https://bugzilla.gnome.org/show_bug.cgi?id=721549
* egg: Move away from deprecated g_test_trap_fork()Stef Walter2013-12-021-8/+12
| | | | Bump glib dependency to 2.38.x
* egg-asn1x: Update from gcr for recent changes in libtasn1Stef Walter2013-04-197-57/+1458
|
* Update for deprecations in GLibStef Walter2013-04-192-5/+4
| | | | | * Use GMutex insteod of GStaticMutex * Don't use g_thread_supported
* Fix build with libtasn1 >= 3.1Sebastian Keller2013-02-183-0/+3
|
* egg-armor: Handle mismatched but not truncated suffix lineStef Walter2013-01-112-1/+6
| | | | | | * Discovered by Gustavo Luiz Duarte <gustavold@linux.vnet.ibm.com> https://bugzilla.gnome.org/show_bug.cgi?id=691500
* egg-armor: Fix memrchr() call with negative string lengthStef Walter2013-01-113-13/+173
| | | | | | | | | | | | * Initial patch by Gustavo Luiz Duarte <gustavold@linux.vnet.ibm.com> * The cause of this bug was reusing argument variables for other purposes in parsing functions when that didn't really make sense, so fix this as well. * Add tests that catch this issue. See https://bugzilla.redhat.com/show_bug.cgi?id=893162 https://bugzilla.gnome.org/show_bug.cgi?id=691500
* egg-asn1x: More complete coverage for ASN.1 testsStef Walter2012-11-097-131/+1263
| | | | | | * Remove or change code that doesn't get executed in normal operation. * Fix a few bugs discovered during the testing.
* egg-asn1x: Fix corner case where long DER length overflowsStef Walter2012-11-091-11/+23
| | | | | * Better detection of the case where TLV length overflows the size of an int.
* egg-symkey: Complete tests for recent ASN.1 API changesStef Walter2012-11-093-18/+446
| | | | | | Since the ASN.1 API changed, we need to make sure things still work. Add tests to ensure this. In addition rework code which is (or should be) currently unreachable.
* egg-asn1x: Fix crash when parsing invalid DER filesStef Walter2012-11-092-0/+55
| | | | | | * When parsing invalid DER files and more than one sub-TLV is encountered we would do a NULL dereference. * Catch this condition and test for it.