remove duplicate defines
[openssl.git] / ssl / s3_clnt.c
index 1aff83318436271ff4b836e0707e200a1c231544..4ca2774f233408038cc63a75231d1eb072913ffb 100644 (file)
@@ -730,7 +730,8 @@ int ssl3_client_hello(SSL *s)
                /* Do the message type and length last */
                d=p= ssl_handshake_start(s);
 
-               /* version indicates the negotiated version: for example from
+               /*-
+                * version indicates the negotiated version: for example from
                 * an SSLv2/v3 compatible client hello). The client_version
                 * field is the maximum version we permit and it is also
                 * used in RSA encrypted premaster secrets. Some servers can
@@ -1275,9 +1276,9 @@ int ssl3_get_server_certificate(SSL *s)
                    ? 0 : 1;
 
 #ifdef KSSL_DEBUG
-       printf("pkey,x = %p, %p\n", pkey,x);
-       printf("ssl_cert_type(x,pkey) = %d\n", ssl_cert_type(x,pkey));
-       printf("cipher, alg, nc = %s, %lx, %lx, %d\n", s->s3->tmp.new_cipher->name,
+       fprintf(stderr,"pkey,x = %p, %p\n", pkey,x);
+       fprintf(stderr,"ssl_cert_type(x,pkey) = %d\n", ssl_cert_type(x,pkey));
+       fprintf(stderr,"cipher, alg, nc = %s, %lx, %lx, %d\n", s->s3->tmp.new_cipher->name,
                s->s3->tmp.new_cipher->algorithm_mkey, s->s3->tmp.new_cipher->algorithm_auth, need_cert);
 #endif    /* KSSL_DEBUG */
 
@@ -2562,7 +2563,7 @@ int ssl3_send_client_key_exchange(SSL *s)
                        EVP_CIPHER_CTX_init(&ciph_ctx);
 
 #ifdef KSSL_DEBUG
-                       printf("ssl3_send_client_key_exchange(%lx & %lx)\n",
+                       fprintf(stderr,"ssl3_send_client_key_exchange(%lx & %lx)\n",
                                alg_k, SSL_kKRB5);
 #endif /* KSSL_DEBUG */
 
@@ -2578,9 +2579,9 @@ int ssl3_send_client_key_exchange(SSL *s)
                            goto err;
 #ifdef KSSL_DEBUG
                        {
-                       printf("kssl_cget_tkt rtn %d\n", krb5rc);
+                       fprintf(stderr,"kssl_cget_tkt rtn %d\n", krb5rc);
                        if (krb5rc && kssl_err.text)
-                         printf("kssl_cget_tkt kssl_err=%s\n", kssl_err.text);
+                         fprintf(stderr,"kssl_cget_tkt kssl_err=%s\n", kssl_err.text);
                        }
 #endif /* KSSL_DEBUG */
 
@@ -2593,24 +2594,25 @@ int ssl3_send_client_key_exchange(SSL *s)
                                goto err;
                                }
 
-                       /*  20010406 VRS - Earlier versions used KRB5 AP_REQ
-                       **  in place of RFC 2712 KerberosWrapper, as in:
-                       **
-                       **  Send ticket (copy to *p, set n = length)
-                       **  n = krb5_ap_req.length;
-                       **  memcpy(p, krb5_ap_req.data, krb5_ap_req.length);
-                       **  if (krb5_ap_req.data)  
-                       **    kssl_krb5_free_data_contents(NULL,&krb5_ap_req);
-                       **
-                       **  Now using real RFC 2712 KerberosWrapper
-                       **  (Thanks to Simon Wilkinson <sxw@sxw.org.uk>)
-                       **  Note: 2712 "opaque" types are here replaced
-                       **  with a 2-byte length followed by the value.
-                       **  Example:
-                       **  KerberosWrapper= xx xx asn1ticket 0 0 xx xx encpms
-                       **  Where "xx xx" = length bytes.  Shown here with
-                       **  optional authenticator omitted.
-                       */
+                       /*-
+                        * 20010406 VRS - Earlier versions used KRB5 AP_REQ
+                        * in place of RFC 2712 KerberosWrapper, as in:
+                        *
+                        * Send ticket (copy to *p, set n = length)
+                        * n = krb5_ap_req.length;
+                        * memcpy(p, krb5_ap_req.data, krb5_ap_req.length);
+                        * if (krb5_ap_req.data)  
+                        *   kssl_krb5_free_data_contents(NULL,&krb5_ap_req);
+                        *
+                        * Now using real RFC 2712 KerberosWrapper
+                        * (Thanks to Simon Wilkinson <sxw@sxw.org.uk>)
+                        * Note: 2712 "opaque" types are here replaced
+                        * with a 2-byte length followed by the value.
+                        * Example:
+                        * KerberosWrapper= xx xx asn1ticket 0 0 xx xx encpms
+                        * Where "xx xx" = length bytes.  Shown here with
+                        * optional authenticator omitted.
+                        */
 
                        /*  KerberosWrapper.Ticket              */
                        s2n(enc_ticket->length,p);
@@ -2641,12 +2643,13 @@ int ssl3_send_client_key_exchange(SSL *s)
                            if (RAND_bytes(&(tmp_buf[2]),sizeof tmp_buf-2) <= 0)
                                goto err;
 
-                       /*  20010420 VRS.  Tried it this way; failed.
-                       **      EVP_EncryptInit_ex(&ciph_ctx,enc, NULL,NULL);
-                       **      EVP_CIPHER_CTX_set_key_length(&ciph_ctx,
-                       **                              kssl_ctx->length);
-                       **      EVP_EncryptInit_ex(&ciph_ctx,NULL, key,iv);
-                       */
+                       /*-
+                        * 20010420 VRS.  Tried it this way; failed.
+                        *      EVP_EncryptInit_ex(&ciph_ctx,enc, NULL,NULL);
+                        *      EVP_CIPHER_CTX_set_key_length(&ciph_ctx,
+                        *                              kssl_ctx->length);
+                        *      EVP_EncryptInit_ex(&ciph_ctx,NULL, key,iv);
+                        */
 
                        memset(iv, 0, sizeof iv);  /* per RFC 1510 */
                        EVP_EncryptInit_ex(&ciph_ctx,enc, NULL,
@@ -2803,7 +2806,8 @@ int ssl3_send_client_key_exchange(SSL *s)
                         */
                        if ((alg_k & (SSL_kECDHr|SSL_kECDHe)) && (s->cert != NULL)) 
                                {
-                               /* XXX: For now, we do not support client
+                               /*-
+                                * XXX: For now, we do not support client
                                 * authentication using ECDH certificates.
                                 * To add such support, one needs to add
                                 * code that checks for appropriate