mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
pycryptodome adds RSA to the key header which the openssl
PEM decoder does not recognise
This commit is contained in:
parent
206dec63ff
commit
60113248b1
@ -134,6 +134,7 @@ class RSAX931Verifier(object):
|
||||
:param str pubdata: The RSA public key in PEM format
|
||||
'''
|
||||
pubdata = salt.utils.to_bytes(pubdata, 'ascii')
|
||||
pubdata = pubdata.replace('RSA ', '')
|
||||
self._bio = libcrypto.BIO_new_mem_buf(pubdata, len(pubdata))
|
||||
self._rsa = c_void_p(libcrypto.RSA_new())
|
||||
if not libcrypto.PEM_read_bio_RSA_PUBKEY(self._bio, pointer(self._rsa), None, None):
|
||||
|
Loading…
Reference in New Issue
Block a user