diff options
| author | jmagne <jmagne@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2010-10-15 00:15:44 +0000 |
|---|---|---|
| committer | jmagne <jmagne@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2010-10-15 00:15:44 +0000 |
| commit | 0ed4d13e5207c0e69a6d5e3f0f91d7e08d55f76f (patch) | |
| tree | c1ac79b8a80038bf3691102fbf0131d0af362b54 /pki/base/tps/src/engine/RA.cpp | |
| parent | e7414ef11ff25e975984457f8580f9367760a8da (diff) | |
Fix Bugzilla Bug #223313 - should do random generated IV param for symmetric keys
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@1354 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/tps/src/engine/RA.cpp')
| -rw-r--r-- | pki/base/tps/src/engine/RA.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pki/base/tps/src/engine/RA.cpp b/pki/base/tps/src/engine/RA.cpp index 8d9e335fa..7f13710a2 100644 --- a/pki/base/tps/src/engine/RA.cpp +++ b/pki/base/tps/src/engine/RA.cpp @@ -1032,11 +1032,12 @@ SecurityLevel RA::GetGlobalSecurityLevel() { * output: * @param publickey_s public key provided by DRM * @param wrappedPrivateKey_s encrypted private key provided by DRM + * @param ivParam_s returned intialization vector */ void RA::RecoverKey(RA_Session *session, const char* cuid, const char *userid, char* desKey_s, char *b64cert, char **publicKey_s, - char **wrappedPrivateKey_s, const char *connId) + char **wrappedPrivateKey_s, const char *connId, char **ivParam_s) { int status; PSHttpResponse *response = NULL; @@ -1183,6 +1184,15 @@ void RA::RecoverKey(RA_Session *session, const char* cuid, *wrappedPrivateKey_s = PL_strdup(tmp); } + tmp = ra_pb->find_val_s("iv_param"); + if ((tmp == NULL) || (tmp == "")) { + RA::Error(LL_PER_PDU, "RecoverKey", + "did not get iv_param for recovered key in DRM response"); + } else { + RA::Debug(LL_PER_PDU, "ServerSideKeyGen", "got iv_param for recovered key =%s", tmp); + *ivParam_s = PL_strdup(tmp); + } + } else {// if content is NULL or status not 200 if (content != NULL) RA::Debug("RA::RecoverKey", "response from DRM error status %ld", s); |
