projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
e_aes.c: uninitialized variable in aes_ccm_init_key.
[oweals/openssl.git]
/
crypto
/
hmac
/
hmactest.c
diff --git
a/crypto/hmac/hmactest.c
b/crypto/hmac/hmactest.c
index 4b56b8ee135564499bb701dab5fce1af7704dfb8..1b906b81afb77b0d21899e932689c2b599298a0a 100644
(file)
--- a/
crypto/hmac/hmactest.c
+++ b/
crypto/hmac/hmactest.c
@@
-60,7
+60,9
@@
#include <string.h>
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
-#ifdef NO_HMAC
+#include "../e_os.h"
+
+#ifdef OPENSSL_NO_HMAC
int main(int argc, char *argv[])
{
printf("No HMAC support\n");
int main(int argc, char *argv[])
{
printf("No HMAC support\n");
@@
-68,11
+70,15
@@
int main(int argc, char *argv[])
}
#else
#include <openssl/hmac.h>
}
#else
#include <openssl/hmac.h>
+#ifndef OPENSSL_NO_MD5
+#include <openssl/md5.h>
+#endif
#ifdef CHARSET_EBCDIC
#include <openssl/ebcdic.h>
#endif
#ifdef CHARSET_EBCDIC
#include <openssl/ebcdic.h>
#endif
+#ifndef OPENSSL_NO_MD5
static struct test_st
{
unsigned char key[16];
static struct test_st
{
unsigned char key[16];
@@
-112,13
+118,20
@@
static struct test_st
(unsigned char *)"56be34521d144c88dbb8c733f0e8b3f6",
},
};
(unsigned char *)"56be34521d144c88dbb8c733f0e8b3f6",
},
};
-
+#endif
static char *pt(unsigned char *md);
int main(int argc, char *argv[])
{
static char *pt(unsigned char *md);
int main(int argc, char *argv[])
{
- int i,err=0;
+#ifndef OPENSSL_NO_MD5
+ int i;
char *p;
char *p;
+#endif
+ int err=0;
+
+#ifdef OPENSSL_NO_MD5
+ printf("test skipped: MD5 disabled\n");
+#else
#ifdef CHARSET_EBCDIC
ebcdic2ascii(test[0].data, test[0].data, test[0].data_len);
#ifdef CHARSET_EBCDIC
ebcdic2ascii(test[0].data, test[0].data, test[0].data_len);
@@
-143,10
+156,12
@@
int main(int argc, char *argv[])
else
printf("test %d ok\n",i);
}
else
printf("test %d ok\n",i);
}
- exit(err);
+#endif /* OPENSSL_NO_MD5 */
+ EXIT(err);
return(0);
}
return(0);
}
+#ifndef OPENSSL_NO_MD5
static char *pt(unsigned char *md)
{
int i;
static char *pt(unsigned char *md)
{
int i;
@@
-157,3
+172,4
@@
static char *pt(unsigned char *md)
return(buf);
}
#endif
return(buf);
}
#endif
+#endif