summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/hmac
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/hmac')
-rw-r--r--src/lib/libcrypto/hmac/hmac.c4
-rw-r--r--src/lib/libcrypto/hmac/hmac.h4
-rw-r--r--src/lib/libcrypto/hmac/hmactest.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/hmac/hmac.c b/src/lib/libcrypto/hmac/hmac.c
index 5c349bbb56..23b7c98f8f 100644
--- a/src/lib/libcrypto/hmac/hmac.c
+++ b/src/lib/libcrypto/hmac/hmac.c
@@ -109,7 +109,7 @@ void HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
109 memcpy(&ctx->md_ctx,&ctx->i_ctx,sizeof(ctx->i_ctx)); 109 memcpy(&ctx->md_ctx,&ctx->i_ctx,sizeof(ctx->i_ctx));
110 } 110 }
111 111
112void HMAC_Update(HMAC_CTX *ctx, unsigned char *data, int len) 112void HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, int len)
113 { 113 {
114 EVP_DigestUpdate(&(ctx->md_ctx),data,len); 114 EVP_DigestUpdate(&(ctx->md_ctx),data,len);
115 } 115 }
@@ -134,7 +134,7 @@ void HMAC_cleanup(HMAC_CTX *ctx)
134 } 134 }
135 135
136unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, 136unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
137 unsigned char *d, int n, unsigned char *md, 137 const unsigned char *d, int n, unsigned char *md,
138 unsigned int *md_len) 138 unsigned int *md_len)
139 { 139 {
140 HMAC_CTX c; 140 HMAC_CTX c;
diff --git a/src/lib/libcrypto/hmac/hmac.h b/src/lib/libcrypto/hmac/hmac.h
index f928975fcd..223eeda7f3 100644
--- a/src/lib/libcrypto/hmac/hmac.h
+++ b/src/lib/libcrypto/hmac/hmac.h
@@ -85,11 +85,11 @@ typedef struct hmac_ctx_st
85 85
86void HMAC_Init(HMAC_CTX *ctx, const void *key, int len, 86void HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
87 const EVP_MD *md); 87 const EVP_MD *md);
88void HMAC_Update(HMAC_CTX *ctx,unsigned char *key, int len); 88void HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, int len);
89void HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len); 89void HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len);
90void HMAC_cleanup(HMAC_CTX *ctx); 90void HMAC_cleanup(HMAC_CTX *ctx);
91unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, 91unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
92 unsigned char *d, int n, unsigned char *md, 92 const unsigned char *d, int n, unsigned char *md,
93 unsigned int *md_len); 93 unsigned int *md_len);
94 94
95 95
diff --git a/src/lib/libcrypto/hmac/hmactest.c b/src/lib/libcrypto/hmac/hmactest.c
index 9a67dff36a..4b56b8ee13 100644
--- a/src/lib/libcrypto/hmac/hmactest.c
+++ b/src/lib/libcrypto/hmac/hmactest.c
@@ -73,7 +73,7 @@ int main(int argc, char *argv[])
73#include <openssl/ebcdic.h> 73#include <openssl/ebcdic.h>
74#endif 74#endif
75 75
76struct test_st 76static struct test_st
77 { 77 {
78 unsigned char key[16]; 78 unsigned char key[16];
79 int key_len; 79 int key_len;