Ecosyste.ms: OpenCollective

An open API service for software projects hosted on Open Collective.

github.com/QubesOS/qubes-rpm-oxide

Rust libraries for processing RPM packages
https://github.com/QubesOS/qubes-rpm-oxide

Treat EACCES the same as EPERM

This is necessary for /dev/null writes to work properly.

cc1c996c301c6fe43f8fbdf36bf7aa02a0c68ee7 authored almost 4 years ago
Remove an unused import

This fixes a compiler warning.

1ff02fc22cf0e372f6bcb95cdf5f783a826841f5 authored almost 4 years ago
Add a comment explaining the header prelude

Suggested-by: Marek Marczykowski-Górecki <[email protected]>

06af5601cd8de8fb419bc82905b66f8642a3af1d authored almost 4 years ago
Add a proper, tested cryptographic validator API

The new API properly distinguishes between trusted and untrusted
digests, and also has unit-tests.

389da431717694b1e4a7a9b49a6e53cb89b33b7a authored almost 4 years ago
Fix documentation of `openpgp-parser`

It previously had a clone of the (former) `rpm-syntax` documentation.

4295da6b5f02951130a7abda860ccac18a50e0e5 authored almost 4 years ago
Fix a silly compilation error

Good catch, rustc!

efec6560cbfb955e3c1497f6aa8f1191851332b2 authored almost 4 years ago
Add NUL-termination checks

These are needed to ensure malformed packages are detected.

33f82f1df6be89f50b52e83e752848c36de80d93 authored almost 4 years ago
Only open an existing file if it is /dev/null

Otherwise it is rather risky.

3e7472ddac4d8119d110d3e6fe2a9c9ba48f7830 authored almost 4 years ago
Streaming support

This modifies the code to allow reading from a pipe or socket, avoiding
the requirement to buffe...

9ce0827948db0da52b5657d55369c8ec82ce962e authored almost 4 years ago
Improve signature verification API

A 5-tuple is replaced with a proper struct, and it is now possible to
preserve the header+payloa...

8d2f2c1452e8d21dd67f532b248388002141eef7 authored almost 4 years ago
Atomically write output files

This is a prerequisite for streaming.

5c05402514a9f0d833f0ad6316489d98385a73b6 authored almost 4 years ago
Move RPM cryptography to its own crate

No change in behavior.

ac80a9c298e20b2aabded44236359392517033db authored almost 4 years ago
Use ‘rpm-writer’ in ‘rpmcanon’

This makes the code simpler and ― more importantly ― far more
maintainable.

fd0e916c9555a21ff8ae06675a8c13c067119774 authored almost 4 years ago
Add RPM header emitter

Emitting types with non-zero alignment is not yet implemented.

2051b06d0e5d5b24c3f1d5a86fcbb749708061b5 authored almost 4 years ago
Explain why a header digest is trusted

bc0951a0b9810c276761dac7445d2091c98870c5 authored almost 4 years ago
Clean up OpenPGP parser

This removes some unused helper functions.

540314a1afa70a01708dbd827dec288a2ba83dc1 authored almost 4 years ago
Simplify OpenPGP packet parser

