This commit is contained in:
Todd A Ouska
2011-07-13 12:51:04 -07:00
parent 9cd322ba91
commit 7ecb76d455
2 changed files with 6 additions and 4 deletions

View File

@ -797,15 +797,15 @@ int RsaPublicKeyDecode(const byte* input, word32* inOutIdx, RsaKey* key,
word32 inSz)
{
int length;
byte b;
if (GetSequence(input, inOutIdx, &length, inSz) < 0)
return ASN_PARSE_E;
key->type = RSA_PUBLIC;
b = input[*inOutIdx];
#ifdef OPENSSL_EXTRA
#ifdef OPENSSL_EXTRA
{
byte b = input[*inOutIdx];
if (b != ASN_INTEGER) {
/* not from decoded cert, will have algo id, skip past */
if (GetSequence(input, inOutIdx, &length, inSz) < 0)
@ -847,7 +847,8 @@ int RsaPublicKeyDecode(const byte* input, word32* inOutIdx, RsaKey* key,
if (GetSequence(input, inOutIdx, &length, inSz) < 0)
return ASN_PARSE_E;
}
} /* end if */
} /* openssl var block */
#endif /* OPENSSL_EXTRA */
if (GetInt(&key->n, input, inOutIdx, inSz) < 0 ||

View File

@ -491,6 +491,7 @@ int AddCA(SSL_CTX* ctx, buffer der)
(void)heap;
(void)dynamicType;
(void)pkcs8Enc;
if (type == CERT_TYPE || type == CA_TYPE) {
XSTRNCPY(header, "-----BEGIN CERTIFICATE-----", sizeof(header));