Workarounds to make broken programs happy (such as s_client and s_server).
[openssl.git] / ssl / t1_enc.c
index 05a3382..279e45d 100644 (file)
@@ -58,6 +58,8 @@
 
 #include <stdio.h>
 #include <openssl/comp.h>
+#include <openssl/md5.h>
+#include <openssl/sha.h>
 #include <openssl/evp.h>
 #include <openssl/hmac.h>
 #include "ssl_locl.h"
@@ -492,7 +494,7 @@ int tls1_cert_verify_mac(SSL *s, EVP_MD_CTX *in_ctx, unsigned char *out)
        }
 
 int tls1_final_finish_mac(SSL *s, EVP_MD_CTX *in1_ctx, EVP_MD_CTX *in2_ctx,
-            unsigned char *str, int slen, unsigned char *out)
+            const char *str, int slen, unsigned char *out)
        {
        unsigned int i;
        EVP_MD_CTX ctx;
@@ -619,11 +621,11 @@ int tls1_alert_code(int code)
        case SSL_AD_ACCESS_DENIED:      return(TLS1_AD_ACCESS_DENIED);
        case SSL_AD_DECODE_ERROR:       return(TLS1_AD_DECODE_ERROR);
        case SSL_AD_DECRYPT_ERROR:      return(TLS1_AD_DECRYPT_ERROR);
-       case SSL_AD_EXPORT_RESTRICION:  return(TLS1_AD_EXPORT_RESTRICION);
+       case SSL_AD_EXPORT_RESTRICTION: return(TLS1_AD_EXPORT_RESTRICTION);
        case SSL_AD_PROTOCOL_VERSION:   return(TLS1_AD_PROTOCOL_VERSION);
        case SSL_AD_INSUFFICIENT_SECURITY:return(TLS1_AD_INSUFFICIENT_SECURITY);
        case SSL_AD_INTERNAL_ERROR:     return(TLS1_AD_INTERNAL_ERROR);
-       case SSL_AD_USER_CANCLED:       return(TLS1_AD_USER_CANCLED);
+       case SSL_AD_USER_CANCELLED:     return(TLS1_AD_USER_CANCELLED);
        case SSL_AD_NO_RENEGOTIATION:   return(TLS1_AD_NO_RENEGOTIATION);
        default:                        return(-1);
                }