windows and no filesystem build warnings

This commit is contained in:
Jacob Barthelmeh
2017-01-25 13:24:19 -07:00
parent 79ea6b78bb
commit ff8da2d4fe
5 changed files with 16 additions and 10 deletions

View File

@ -70,6 +70,7 @@ int wolfSSL_BIO_gets(WOLFSSL_BIO* bio, char* buf, int sz)
}
switch (bio->type) {
#ifndef NO_FILESYSTEM
case WOLFSSL_BIO_FILE:
#if defined(MICRIUM) || defined(LSR_FS) || defined(EBSNET)
WOLFSSL_MSG("XFGETS not ported for this system yet");
@ -83,7 +84,7 @@ int wolfSSL_BIO_gets(WOLFSSL_BIO* bio, char* buf, int sz)
}
#endif
break;
#endif /* NO_FILESYSTEM */
case WOLFSSL_BIO_MEMORY:
case WOLFSSL_BIO_BIO:
{

View File

@ -6833,6 +6833,7 @@ int wolfSSL_CTX_SetTmpDH_file(WOLFSSL_CTX* ctx, const char* fname, int format)
#endif /* NO_DH */
#endif /* NO_FILESYSTEM */
#ifdef OPENSSL_EXTRA
/* put SSL type in extra for now, not very common */
@ -7500,6 +7501,7 @@ int wolfSSL_use_certificate(WOLFSSL* ssl, WOLFSSL_X509* x509)
}
#endif /* NO_CERTS */
#ifndef NO_FILESYSTEM
int wolfSSL_use_certificate_file(WOLFSSL* ssl, const char* file, int format)
{
@ -7581,6 +7583,8 @@ int wolfSSL_use_RSAPrivateKey_file(WOLFSSL* ssl, const char* file, int format)
return wolfSSL_use_PrivateKey_file(ssl, file, format);
}
#endif /* NO_FILESYSTEM */
/* Copies the master secret over to out buffer. If outSz is 0 returns the size
* of master secret.
@ -7624,6 +7628,7 @@ int wolfSSL_SESSION_get_master_key_length(const WOLFSSL_SESSION* ses)
#endif /* OPENSSL_EXTRA */
#ifndef NO_FILESYSTEM
#ifdef HAVE_NTRU
int wolfSSL_CTX_use_NTRUPrivateKey_file(WOLFSSL_CTX* ctx, const char* file)
@ -12902,7 +12907,7 @@ static WOLFSSL_EVP_MD *wolfSSL_EVP_get_md(const unsigned char type)
{
const struct s_ent *ent ;
WOLFSSL_ENTER("EVP_get_md");
for( ent = md_tbl; ; ent++){
for( ent = md_tbl; ent->name != NULL; ent++){
if(type == ent->macType) {
return (WOLFSSL_EVP_MD *)ent->name;
}
@ -13879,7 +13884,7 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD *md)
/* WOLFSSL_SUCCESS on ok */
int wolfSSL_EVP_DigestUpdate(WOLFSSL_EVP_MD_CTX* ctx, const void* data,
unsigned long sz)
size_t sz)
{
WOLFSSL_ENTER("EVP_DigestUpdate");
@ -21279,6 +21284,7 @@ WOLFSSL_DSA* wolfSSL_DSA_generate_parameters(int bits, unsigned char* seed,
WOLFSSL_ENTER("wolfSSL_DSA_generate_parameters()");
(void)cb;
(void)CBArg;
dsa = wolfSSL_DSA_new();
if (dsa == NULL) {
@ -21286,7 +21292,7 @@ WOLFSSL_DSA* wolfSSL_DSA_generate_parameters(int bits, unsigned char* seed,
}
if (wolfSSL_DSA_generate_parameters_ex(dsa, bits, seed, seedLen,
counterRet, hRet, (void*)cb) != SSL_SUCCESS) {
counterRet, hRet, NULL) != SSL_SUCCESS) {
wolfSSL_DSA_free(dsa);
return NULL;
}
@ -22410,7 +22416,7 @@ int wolfSSL_PEM_write_bio_PrivateKey(WOLFSSL_BIO* bio, WOLFSSL_EVP_PKEY* key,
}
#endif /* defined(WOLFSSL_KEY_GEN) || defined(WOLFSSL_CERT_GEN) */
#if defined(WOLFSSL_KEY_GEN) && !defined(NO_RSA)
#if defined(WOLFSSL_KEY_GEN) && !defined(NO_RSA) && !defined(HAVE_USER_RSA)
/* return code compliant with OpenSSL :
* 1 if success, 0 if error

View File

@ -777,7 +777,7 @@ WOLFSSL_API int wolfSSL_EVP_SignUpdate(WOLFSSL_EVP_MD_CTX *ctx, const void *data
static int md2nid(int md)
{
const char * d ;
d = (const char *)wolfSSL_EVP_get_md(md);
d = (const char *)wolfSSL_EVP_get_md((const unsigned char)md);
if(XSTRNCMP(d, "SHA", 3) == 0)return NID_sha1;
if(XSTRNCMP(d, "MD5", 3) == 0)return NID_md5;
return 0;
@ -817,7 +817,6 @@ WOLFSSL_API int wolfSSL_EVP_SignFinal(WOLFSSL_EVP_MD_CTX *ctx, unsigned char *si
default:
return 0;
}
return 1;
}
WOLFSSL_API int wolfSSL_EVP_VerifyInit(WOLFSSL_EVP_MD_CTX *ctx, const WOLFSSL_EVP_MD *type)
@ -825,7 +824,6 @@ WOLFSSL_API int wolfSSL_EVP_VerifyInit(WOLFSSL_EVP_MD_CTX *ctx, const WOLFSSL_EV
if (ctx == NULL)return 0;
WOLFSSL_ENTER("EVP_VerifyInit");
return wolfSSL_EVP_DigestInit(ctx,type);
return 1;
}
WOLFSSL_API int wolfSSL_EVP_VerifyUpdate(WOLFSSL_EVP_MD_CTX *ctx, const void *data, size_t len)
@ -867,7 +865,6 @@ WOLFSSL_API int wolfSSL_EVP_VerifyFinal(WOLFSSL_EVP_MD_CTX *ctx,
default:
return 0;
}
return 1;
}
WOLFSSL_API int wolfSSL_EVP_add_cipher(const WOLFSSL_EVP_CIPHER *cipher)

View File

@ -3048,7 +3048,9 @@ struct WOLFSSL_X509 {
int serialSz;
byte serial[EXTERNAL_SERIAL_SIZE];
char subjectCN[ASN_NAME_MAX]; /* common name short cut */
#ifdef WOLFSSL_CERT_REQ
char challengePw[CTC_NAME_SIZE]; /* for REQ certs */
#endif
#ifdef WOLFSSL_SEP
int deviceTypeSz;
byte deviceType[EXTERNAL_SERIAL_SIZE];

View File

@ -239,7 +239,7 @@ WOLFSSL_API int wolfSSL_EVP_DigestInit_ex(WOLFSSL_EVP_MD_CTX* ctx,
const WOLFSSL_EVP_MD* type,
WOLFSSL_ENGINE *impl);
WOLFSSL_API int wolfSSL_EVP_DigestUpdate(WOLFSSL_EVP_MD_CTX* ctx, const void* data,
unsigned long sz);
size_t sz);
WOLFSSL_API int wolfSSL_EVP_DigestFinal(WOLFSSL_EVP_MD_CTX* ctx, unsigned char* md,
unsigned int* s);
WOLFSSL_API int wolfSSL_EVP_DigestFinal_ex(WOLFSSL_EVP_MD_CTX* ctx,