New extension callback features.
[openssl.git] / ssl / t1_lib.c
index f94a4c0b8a35d44c459a16148c1e5c1f2c0a2ead..f46279dbb313e2c4c34963a716267d82ff9de4b0 100644 (file)
@@ -2442,7 +2442,7 @@ static int ssl_scan_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char
                 */
                else if (!s->hit)
                        {
-                       if (!custom_ext_parse(s, 1, type, data, size, al))
+                       if (custom_ext_parse(s, 1, type, data, size, al) <= 0)
                                return 0;
                        }
 #ifdef TLSEXT_TYPE_encrypt_then_mac
@@ -2777,7 +2777,7 @@ static int ssl_scan_serverhello_tlsext(SSL *s, unsigned char **p, unsigned char
                /* If this extension type was not otherwise handled, but 
                 * matches a custom_cli_ext_record, then send it to the c
                 * callback */
-               else if (!custom_ext_parse(s, 0, type, data, size, al))
+               else if (custom_ext_parse(s, 0, type, data, size, al) <= 0)
                                return 0;
 #ifdef TLSEXT_TYPE_encrypt_then_mac
                else if (type == TLSEXT_TYPE_encrypt_then_mac)