diff options
author | cfu <cfu@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2008-12-06 03:16:37 +0000 |
---|---|---|
committer | cfu <cfu@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2008-12-06 03:16:37 +0000 |
commit | d03c7f4b36139061e2a061ad54c9c8c0629052ae (patch) | |
tree | 9e6644afd04488cdb6b3a35fb8fbe9b07c738bd7 /pki/base/tps/src/processor | |
parent | 0d821e2d8c62daf9a4cf44e1e0b66e50909338ac (diff) | |
download | pki-d03c7f4b36139061e2a061ad54c9c8c0629052ae.tar.gz pki-d03c7f4b36139061e2a061ad54c9c8c0629052ae.tar.xz pki-d03c7f4b36139061e2a061ad54c9c8c0629052ae.zip |
bugzilla 474659 - move random number generation form TPS to TKS
fix for missing bytes
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@164 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/tps/src/processor')
-rw-r--r-- | pki/base/tps/src/processor/RA_Processor.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pki/base/tps/src/processor/RA_Processor.cpp b/pki/base/tps/src/processor/RA_Processor.cpp index e6e5dd0f8..f5128f575 100644 --- a/pki/base/tps/src/processor/RA_Processor.cpp +++ b/pki/base/tps/src/processor/RA_Processor.cpp @@ -2171,9 +2171,11 @@ int RA_Processor::EncryptData(Buffer &CUID, Buffer &version, Buffer &in, Buffer char *preStr = strstr((char *)p, "data="); if (preStr != NULL) { p = &preStr[5]; - char pstr[PLAINTEXT_CHALLENGE_SIZE]; + char pstr[PLAINTEXT_CHALLENGE_SIZE*3+1]; strncpy(pstr, p, PLAINTEXT_CHALLENGE_SIZE*3); + pstr[PLAINTEXT_CHALLENGE_SIZE*3] = '\0'; preEncData = Util::URLDecode(pstr); +//RA::DebugBuffer("RA_Processor::EncryptData", "preEncData=", preEncData); } // get encrypted data @@ -2182,6 +2184,7 @@ int RA_Processor::EncryptData(Buffer &CUID, Buffer &version, Buffer &in, Buffer if (rcStr != NULL) { rcStr = &rcStr[14]; encryptedData = Util::URLDecode(rcStr); +//RA::DebugBuffer("RA_Processor::EncryptData", "encryptedData=", encryptedData); } } } |