Merge pull request #83 from coien/master
Thanks for the fixes.
diff --git a/crypto/cipher/aes_gcm_ossl.c b/crypto/cipher/aes_gcm_ossl.c
index c88c111..dce2a33 100644
--- a/crypto/cipher/aes_gcm_ossl.c
+++ b/crypto/cipher/aes_gcm_ossl.c
@@ -211,14 +211,13 @@
int direction)
{
const EVP_CIPHER *evp;
- v128_t *nonce = iv;
if (direction != direction_encrypt && direction != direction_decrypt) {
return (err_status_bad_param);
}
c->dir = direction;
- debug_print(mod_aes_gcm, "setting iv: %s", v128_hex_string(nonce));
+ debug_print(mod_aes_gcm, "setting iv: %s", v128_hex_string(iv));
switch (c->key_size) {
case AES_256_KEYSIZE:
diff --git a/crypto/include/sha1.h b/crypto/include/sha1.h
index 84d1c65..9b6cfed 100644
--- a/crypto/include/sha1.h
+++ b/crypto/include/sha1.h
@@ -68,18 +68,18 @@
*
*/
-inline void sha1_init (sha1_ctx_t *ctx)
+static inline void sha1_init (sha1_ctx_t *ctx)
{
EVP_MD_CTX_init(ctx);
EVP_DigestInit(ctx, EVP_sha1());
}
-inline void sha1_update (sha1_ctx_t *ctx, const uint8_t *M, int octets_in_msg)
+static inline void sha1_update (sha1_ctx_t *ctx, const uint8_t *M, int octets_in_msg)
{
EVP_DigestUpdate(ctx, M, octets_in_msg);
}
-inline void sha1_final (sha1_ctx_t *ctx, uint32_t *output)
+static inline void sha1_final (sha1_ctx_t *ctx, uint32_t *output)
{
unsigned int len = 0;
diff --git a/crypto/kernel/alloc.c b/crypto/kernel/alloc.c
index fec2172..e728798 100644
--- a/crypto/kernel/alloc.c
+++ b/crypto/kernel/alloc.c
@@ -103,9 +103,10 @@
if (ptr) {
debug_print(mod_alloc, "(location: %p) allocated", ptr);
- } else
+ } else {
debug_print(mod_alloc, "allocation failed (asked for %d bytes)\n", size);
-
+ }
+
return ptr;
}