*/
#include <stdio.h>
-#include "evp.h"
+#include <openssl/md5.h>
+#include <openssl/sha.h>
+#include <openssl/evp.h>
#include "ssl_locl.h"
static unsigned char ssl3_pad_1[48]={
0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,
0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c };
-#ifndef NO_PROTO
static int ssl3_handshake_mac(SSL *s, EVP_MD_CTX *in_ctx,
- unsigned char *sender, int len, unsigned char *p);
-#else
-static int ssl3_handshake_mac();
-#endif
+ const char *sender, int len, unsigned char *p);
static void ssl3_generate_key_block(SSL *s, unsigned char *km, int num)
{
unsigned char c='A';
int i,j,k;
+#ifdef CHARSET_EBCDIC
+ c = os_toascii[c]; /*'A' in ASCII */
+#endif
k=0;
for (i=0; i<num; i+=MD5_DIGEST_LENGTH)
{
}
int ssl3_final_finish_mac(SSL *s, EVP_MD_CTX *ctx1, EVP_MD_CTX *ctx2,
- unsigned char *sender, int len, unsigned char *p)
+ const char *sender, int len, unsigned char *p)
{
int ret;
}
static int ssl3_handshake_mac(SSL *s, EVP_MD_CTX *in_ctx,
- unsigned char *sender, int len, unsigned char *p)
+ const char *sender, int len, unsigned char *p)
{
unsigned int ret;
int npad,n;
int len)
{
static const unsigned char *salt[3]={
+#ifndef CHARSET_EBCDIC
(const unsigned char *)"A",
(const unsigned char *)"BB",
(const unsigned char *)"CCC",
+#else
+ (const unsigned char *)"\x41",
+ (const unsigned char *)"\x42\x42",
+ (const unsigned char *)"\x43\x43\x43",
+#endif
};
unsigned char buf[EVP_MAX_MD_SIZE];
EVP_MD_CTX ctx;