summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-gpg-verify-result.h
Commit message (Collapse)AuthorAgeFilesLines
* Update FSF license notices to use URL instead of addressJoseph Marrero2021-12-071-3/+1
|
* lib: Coerce flags enums to GIR bitfieldsDan Nicholson2020-04-301-1/+1
| | | | | | | | | | | | | | | | | | The GI scanner decides if an `enum` is really a `bitfield` if it finds any values that have left shifts. With an `enumeration`, the introspecting language may error or convert to a different type if the user tries to combine values. Change all Flags `enum`s to use left-shifted values so that they're represented as `bitfield`s in the GIR. The primary bug here is that you can't combine `REFS_ONLY` and `NO_PRUNE` when calling `OSTree.Repo.prune()` from an introspected language. This is an IABI break since the typelib will change from `enumeration` to `bitfield`. `OstreeRepoImportFlags` is internal but the change is included here to prepare for a subsequent name that would require bit shifting to operate correctly as a flag.
* lib: Fix Since versions for 2020.1fixup-since-versionsDan Nicholson2020-02-201-3/+3
| | | | | | | | These had been added assuming 2019.7 would be the next version, but now it's 2020 and there's been a release. In the case of `OstreeCommitSizesEntry`, I'd forgotten to move it forward from 2019.5 to 2019.7 in the time between when I started working on the feature and it landed.
* lib/gpg: Add more specific OstreeGpgError codesDan Nicholson2020-01-241-0/+8
| | | | | | | | | | | | | | | | | Currently `ostree_gpg_verify_result_require_valid_signature` always returns an error that the key used for the signature is missing from the keyring. However, all that's been determined is that there are no valid signatures. The error could also be from an expired signature, an expired key, a revoked key or an invalid signature. Provide values for these missing errors and return them from `ostree_gpg_verify_result_require_valid_signature`. The description of each result is appended to the error message, but since the result can contain more than one signature but only a single error can be returned, the status of the last signature is used for the error code. See the comment for rationale. Related: flatpak/flatpak#1450
* lib/gpg: Show information for expired keysDan Nicholson2019-06-191-0/+10
| | | | | | | | | Introduce a new signature attribute for the key expiration timestamp and display it when the key has a non-zero expiration time. Without this, the error shown is `BAD signature`, which isn't correct. Closes: #1872 Approved by: cgwalters
* lib: add minimum version to various symbols based on libostree-released.symFelix Krull2019-05-191-0/+5
| | | | | Closes: #1861 Approved by: cgwalters
* Add SPDX-License-Identifier to source filesMarcus Folkesson2018-01-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | SPDX License List is a list of (common) open source licenses that can be referred to by a “short identifier”. It has several advantages compared to the common "license header texts" usually found in source files. Some of the advantages: * It is precise; there is no ambiguity due to variations in license header text * It is language neutral * It is easy to machine process * It is concise * It is simple and can be used without much cost in interpreted environments like java Script, etc. * An SPDX license identifier is immutable. * It provides simple guidance for developers who want to make sure the license for their code is respected See http://spdx.org for further reading. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Closes: #1439 Approved by: cgwalters
* tree-wide: Remove Emacs modelinesColin Walters2017-09-211-2/+1
| | | | | | | | | We added a `.dir-locals.el` in commit: 9a77017d87b74c5e2895cdd64ad098018929403f There's no need to have it per-file, with that people might think to add other editors, which is the wrong direction. Closes: #1206 Approved by: jlebon
* lib/gpg: Add _FINGERPRINT_PRIMARY to OstreeGpgVerifyResultRobert McQueen2017-09-071-1/+7
| | | | | | | | | | | | Revert the switch of _FINGERPRINT to giving the primary key ID rather than the signing key ID, and instead add the primary key ID as a new attribute which is available if the key is not missing. Closes: https://github.com/ostreedev/ostree/issues/608 Closes: #1092 Approved by: cgwalters
* lib/gpg-verify: Add an OstreeGpgError error domainPhilip Withnall2017-08-101-0/+21
| | | | | | | | | | | | | | | | | | | Add a new error domain for GPG signing/verification errors, and use it throughout libostree for describing verification errors. This replaces various uses of G_IO_ERROR_FAILED, and one instance of G_IO_ERROR_NOT_FOUND (for which some code in ot-builtin-show.c had to be changed to ensure it was still handled correctly). The use of a separate error domain allows failures in GPG operations to be handled separately from network failures (where the summary file could not be found to be downloaded, for example) or timeouts. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #1064 Closes: #1071 Approved by: mbarnes
* repo: Factor out the check of gpg result to a separate functionKrzesimir Nowak2016-05-271-0/+4
| | | | | | | | | I plan to add a function for verifying any data which may return the error about lack of trusted signatures, so let's avoid the redundancy and put the check in the separate function. Closes: #310 Approved by: cgwalters
* Add a missing #include to fix "make check"Colin Walters2016-03-021-0/+1
|
* lib: Introduce versioned symbolsColin Walters2016-03-011-0/+8
| | | | | | | | | | | | | | | | | | | | As rpm-ostree evolves, it keeps driving API additions to libostree. This creates a relatively tight coupling. However, if delivering via e.g. RPM, unless one manually remembers to increment the `Requires:` in the spec file, it's possible for the two to become desynchronized. RPM handles versioned symbols and will ensure a dependency if the application starts using a newer version. To implement this, switch to `-fvisibility=hidden`, along with an annotation in the header, and finally add a `.sym` file. This matches what other projects like systemd and libvirt do. Although rather than attempting to retroactively version symbols, glom them all onto the current one.
* gpg: Add ostree_gpg_verify_result_describe_variant()Matthew Barnes2015-05-061-0/+5
| | | | | Needed for printing signature details in places where OstreeGpgVerifyResult cannot go.
* gpg: Add ostree_gpg_verify_result_describe()Matthew Barnes2015-04-081-0/+19
| | | | | Internalizes the signature output of "ostree show" so it can be reused elsewhere.
* gpg: Add OstreeGpgVerifyResultMatthew Barnes2015-03-181-0/+103
Wrappers a referenced gpgme_verify_result_t so detailed verify results can be examined independently of executing a verify operation. _ostree_gpg_verifier_check_signature() now returns this object instead of a single valid/invalid boolean, but the idea is for OstreeRepo to also return this object for commit signature verification so it can be utilized at the CLI layer (and possibly by other programs).