Thomas Goirand 85d3658d62 Fix kms_keymaster under Python 3
Depending on how the key was stored in Barbican, it may come out of
Castellan as a native string, which would not be suitable on Python 3.
Now, check that the secret is a byte string, and if it isn't, encode as
UTF-8 (to match Barbican's internal encoding).

Change-Id: I6da047716c05e4f2a9e1e74ca19afb62e812d172
Closes-Bug: #1847755
2019-10-13 21:58:50 -07:00
..
2019-10-13 21:58:50 -07:00