This massively simplifies the OpenPGP packet parser, largely by removing
the unneeded `Subpacket...

138639b16ac17daa7f6947d39bb07fb960c9fd63 authored almost 4 years ago
Move initialization code to application

Initialization should be the job of the application, not the library.

10558c8b0ce234789acb49920926ef26dec589c3 authored almost 4 years ago
Reject packages without signed headers

DNF rejects them when signature verification is turned on, and this is
the default for remote re...

486fd0fe65ff418c2d53a08540ccf4a009e1776c authored almost 4 years ago
Allow various options to be configured at run-time

This is necessary to parse Zoom RPMs. In particular, the list of
allowed hash algorithms must b...

4870d25e9b92534836e96ec3f9319d7a80b598b0 authored almost 4 years ago
Simplify imports

openpgp_parser’s buffer module had only two items. Just export both
from the root.

73e08148903286b402387b5c5212403ae5475ae9 authored almost 4 years ago
Better error messages for bad algorithms

Zoom and Google Chrome RPMs are signed with SHA-1!

44fb1f54e76513ac672505e5edc18c8c27186e7d authored almost 4 years ago
Allow mismatched string tags

This is necessary to even parse signed RPMs generated by qubes-builder

08cec2373bb13550fcc33b9407e1c0358c26f07f authored almost 4 years ago
Remove dead code

These repositories are not used.

5866e8db5d0312dfcf6832fa714b328ab78120cb authored almost 4 years ago
Only open output file after signature checks pass

This avoids writing an empty file.

e4ba322d1dfff48630359afa86ca5ed72ab38560 authored almost 4 years ago
Simplify the timestamp reader

d1f105b258e333695802107942f4aed080c3be64 authored almost 4 years ago
Fix lead generation on little-endian machines

cd547ac696744a5cec324bf6756b873e75a549fa authored almost 4 years ago
Check for correct usage of mkfifo.sh

3ca9df88eef78e99ba19fe475873967a457f32ec authored almost 4 years ago
Security fix: reject trailing junk

This lead to a massive refactoring, removing `Reader::get`.

7610480293129f0ae1fd2150b03dc00497523305 authored almost 4 years ago
Parse fingerprint from signatures

Also allow key ID to be hashed

5a6fd2301e3985cbf506f199715824fb0c46550a authored almost 4 years ago
Add script used to test rpmcanon

It checks that the output of rpmcanon is installable.

ea69d000e448705023698352975f7de78a5a171a authored almost 4 years ago
Add README for openpgp-parser

This is expected for Rust crates

97dab2868d430f110181cd81325190f18afd367a authored almost 4 years ago
Test that signature creation times are correct

This will help catch bugs.

8108c051cae0996ea56bb106968680b9b336b2ba authored almost 4 years ago
Switch to getters for signature info

Signature info is immutable, so use getters instead of public fields.
Also require creation time...

26be96e437e97fd1e08a15f4c75ebf6f88330651 authored almost 4 years ago
Support for packet encapsulation

This is needed to canonicalize signatures.

9c673647b4345c6f6142f6ceac59846f3b396f91 authored almost 4 years ago
rustfmt

40ffced14ebacaddd618822d265f7ab93a140f52 authored almost 4 years ago
Use an iterator for signature subpackets

This is part of a major refactor of the OpenPGP code.

5e8e79f9029ddd30fe013a64ee849ca8d273221f authored almost 4 years ago
Remove dead code and useless test

This test came from ‘cargo new’ and serves no purpose.

6c12a7feab07ff57ba9714e5bb5560ad1a4a5a95 authored almost 4 years ago
Add `Buffer::get_read()`

See doc comment for details

4965b5dcb08f3a7ddbe83c6b9843a495fd21c764 authored almost 4 years ago
Better doc test for Reader::read

The new test better explains what is happening.

d56810bb08dcbb724ae2546dd30484443a1fff8e authored almost 4 years ago
Document an undocumented function

42fb888cc06af21e15772af2f0d561cd7018975a authored almost 4 years ago
rpmcanon: verify signatures and regenerate lead

rpmcanon now verifies signatures, and regenerates the lead from the
header.

8c450a0fd0ee921b313e87b849a00d96ff0d8d76 authored almost 4 years ago
Move signature header code to separate module

Another refactoring.

7df1d24be41f0cf771bc2a6812d063ce4f6216bc authored about 4 years ago
Move immutable header functions to separate module

No change in functionality.

9012886c1c1f5801486c1aab9827dff5a3a40b3c authored about 4 years ago
Another refactoring

13abd9f2bc916b58575eaf62d2ba82d3d97041aa authored about 4 years ago
Simplify check_hex()

Minor refactoring that simplifies the code

82551e81245dc7c6c4ba47b4f6c4f9f038c5f9c7 authored about 4 years ago
Remove the HeaderType enum

It didn’t pull its weight.

b2eacdad6603a7f2e2a03860259cb75b365344c1 authored about 4 years ago
Move common header code to its own module

Yet another refactoring.

9ac7c075256f4d21ddddbcb995372c88d5161bb3 authored about 4 years ago
Move tag data handling to its own module

Purely a simple refactoring.

a1eae71403b7f1302c2c308b33e886686df74785 authored about 4 years ago
Package lead validation

This validates the package lead against the package header. This
required extracting the name, ...

e87e7f196e0979c904dc49c71b80251ebb5aa1e2 authored about 4 years ago
Implement RPM canonicalization tool

This implements rpmcanon, an RPM canonicalization tool. Specifically,
rpmcanon takes an input R...

55a02388dfd205b1f15e9d0957a5a08d2cb47433 authored about 4 years ago
Check that the lead and header are consistent

The package lead must be consistent with the header. Ensure this by
checking that the package n...

170c3fe97d55e1ace8571565206469ff96dfc1c8 authored about 4 years ago
Expose the signature bytes in the public API

This allows them to be reserialized later.

375cb6b6598a55d51d0482b43b1b6d96fd99b302 authored about 4 years ago
Add a public TagData constructor

This allows serializing user-created TagData entries.

cb0750a8dcf4d126cd335a39852b008de0188946 authored about 4 years ago
Make RPM_HDRMAGIC public

It is useful for other tools.

2504e9a859a214750a016b3b835b084c87c7895b authored about 4 years ago
Split digests and signatures into their own modules

Purely a readability improvement

fec0ba9f3e99311994750f295f258e1ba1ce4635 authored about 4 years ago
rpmcheck: Ensure recent DNF bug can’t be exploited

This makes rpmcheck sufficient to ensure the recent DNF bug can’t be
exploited. Specifically, i...

dedd59f515d8d655b80fd5cdf743b466b5eb4bb9 authored about 4 years ago
Better signature abstraction

Asking users to provide a separate digest context to check a signature
makes little sense and is...

873d51c8baed109d59fc72489191afd370f7fc0f authored about 4 years ago
Integration-test the RPM digest code

by checking that we can verify a real RPM package’s payload digest.

f35a62487b3c33911754369eccbedaa151c9d008 authored about 4 years ago
Add RPM digest code

This adds Rust bindings to RPM’s built-in digest functionality.

56ae8e4387ac295468b67af9601d356747c9be2e authored about 4 years ago
Tests: fail if RPM returns an unexpected tag type

In production, it is better to just return ‘None’, but in tests, panic
so that the developers kn...

511dd6917515c34592ffdb190b69e27a3f7e57fe authored about 4 years ago
Forbid improper ctypes in FFI code

It is always a programming error.

c6394c806b28ba61fb8a7dd2c5755766d6aa6ec1 authored about 4 years ago
Add simple ‘rpmcheck’ executable

This can be used to validate an RPM file before passing it to
‘rpmkeys --checksig’.

9bd3cd2ba5ed4d1ac5ef631210369e801f1b9515 authored about 4 years ago
Add package-reading functions

rpm-parser can now read a real-world RPM package!

8e2ac9f39f17ecbfaec11afc4aade68c3fbb930f authored about 4 years ago
Add lead parsing routines

These will be needed to actually parse packages. Fortunately, the lead
is simple enough I could...

f564ac39290b26567f9f48762d35b62ecb89c3ee authored about 4 years ago
Refactor header parsing code

Using an ‘FnMut’ closure is much nicer than emulating it with an enum.

4002ffa6fbfb08e0e45b5a76e6d5498fb1db6e99 authored about 4 years ago
Use new Reader methods

This eliminates a bunch of crufty expects.

1f769a35d1a65e4085aa7b1c2f98416639bff93e authored about 4 years ago
Subpacket::subpacket: do not return `Option`

This makes for clearer code.

f7c06180a54fb09da08180ecfca3d38dd88a15ff authored about 4 years ago
Don’t temporarily create invalid packets

This avoids needing an explanatory comment.

b622a30f9455e46d8031e7fce6785d3ed7b52131 authored about 4 years ago
Remove test for signature from RPM package

This is already tested by the RPM parser’s own test suite.

575c538273d889e697c5bc4002c19db70db5f322 authored about 4 years ago
Fix documentation for be_*_offset

Some of the documentation claimed that these methods read little-endian
integers. The code was ...

e8d2d21b64be3854f90eefeca2679f165cd44e60 authored about 4 years ago
Add buffer functions to read unsigned integers

Both big- and little-endian are supported.

d92849005cb5f700dd925bb1d1d3c68ecd196f53 authored about 4 years ago
Extract payload digest and deny warnings

The payload digest is now extracted from immutable headers, as is its
algorithm. Warnings are n...

dce6a55fe416a2eb92f1862515d03a8f18c2c506 authored about 4 years ago
Working RPM header parser!

This successfully parses the Lua 5.4.2-1 RPM from Fedora 33!

a687b129f1dbdf21364c985207b99c2275c71f96 authored about 4 years ago
OpenPGP parser improvements

These will be used by the RPM header parser. See the diff for details.

13a58f330357809d4a62235f1abd5c42e11914ce authored about 4 years ago
EdDSA signatures MUST be v4

just as with ECDSA.

0393b37bc9060aabfa132d466abcebdf7eecba4c authored about 4 years ago
Multiple subpackets with the same type is invalid

In the interest of strictness, forbid this.

26b5119687e947bc5681371f3c492590dc5414a9 authored about 4 years ago
Forbid revocable packets in signatures

They are only used in certification signatures, so they are pointless in
data signatures. Rejec...

8eb44f0c5773e80c2da00b07a29a7f68aa38b786 authored about 4 years ago
Reserved algorithms aren’t supported

This allows us to give a better error message.

22d8522e5ed3c7d5acc3e02906a1f3c97b7e0a31 authored about 4 years ago
Test get_be_u32

As is often the case, the tests are nearly as long as the code.

9f443a5611edce011ebd2af3663511d935b79e04 authored about 4 years ago
Add API’s for reading big- and little- endian integers

These APIs will be quite useful for the RPM parser.

a964b703abb2a9dcaf6acf426ba20cf618248c2d authored about 4 years ago
An actual working OpenPGP signature parser

This parses a signature from a real RPM file!

6d94cc189545467bfe1131ffe52d8c2ec95a2023 authored about 4 years ago
Remove security policy

This needs to be checked with Marek before it is published.

1fddb164455907753d3ce11b3a0d5adfcebc62a1 authored about 4 years ago
Beginnings of an OpenPGP parser

So far, this just includes some basic functions for reading packets.

49cbc5ec3b27ca1d7c72cb1eac50c10e9c074739 authored about 4 years ago
Initial commit of the qubes-rpm project

Yay!

fbca6f93a8aa75ec45fdb05a5c9759602b8f7b1d authored about 4 years ago