summaryrefslogtreecommitdiffstats
path: root/ssl/d1_srvr.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2007-09-30 18:53:54 +0000
committerAndy Polyakov <appro@openssl.org>2007-09-30 18:53:54 +0000
commit7432d073af97539e5a2c8b0f1ff254d6b53c9682 (patch)
treee9b5dc26f8cb6a250b9f3fc2c4366518b75930e2 /ssl/d1_srvr.c
parent04e2ab2c02aebcfd3d6eab1ea6c0dbcaa9877cad (diff)
Switch to RFC-compliant version encoding in DTLS.
Diffstat (limited to 'ssl/d1_srvr.c')
-rw-r--r--ssl/d1_srvr.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/ssl/d1_srvr.c b/ssl/d1_srvr.c
index d299ba618f..0cfcf99971 100644
--- a/ssl/d1_srvr.c
+++ b/ssl/d1_srvr.c
@@ -121,7 +121,6 @@
#include <openssl/evp.h>
#include <openssl/x509.h>
#include <openssl/md5.h>
-#include <openssl/bn.h>
#ifndef OPENSSL_NO_DH
#include <openssl/dh.h>
#endif
@@ -626,15 +625,16 @@ int dtls1_send_hello_verify_request(SSL *s)
*(p++) = s->version & 0xFF;
*(p++) = (unsigned char) s->d1->cookie_len;
- if (s->ctx->app_gen_cookie_cb != NULL &&
- s->ctx->app_gen_cookie_cb(s, s->d1->cookie,
- &(s->d1->cookie_len)) == 0)
- {
- SSLerr(SSL_F_DTLS1_SEND_HELLO_VERIFY_REQUEST,ERR_R_INTERNAL_ERROR);
- return 0;
- }
- /* else the cookie is assumed to have
- * been initialized by the application */
+
+ if (s->ctx->app_gen_cookie_cb != NULL &&
+ s->ctx->app_gen_cookie_cb(s, s->d1->cookie,
+ &(s->d1->cookie_len)) == 0)
+ {
+ SSLerr(SSL_F_DTLS1_SEND_HELLO_VERIFY_REQUEST,ERR_R_INTERNAL_ERROR);
+ return 0;
+ }
+ /* else the cookie is assumed to have
+ * been initialized by the application */
memcpy(p, s->d1->cookie, s->d1->cookie_len);
p += s->d1->cookie_len;