Remove more 'RSA Only' references
This commit is contained in:
parent
66f45feea5
commit
4cffe77fa0
@ -30,9 +30,9 @@ ASN1TIME_FMT = str('%Y%m%d%H%M%SZ'.encode('utf8'))
|
|||||||
OPENSSLTIME_FMT = '%b %e %T %Y GMT'
|
OPENSSLTIME_FMT = '%b %e %T %Y GMT'
|
||||||
|
|
||||||
|
|
||||||
class OnlyRSAKeyException(Exception):
|
class UnsupportedPkEncryption(Exception):
|
||||||
'''
|
'''
|
||||||
When we encounter other than RSA crypto material
|
When we encounter unsupported encryption algorithms
|
||||||
'''
|
'''
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ def get_cert_pubkey(cert):
|
|||||||
|
|
||||||
def get_priv_pubkey(priv):
|
def get_priv_pubkey(priv):
|
||||||
'''
|
'''
|
||||||
Get the pubkey of a RSA private key
|
Get the pubkey of a private key
|
||||||
'''
|
'''
|
||||||
|
|
||||||
priv_crypto = priv.to_cryptography_key()
|
priv_crypto = priv.to_cryptography_key()
|
||||||
@ -196,7 +196,7 @@ def order_x509(x509_objects, root_issuers):
|
|||||||
|
|
||||||
def load_root_issuers():
|
def load_root_issuers():
|
||||||
'''
|
'''
|
||||||
Return the list of CA roots (RSA only)
|
Return the list of CA roots
|
||||||
'''
|
'''
|
||||||
root_issuers = None
|
root_issuers = None
|
||||||
|
|
||||||
@ -223,8 +223,8 @@ def load_root_issuers():
|
|||||||
root_cert.get_issuer(),
|
root_cert.get_issuer(),
|
||||||
root_cert.has_expired(),
|
root_cert.has_expired(),
|
||||||
get_cert_pubkey(root_cert))
|
get_cert_pubkey(root_cert))
|
||||||
except OnlyRSAKeyException as onlyrsa_exception:
|
except UnsupportedPkEncryption as unsupported_crypto_exception:
|
||||||
logging.debug(onlyrsa_exception)
|
logging.debug(unsupported_crypto_exception)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
root_issuers = {str(root_cert.get_subject()): root_cert
|
root_issuers = {str(root_cert.get_subject()): root_cert
|
||||||
@ -236,7 +236,7 @@ def handle_args():
|
|||||||
'''
|
'''
|
||||||
Handle tool arguments
|
Handle tool arguments
|
||||||
'''
|
'''
|
||||||
parser = ArgumentParser(description='Reorder X509/RSA data for'
|
parser = ArgumentParser(description='Reorder X509/Private key data for'
|
||||||
' hosting use')
|
' hosting use')
|
||||||
|
|
||||||
loggrp = parser.add_mutually_exclusive_group()
|
loggrp = parser.add_mutually_exclusive_group()
|
||||||
@ -369,7 +369,7 @@ def main():
|
|||||||
logging.info('OK: Public key of provided certificate'
|
logging.info('OK: Public key of provided certificate'
|
||||||
' and RSA private key match')
|
' and RSA private key match')
|
||||||
elif len(pk_objects) > 1:
|
elif len(pk_objects) > 1:
|
||||||
raise CertificateComponentException('More than one RSA private key'
|
raise CertificateComponentException('More than one private key'
|
||||||
' found in input.'
|
' found in input.'
|
||||||
' Aborting')
|
' Aborting')
|
||||||
elif pk_objects:
|
elif pk_objects:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user