Closed grego closed 4 years ago
For some reason github has decided not to make me watch my own repos by default.
Thanks for the PR, I'll merge this for now seems as compiling is better than not compiling.
But now that i've looked into it, it seems pubkey_algo is actually intended to be a character an not just a byte. So it's probably best that we return a u8 so it interlopes with b'R'
in rust.
lib/libalpm/signing.c
377: pgpkey->pubkey_algo = '?';
379: switch(key->subkeys->pubkey_algo) {
383: pgpkey->pubkey_algo = 'R';
387: pgpkey->pubkey_algo = 'D';
402: pgpkey->pubkey_algo = 'E';
410: * here if we have a valid pubkey_algo. */
411: if (pgpkey->pubkey_algo == '?') {
413: "unknown public key algorithm: %d\n", key->subkeys->pubkey_algo);
`
On several ARM- and PowerPC-based platforms,
c_char
is defined asu8
, which, without casting, prevents compiling on these platforms.