diff options
author | Michael Schroeder <mls@suse.de> | 2014-04-04 16:18:06 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2014-04-04 16:18:06 +0200 |
commit | c8164bfecf2ba8bcf4c24329534d3104f19da73c (patch) | |
tree | 8063c2f9807984df9b17a0489661a09db456d86a /ext | |
parent | fdff34f4855b84438b5bff3f79cba33d6bf35865 (diff) | |
download | libsolv-c8164bfecf2ba8bcf4c24329534d3104f19da73c.tar.gz libsolv-c8164bfecf2ba8bcf4c24329534d3104f19da73c.tar.bz2 libsolv-c8164bfecf2ba8bcf4c24329534d3104f19da73c.zip |
[ABI BREAKAGE] add support for SHA224/384/512
We also use this to reorder knownid.h, thus breaking
the libsolv ABI. Next step is to bump the version.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/repo_pubkey.c | 6 | ||||
-rw-r--r-- | ext/repo_rpmdb.c | 3 | ||||
-rw-r--r-- | ext/solv_pgpvrfy.c | 8 |
3 files changed, 17 insertions, 0 deletions
diff --git a/ext/repo_pubkey.c b/ext/repo_pubkey.c index c83bd55..d8496dc 100644 --- a/ext/repo_pubkey.c +++ b/ext/repo_pubkey.c @@ -257,6 +257,12 @@ pgphashalgo2type(int algo) return REPOKEY_TYPE_SHA1; if (algo == 8) return REPOKEY_TYPE_SHA256; + if (algo == 9) + return REPOKEY_TYPE_SHA384; + if (algo == 10) + return REPOKEY_TYPE_SHA512; + if (algo == 11) + return REPOKEY_TYPE_SHA224; return 0; } diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c index f6c8f0d..52daaba 100644 --- a/ext/repo_rpmdb.c +++ b/ext/repo_rpmdb.c @@ -1602,7 +1602,10 @@ solvable_copy_cb(void *vcbdata, Solvable *r, Repodata *fromdata, Repokey *key, K break; case REPOKEY_TYPE_MD5: case REPOKEY_TYPE_SHA1: + case REPOKEY_TYPE_SHA224: case REPOKEY_TYPE_SHA256: + case REPOKEY_TYPE_SHA384: + case REPOKEY_TYPE_SHA512: repodata_set_bin_checksum(data, handle, keyname, key->type, (const unsigned char *)kv->str); break; default: diff --git a/ext/solv_pgpvrfy.c b/ext/solv_pgpvrfy.c index 951856b..5dad742 100644 --- a/ext/solv_pgpvrfy.c +++ b/ext/solv_pgpvrfy.c @@ -415,10 +415,18 @@ solv_pgpvrfy(const unsigned char *pub, int publ, const unsigned char *sig, int s hashl = 32; /* SHA-256 */ oid = (unsigned char *)"\023\060\061\060\015\006\011\140\206\110\001\145\003\004\002\001\005\000\004\040"; break; + case 9: + hashl = 48; /* SHA-384 */ + oid = (unsigned char *)"\023\060\101\060\015\006\011\140\206\110\001\145\003\004\002\002\005\000\004\060"; + break; case 10: hashl = 64; /* SHA-512 */ oid = (unsigned char *)"\023\060\121\060\015\006\011\140\206\110\001\145\003\004\002\003\005\000\004\100"; break; + case 11: + hashl = 28; /* SHA-224 */ + oid = (unsigned char *)"\023\060\061\060\015\006\011\140\206\110\001\145\003\004\002\004\005\000\004\034"; + break; default: return 0; /* unsupported hash algo */ } |