fix opensslextra sb issue

pull/1/head
toddouska 2013-02-18 15:11:33 -08:00
parent a8f6baf37c
commit 59af8944cb
1 changed files with 1 additions and 1 deletions

View File

@ -7298,6 +7298,7 @@ int SetCipherList(Suites* s, const char* list)
&ssl->buffers.serverDH_Pub.length); &ssl->buffers.serverDH_Pub.length);
FreeDhKey(&dhKey); FreeDhKey(&dhKey);
InitRsaKey(&rsaKey, ssl->heap);
if (ret == 0) { if (ret == 0) {
length = LENGTH_SZ * 3; /* p, g, pub */ length = LENGTH_SZ * 3; /* p, g, pub */
length += ssl->buffers.serverDH_P.length + length += ssl->buffers.serverDH_P.length +
@ -7313,7 +7314,6 @@ int SetCipherList(Suites* s, const char* list)
if (!ssl->buffers.key.buffer) if (!ssl->buffers.key.buffer)
return NO_PRIVATE_KEY; return NO_PRIVATE_KEY;
InitRsaKey(&rsaKey, ssl->heap);
ret = RsaPrivateKeyDecode(ssl->buffers.key.buffer, &i, &rsaKey, ret = RsaPrivateKeyDecode(ssl->buffers.key.buffer, &i, &rsaKey,
ssl->buffers.key.length); ssl->buffers.key.length);
if (ret == 0) { if (ret == 0) {