update releaseWizard.py to support offline gpg key (#12085)

porting analogous change from solr: https://github.com/apache/solr/pull/1288
This commit is contained in:
Michael Gibney 2023-01-19 08:41:35 -05:00 committed by GitHub
parent a9fd21b6af
commit fa5dcbad9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1131,14 +1131,14 @@ def configure_pgp(gpg_todo):
res = run("gpg --list-secret-keys %s" % gpg_fingerprint)
print("Found key %s on your private gpg keychain" % gpg_id)
# Check rsa and key length >= 4096
match = re.search(r'^sec +((rsa|dsa)(\d{4})) ', res)
match = re.search(r'^sec#? +((rsa|dsa)(\d{4})) ', res)
type = "(unknown)"
length = -1
if match:
type = match.group(2)
length = int(match.group(3))
else:
match = re.search(r'^sec +((\d{4})([DR])/.*?) ', res)
match = re.search(r'^sec#? +((\d{4})([DR])/.*?) ', res)
if match:
type = 'rsa' if match.group(3) == 'R' else 'dsa'
length = int(match.group(2))