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 9a67dff36a20b5f46b7eb64f40ca571a4d18bb4e..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,12
+70,16
@@
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
-struct test_st
+#ifndef OPENSSL_NO_MD5
+static struct test_st
{
unsigned char key[16];
int key_len;
{
unsigned char key[16];
int key_len;
@@
-112,13
+118,20
@@
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