#include <openssl/x509.h>
#include "ssl_locl.h"
-int ssl3_send_finished(SSL *s, int a, int b, unsigned char *sender,
- int slen)
+int ssl3_send_finished(SSL *s, int a, int b, const char *sender, int slen)
{
unsigned char *p,*d;
int i;
case SSL3_ST_CW_FINISHED_B:
ret=ssl3_send_finished(s,
SSL3_ST_CW_FINISHED_A,SSL3_ST_CW_FINISHED_B,
- s->method->ssl3_enc->client_finished,
- s->method->ssl3_enc->client_finished_len);
+ s->method->ssl3_enc->client_finished_label,
+ s->method->ssl3_enc->client_finished_label_len);
if (ret <= 0) goto end;
s->state=SSL3_ST_CW_FLUSH;
static int do_change_cipher_spec(SSL *s)
{
int i;
- unsigned char *sender;
+ const char *sender;
int slen;
if (s->state & SSL_ST_ACCEPT)
* the finished message */
if (s->state & SSL_ST_CONNECT)
{
- sender=s->method->ssl3_enc->server_finished;
- slen=s->method->ssl3_enc->server_finished_len;
+ sender=s->method->ssl3_enc->server_finished_label;
+ slen=s->method->ssl3_enc->server_finished_label_len;
}
else
{
- sender=s->method->ssl3_enc->client_finished;
- slen=s->method->ssl3_enc->client_finished_len;
+ sender=s->method->ssl3_enc->client_finished_label;
+ slen=s->method->ssl3_enc->client_finished_label_len;
}
s->method->ssl3_enc->final_finish_mac(s,
case SSL3_ST_SW_FINISHED_B:
ret=ssl3_send_finished(s,
SSL3_ST_SW_FINISHED_A,SSL3_ST_SW_FINISHED_B,
- s->method->ssl3_enc->server_finished,
- s->method->ssl3_enc->server_finished_len);
+ s->method->ssl3_enc->server_finished_label,
+ s->method->ssl3_enc->server_finished_label_len);
if (ret <= 0) goto end;
s->state=SSL3_ST_SW_FLUSH;
if (s->hit)
#define SSL3_RS_PART_READ 4
#define SSL3_RS_PART_WRITE 5
-#define SSL3_MD_CLIENT_FINISHED_CONST {0x43,0x4C,0x4E,0x54}
-#define SSL3_MD_SERVER_FINISHED_CONST {0x53,0x52,0x56,0x52}
+#define SSL3_MD_CLIENT_FINISHED_CONST "\x43\x4C\x4E\x54"
+#define SSL3_MD_SERVER_FINISHED_CONST "\x53\x52\x56\x52"
#define SSL3_VERSION 0x0300
#define SSL3_VERSION_MAJOR 0x03
int (*final_finish_mac)();
int finish_mac_length;
int (*cert_verify_mac)();
- unsigned char client_finished[20];
- int client_finished_len;
- unsigned char server_finished[20];
- int server_finished_len;
+ const char *client_finished_label;
+ int client_finished_label_len;
+ const char *server_finished_label;
+ int server_finished_label_len;
int (*alert_value)();
} SSL3_ENC_METHOD;
unsigned char *p, int len);
int ssl3_get_req_cert_type(SSL *s,unsigned char *p);
long ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok);
-int ssl3_send_finished(SSL *s, int a, int b, unsigned char *sender,int slen);
+int ssl3_send_finished(SSL *s, int a, int b, const char *sender,int slen);
int ssl3_num_ciphers(void);
SSL_CIPHER *ssl3_get_cipher(unsigned int u);
int ssl3_renegotiate(SSL *ssl);