ssl warning changes, submitted by Kevin Baca

This commit is contained in:
Todd A Ouska
2011-07-12 14:01:31 -07:00
parent 0c65a6b5cf
commit fb94d8b0b2

View File

@@ -393,7 +393,7 @@ Signer* GetCA(Signer* signers, byte* hash)
/* owns der, cyassl_int now uses too */ /* owns der, cyassl_int now uses too */
int AddCA(SSL_CTX* ctx, buffer der) int AddCA(SSL_CTX* ctx, buffer der)
{ {
word32 ret; int ret;
DecodedCert cert; DecodedCert cert;
Signer* signer = 0; Signer* signer = 0;
@@ -487,9 +487,10 @@ int AddCA(SSL_CTX* ctx, buffer der)
long neededSz; long neededSz;
int pkcs8 = 0; int pkcs8 = 0;
int pkcs8Enc = 0; int pkcs8Enc = 0;
int dynamicType; int dynamicType = 0;
(void)heap; (void)heap;
(void)dynamicType;
if (type == CERT_TYPE || type == CA_TYPE) { if (type == CERT_TYPE || type == CA_TYPE) {
XSTRNCPY(header, "-----BEGIN CERTIFICATE-----", sizeof(header)); XSTRNCPY(header, "-----BEGIN CERTIFICATE-----", sizeof(header));
@@ -643,7 +644,7 @@ int AddCA(SSL_CTX* ctx, buffer der)
{ {
EncryptedInfo info; EncryptedInfo info;
buffer der; /* holds DER or RAW (for NTRU) */ buffer der; /* holds DER or RAW (for NTRU) */
int dynamicType; int dynamicType = 0;
int eccKey = 0; int eccKey = 0;
info.set = 0; info.set = 0;
@@ -651,6 +652,8 @@ int AddCA(SSL_CTX* ctx, buffer der)
info.consumed = 0; info.consumed = 0;
der.buffer = 0; der.buffer = 0;
(void)dynamicType;
if (used) if (used)
*used = sz; /* used bytes default to sz, PEM chain may shorten*/ *used = sz; /* used bytes default to sz, PEM chain may shorten*/
@@ -2551,7 +2554,7 @@ int CyaSSL_set_compression(SSL* ssl)
CYASSL_ENTER("BIO_new_socket"); CYASSL_ENTER("BIO_new_socket");
if (bio) { if (bio) {
bio->type = BIO_SOCKET; bio->type = BIO_SOCKET;
bio->close = closeF; bio->close = (byte)closeF;
bio->eof = 0; bio->eof = 0;
bio->ssl = 0; bio->ssl = 0;
bio->fd = sfd; bio->fd = sfd;
@@ -2576,7 +2579,7 @@ int CyaSSL_set_compression(SSL* ssl)
{ {
CYASSL_ENTER("BIO_set_ssl"); CYASSL_ENTER("BIO_set_ssl");
b->ssl = ssl; b->ssl = ssl;
b->close = closeF; b->close = (byte)closeF;
/* add to ssl for bio free if SSL_free called before/instead of free_all? */ /* add to ssl for bio free if SSL_free called before/instead of free_all? */
return 0; return 0;
@@ -2625,12 +2628,11 @@ int CyaSSL_set_compression(SSL* ssl)
int BIO_free_all(BIO* bio) int BIO_free_all(BIO* bio)
{ {
BIO* next = bio;
CYASSL_ENTER("BIO_free_all"); CYASSL_ENTER("BIO_free_all");
while ( (bio = next) ) { while (bio) {
next = bio->next; BIO* next = bio->next;
BIO_free(bio); BIO_free(bio);
bio = next;
} }
return 0; return 0;
} }