mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01:00
fix pgp pubkey parsing
the base64 checksum must not be included in the key data. Newer rpm don't like that.
This commit is contained in:
parent
e3f0821bd4
commit
f707e9a22e
@ -61,16 +61,24 @@ class Checker:
|
||||
|
||||
key = ''
|
||||
line = fd.readline()
|
||||
crc = None
|
||||
while line:
|
||||
if line[0:12] == "-----END PGP":
|
||||
break
|
||||
line = line.rstrip()
|
||||
key += line
|
||||
line = fd.readline()
|
||||
if (line[0] == '='):
|
||||
crc = line[1:]
|
||||
line = fd.readline()
|
||||
break
|
||||
else:
|
||||
key += line
|
||||
line = fd.readline()
|
||||
fd.close()
|
||||
if not line or line[0:12] != "-----END PGP":
|
||||
raise KeyError(file, "not a pgp public key")
|
||||
|
||||
# TODO: compute and compare CRC, see RFC 2440
|
||||
|
||||
bkey = base64.b64decode(key)
|
||||
|
||||
r = self.ts.pgpImportPubkey(bkey)
|
||||
|
Loading…
Reference in New Issue
Block a user