pkcs7: fix hash algo generation
This commit is contained in:
parent
f57410af7b
commit
1f0415c021
6
pkcs7.py
6
pkcs7.py
|
@ -39,7 +39,9 @@ def to_cms_cert_id(cert):
|
|||
})
|
||||
|
||||
def to_cms_hash_algo(algo):
|
||||
return algo.name.lower()
|
||||
return {
|
||||
'algorithm': algo.name.lower(),
|
||||
}
|
||||
|
||||
def from_cms_hash_algo(desc):
|
||||
algo, *params = desc['algorithm'].native.split('_')
|
||||
|
@ -59,7 +61,7 @@ def to_cms_asym_algo(key, pad):
|
|||
else:
|
||||
raise ValueError('unsupported asymmetric PKCS#7 key: {}'.format(key.__class__.__name__))
|
||||
return {
|
||||
'algorithm': algo
|
||||
'algorithm': algo,
|
||||
}
|
||||
|
||||
def from_cms_asym_algo(desc):
|
||||
|
|
Loading…
Reference in New Issue