COMPAT. LAYER : jenkins warnings and spacing around if statements

This commit is contained in:
Jacob Barthelmeh
2016-11-08 15:41:26 -07:00
parent 8844554fca
commit 464543df26
7 changed files with 50 additions and 61 deletions

View File

@@ -63,7 +63,7 @@ WOLFSSL_API long wolfSSL_BIO_int_ctrl(WOLFSSL_BIO *bp, int cmd, long larg, int i
WOLFSSL_API const WOLFSSL_BIO_METHOD *wolfSSL_BIO_s_socket(void) WOLFSSL_API const WOLFSSL_BIO_METHOD *wolfSSL_BIO_s_socket(void)
{ {
WOLFSSL_ENTER("BIO_s_socket"); WOLFSSL_ENTER("BIO_s_socket");
return (void *)0; return NULL;
} }
/*** TBD ***/ /*** TBD ***/

View File

@@ -163,8 +163,7 @@ WOLFSSL_API int wolfSSL_EVP_CipherUpdate(WOLFSSL_EVP_CIPHER_CTX *ctx,
if (ctx == NULL) return BAD_FUNC_ARG; if (ctx == NULL) return BAD_FUNC_ARG;
WOLFSSL_ENTER("wolfSSL_EVP_CipherUpdate"); WOLFSSL_ENTER("wolfSSL_EVP_CipherUpdate");
*outl = 0; *outl = 0;
if(ctx->bufUsed > 0) /* concatinate them if there is anything */ if (ctx->bufUsed > 0) { /* concatinate them if there is anything */
{
fill = fillBuff(ctx, in, inl); fill = fillBuff(ctx, in, inl);
inl -= fill; inl -= fill;
in += fill; in += fill;
@@ -193,6 +192,9 @@ WOLFSSL_API int wolfSSL_EVP_CipherUpdate(WOLFSSL_EVP_CIPHER_CTX *ctx,
fillBuff(ctx, in, inl); fillBuff(ctx, in, inl);
/* no increase of outl */ /* no increase of outl */
} }
(void)out; /* silence warning in case not read */
return 1; return 1;
} }
@@ -235,7 +237,8 @@ WOLFSSL_API int wolfSSL_EVP_CipherFinal(WOLFSSL_EVP_CIPHER_CTX *ctx,
if (evpCipherBlock(ctx, out, ctx->buf, ctx->block_size) == 0) if (evpCipherBlock(ctx, out, ctx->buf, ctx->block_size) == 0)
return 0; return 0;
*outl = ctx->block_size; *outl = ctx->block_size;
} else { }
else {
if (evpCipherBlock(ctx, out, ctx->buf, ctx->block_size) == 0) if (evpCipherBlock(ctx, out, ctx->buf, ctx->block_size) == 0)
return 0; return 0;
printf("Dec: block_size=%d\n", ctx->block_size); printf("Dec: block_size=%d\n", ctx->block_size);
@@ -408,7 +411,12 @@ WOLFSSL_API unsigned long wolfSSL_EVP_CIPHER_flags(const WOLFSSL_EVP_CIPHER *cip
WOLFSSL_API int wolfSSL_EVP_CIPHER_CTX_set_padding(WOLFSSL_EVP_CIPHER_CTX *ctx, int padding) WOLFSSL_API int wolfSSL_EVP_CIPHER_CTX_set_padding(WOLFSSL_EVP_CIPHER_CTX *ctx, int padding)
{ {
if (ctx == NULL) return BAD_FUNC_ARG; if (ctx == NULL) return BAD_FUNC_ARG;
if(padding)ctx->flags &= ~WOLFSSL_EVP_CIPH_NO_PADDING; if (padding) {
else ctx->flags |= WOLFSSL_EVP_CIPH_NO_PADDING; ctx->flags &= ~WOLFSSL_EVP_CIPH_NO_PADDING;
}
else {
ctx->flags |= WOLFSSL_EVP_CIPH_NO_PADDING;
}
return 1; return 1;
} }

View File

@@ -2,6 +2,7 @@
# All paths should be given relative to the root # All paths should be given relative to the root
EXTRA_DIST += wolfcrypt/src/misc.c EXTRA_DIST += wolfcrypt/src/misc.c
EXTRA_DIST += wolfcrypt/src/evp.c
EXTRA_DIST += wolfcrypt/src/asm.c EXTRA_DIST += wolfcrypt/src/asm.c
EXTRA_DIST += wolfcrypt/src/aes_asm.asm EXTRA_DIST += wolfcrypt/src/aes_asm.asm

View File

@@ -3,6 +3,7 @@
nobase_include_HEADERS+= \ nobase_include_HEADERS+= \
wolfssl/openssl/asn1.h \ wolfssl/openssl/asn1.h \
wolfssl/openssl/aes.h\
wolfssl/openssl/bio.h \ wolfssl/openssl/bio.h \
wolfssl/openssl/bn.h \ wolfssl/openssl/bn.h \
wolfssl/openssl/conf.h \ wolfssl/openssl/conf.h \

View File

@@ -530,7 +530,6 @@ WOLFSSL_API long wolfSSL_BIO_seek(WOLFSSL_BIO *bio, int ofs);
WOLFSSL_API long wolfSSL_BIO_write_filename(WOLFSSL_BIO *bio, char *name); WOLFSSL_API long wolfSSL_BIO_write_filename(WOLFSSL_BIO *bio, char *name);
WOLFSSL_API long wolfSSL_BIO_set_mem_eof_return(WOLFSSL_BIO *bio, int v); WOLFSSL_API long wolfSSL_BIO_set_mem_eof_return(WOLFSSL_BIO *bio, int v);
WOLFSSL_API long wolfSSL_BIO_get_mem_ptr(WOLFSSL_BIO *b, void *m); WOLFSSL_API long wolfSSL_BIO_get_mem_ptr(WOLFSSL_BIO *b, void *m);
const WOLFSSL_BIO_METHOD *wolfSSL_BIO_s_socket(void);
WOLFSSL_API void wolfSSL_RAND_screen(void); WOLFSSL_API void wolfSSL_RAND_screen(void);
WOLFSSL_API const char* wolfSSL_RAND_file_name(char*, unsigned long); WOLFSSL_API const char* wolfSSL_RAND_file_name(char*, unsigned long);
@@ -1911,8 +1910,6 @@ WOLFSSL_API STACK_OF(WOLFSSL_X509_NAME) *wolfSSL_dup_CA_list( STACK_OF(WOLFSSL_X
WOLFSSL_API unsigned long wolfSSL_SSL_CTX_get_options(const WOLFSSL_CTX *ctx); WOLFSSL_API unsigned long wolfSSL_SSL_CTX_get_options(const WOLFSSL_CTX *ctx);
WOLFSSL_API unsigned long wolfSSL_SSL_CTX_set_options(WOLFSSL_CTX *ctx, unsigned long op); WOLFSSL_API unsigned long wolfSSL_SSL_CTX_set_options(WOLFSSL_CTX *ctx, unsigned long op);
WOLFSSL_API unsigned long wolfSSL_SSL_get_options(const WOLFSSL *s);
WOLFSSL_API unsigned long wolfSSL_SSL_set_options(WOLFSSL *s, unsigned long op);
/* end lighttpd*/ /* end lighttpd*/
#endif #endif

View File

@@ -123,24 +123,6 @@ WOLFSSL_API int wc_AesCbcEncrypt(Aes* aes, byte* out,
const byte* in, word32 sz); const byte* in, word32 sz);
WOLFSSL_API int wc_AesCbcDecrypt(Aes* aes, byte* out, WOLFSSL_API int wc_AesCbcDecrypt(Aes* aes, byte* out,
const byte* in, word32 sz); const byte* in, word32 sz);
WOLFSSL_API int wc_AesEcbEncrypt(Aes* aes, byte* out,
const byte* in, word32 sz);
WOLFSSL_API int wc_AesEcbDecrypt(Aes* aes, byte* out,
const byte* in, word32 sz);
#ifdef HAVE_AES_ECB
WOLFSSL_API int wc_AesEcbEncrypt(Aes* aes, byte* out,
const byte* in, word32 sz);
WOLFSSL_API int wc_AesEcbDecrypt(Aes* aes, byte* out,
const byte* in, word32 sz);
#endif
#ifdef HAVE_AES_ECB
WOLFSSL_API int wc_AesEcbEncrypt(Aes* aes, byte* out,
const byte* in, word32 sz);
WOLFSSL_API int wc_AesEcbDecrypt(Aes* aes, byte* out,
const byte* in, word32 sz);
#endif
#ifdef HAVE_AES_ECB #ifdef HAVE_AES_ECB
WOLFSSL_API int wc_AesEcbEncrypt(Aes* aes, byte* out, WOLFSSL_API int wc_AesEcbEncrypt(Aes* aes, byte* out,