summaryrefslogtreecommitdiffstats
path: root/base/common/python
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2017-04-11 14:18:32 -0400
committerAde Lee <alee@redhat.com>2017-04-12 15:19:34 -0400
commiteb7c9139c1ab017a8749d87e163e9dcc42037fb2 (patch)
tree3f2b2ab15fe3427b29275c55da35501627dce445 /base/common/python
parent20a307e4683e62b033f7662ed4aa2f18dfad6226 (diff)
downloadpki-eb7c9139c1ab017a8749d87e163e9dcc42037fb2.tar.gz
pki-eb7c9139c1ab017a8749d87e163e9dcc42037fb2.tar.xz
pki-eb7c9139c1ab017a8749d87e163e9dcc42037fb2.zip
Modified CRMFPopClient to use correct wrapping for encrypt case
When the server cannot do key wrapping using the AES KeyWrap, probably because the backend HSM cannot do key wrapping, then there is a setting to allow it to use encrypt/decrypt instead. If the key wrap algorithm is something simple like 3DES or AES-CBC, then the client can just use key wrapping to wrap the key on its token, and the server can use an encryption algorithm to decrypt. The client does not need to know that the server cannot handle a key wrap, because keywrapping and encryption are pretty much the same mechanism - just either in server memory or not. When we do key wrapping using AES KeyWrap though, there is no corresponding encryption algorithm used to decrypt. So the server cannot simply decrypt a message wrapped with AES Keywrap (or at least not in any obvious way). So in this case, the client needs to know if the server can handle keywrap. The patch therefore does the following: 1. For CRMFPopClient, adds a command line option to specify if key wrapping or encryption is required. 2. Reads an environment variable if no option is provided. 3. If encryption is specified, uses key wrapping using AES-CBC which can be decrypted on the server side. 4. For cert-client, contacts the server to determine from the CAInfoResource if keywrapping is supported. Change-Id: If66f51c929cfde1c0ff3b9f39cb57b92fcdc150c
Diffstat (limited to 'base/common/python')
0 files changed, 0 insertions, 0 deletions