src/
src/3rd-party/ # Everything that is 3rd-party related
src/cmds/ # All sub-commands from swupd (except 3rd-party ones)
src/lib/ # Modules that implement functions not dependent on swupd
behavior (i.e. system interations, logging)
src/swupd_lib/ # Modules that implement functions dependent on swupd
behavior (i.e. hash calculation, signature verification,
manifest/bundle handlers)
On several points on swupd we need to free a pointer and then set it to
NULL. This is made in some areas using the free_and_clear_pointer(). But
most places free_and_clear_pointer() is used, this is not really necessary.
On the other hand it's hard to make sure that we are really setting to NULL
every pointer that we need, so we're adding a more conservative approach on
setting every pointer to NULL after free using a wrapper.
The greatest advantage of this wrapper over free_and_clear_pointer() is that
it's not type dependent and we don't need to call it with a pointer of a pointer,
so calls look more to calls to a standard free.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
This commit introduces a function to build a path from multiple string
variables and at the same time it removes all duplicated slashes in the
path.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
- Better documentation on header file
- Renaming all functions that requires the list to be sorted to add
a prefix list_sorted_
- Make sure all functions are calling list_head() and list_tail()
when needed
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
All files that are written by tests should be written in the directory
where the tests were executed and not the directory where code is.
Make distcheck now works fine
Fixes#343
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Last parameter was missing on a run_command() call and tests were breaking for some specific configurations.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
This commit adds the ability to the manifest parser to recognize the
"optional" manifest header and to add those optional bundles in the
manifest to the manifest struct.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Test if certificates with Authority Information Access property set as critical
aren't used to validate swupd content.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Adding a unit test for string functions on string.h module.
Unit tests will help us to test functions that are hard to test
with function tests. String conversions, for example would be extremely
hard to test using functional tests.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>