From 7b3df7e287eb544a0bacba93abeea48e72e49db6 Mon Sep 17 00:00:00 2001 From: Christina Fu Date: Sun, 30 Sep 2012 17:40:43 -0700 Subject: https://fedorahosted.org/pki/ticket/252 - TMS - ECC Key Recovery --- base/tps/src/engine/RA.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'base/tps/src/engine/RA.cpp') diff --git a/base/tps/src/engine/RA.cpp b/base/tps/src/engine/RA.cpp index 2502cf259..436225045 100644 --- a/base/tps/src/engine/RA.cpp +++ b/base/tps/src/engine/RA.cpp @@ -1233,7 +1233,14 @@ void RA::RecoverKey(RA_Session *session, const char* cuid, goto loser; } else { RA::Debug(LL_PER_PDU, "RecoverKey", "got public key =%s", tmp); - *publicKey_s = PL_strdup(tmp); + char *tmp_publicKey_s = PL_strdup(tmp); + Buffer *decodePubKey = Util::URLDecode(tmp_publicKey_s); + *publicKey_s = + BTOA_DataToAscii(decodePubKey->getBuf(), decodePubKey->getLen()); + if (tmp_publicKey_s) + PR_Free (tmp_publicKey_s); + if (decodePubKey) + PR_Free(decodePubKey); } tmp = NULL; @@ -1251,7 +1258,7 @@ void RA::RecoverKey(RA_Session *session, const char* cuid, 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); + RA::Debug(LL_PER_PDU, "RecoverKey", "got iv_param for recovered key =%s", tmp); *ivParam_s = PL_strdup(tmp); } -- cgit