aboutsummaryrefslogtreecommitdiffstats
path: root/libopkg/opkg_verify.c
AgeCommit message (Collapse)Author
2021-08-25deprecate OpenSSL signature verificationAlex Stewart
The OpenSSL libraries are used by libopkg directly, as an optional method of verifying package feed signatures against a locally stored CA certificate. They are enabled only when the --enable-openssl argument is passed to AutoConf. Assert that --enable-openssl is not widely used by opkg integrators and that GPG feed signing (--enable-gpg) is preferred in all cases. Remove: * OpenSSL signature verification * the --enable-openssl AutoConf option * the `signature_ca_file` opkg conf setting * the `signature_ca_path` opkg conf setting Signed-off-by: Alex Stewart <alex.stewart@ni.com>
2019-10-25add SPDX License identifierYann CARDAILLAC
Signed-off-by: Yann CARDAILLAC <yann.cardaillac@smile.fr> Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
2018-02-19src, libopkg: don't use non-portable malloc.hMichał Łyszczek
Since malloc.h is an extension to the language and is not available on all systems (like BSD family), stdlib.h should be used instead, which defines malloc function family. Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl> Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
2015-09-11libopkg: include stdio.h for getting FILE definedKhem Raj
For some libc(musl) stdio.h may not get included indirectly which means we need to mention it in explicit include list Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
2014-12-15libopkg: Reformat multi-line if statmentsPaul Barker
Use an intermediate variable to move multi-line expressions outside of if statements. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-12-15Initial reformat with 'indent'Paul Barker
For each file, the command executed was: indent -linux -i4 -nut -sc -bbo -nhnl $f This is the first step in improving the code formatting and further work is still required. 'indent' is confused by the 'extern "c" {}' wrapping in the header files and gets the indentation wrong. It also produces sub-optimal formatting for some long lines. Each file will be reviewed by hand after this commit. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-05-30pkg_src, opkg_verify: Support ascii-armored gpg signaturesPaul Barker
If the configuration option 'signature_type' is set to 'gpg-asc' then signatures are assumed to be in ascii-armoured format with a filename extension of '.asc' instead of '.sig'. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-05-30opkg_verify_signature: Allow method to be selected by config optionPaul Barker
The decision as to which signature verification method to use does not have to be determined at compile time. Instead this decision can be selected at run time using a configuration option. If support for the selected method has not been compiled in, an error message is displayed and the return value is -1. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-05-08opkg_verify_signature: Report inability to verifyPaul Barker
If no signature verification method is enabled, this is indicated by an error message and a return value of -1 instead of simply being ignored. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-05-08opkg_verify_signature: Renamed from opkg_verify_filePaul Barker
This function name is clearer as it specifies what verification is performed on the file. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-05-08opkg_verify: Clarify arguments of opkg_verify_filePaul Barker
The file to be verified may not always be a plain text file so calling this argument 'text_file' could be confusing. Instead the arguments are named to match the same arguments of opkg_verify_gpg_signature and opkg_verify_openssl_signature. The arguments are also given const modifiers as they are not modified. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-05-08opkg_verify: Add sha256sum verification functionPaul Barker
This function is always compiled so that callers don't need to check whether sha256sum checking is enabled. If it isn't enabled, an INFO message is outputted and the sha256sum is not checked. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-05-08opkg_verify: Add md5sum verification functionPaul Barker
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-05-08opkg_verify: Split out new file for verification functionsPaul Barker
This file will contain all verification checks to be performed on downloaded files. For now it just contains opkg_verify_file(). Signed-off-by: Paul Barker <paul@paulbarker.me.uk>