Browse Source

Change #warnings to FIXMEs, so that we can build without NO_WERROR=1

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
60e3aa4d75
1 changed files with 11 additions and 8 deletions
  1. 11
    8
      src/net/tls.c

+ 11
- 8
src/net/tls.c View File

97
  * @v len		Length of buffer
97
  * @v len		Length of buffer
98
  */
98
  */
99
 static void tls_generate_random ( void *data, size_t len ) {
99
 static void tls_generate_random ( void *data, size_t len ) {
100
-#warning "Placeholder"
100
+	/* FIXME: Some real random data source would be nice... */
101
 	memset ( data, 0x01, len );
101
 	memset ( data, 0x01, len );
102
 }
102
 }
103
 
103
 
345
 		return rc;
345
 		return rc;
346
 	}
346
 	}
347
 
347
 
348
-#warning "AES needs to be fixed to not require this"
348
+	/* FIXME: AES needs to be fixed to not require this */
349
 	AES_convert_key ( rx_cipherspec->cipher_ctx );
349
 	AES_convert_key ( rx_cipherspec->cipher_ctx );
350
 
350
 
351
 	DBGC ( tls, "TLS %p RX key:\n", tls );
351
 	DBGC ( tls, "TLS %p RX key:\n", tls );
498
 			       struct tls_cipherspec *pending,
498
 			       struct tls_cipherspec *pending,
499
 			       struct tls_cipherspec *active ) {
499
 			       struct tls_cipherspec *active ) {
500
 
500
 
501
-#warning "Why is this disabled?"
501
+	/* FIXME: Why is this disabled? */
502
 #if 0
502
 #if 0
503
 	/* Sanity check */
503
 	/* Sanity check */
504
 	if ( ( pending->pubkey == &crypto_null ) ||
504
 	if ( ( pending->pubkey == &crypto_null ) ||
622
  * @ret rc		Return status code
622
  * @ret rc		Return status code
623
  */
623
  */
624
 static int tls_send_client_key_exchange ( struct tls_session *tls ) {
624
 static int tls_send_client_key_exchange ( struct tls_session *tls ) {
625
-#warning "Hack alert"
625
+	/* FIXME: Hack alert */
626
 	RSA_CTX *rsa_ctx;
626
 	RSA_CTX *rsa_ctx;
627
 	RSA_pub_key_new ( &rsa_ctx, tls->rsa_mod, tls->rsa_mod_len,
627
 	RSA_pub_key_new ( &rsa_ctx, tls->rsa_mod, tls->rsa_mod_len,
628
 			  tls->rsa_pub_exp, tls->rsa_pub_exp_len );
628
 			  tls->rsa_pub_exp, tls->rsa_pub_exp_len );
639
 	key_xchg.encrypted_pre_master_secret_len
639
 	key_xchg.encrypted_pre_master_secret_len
640
 		= htons ( sizeof ( key_xchg.encrypted_pre_master_secret ) );
640
 		= htons ( sizeof ( key_xchg.encrypted_pre_master_secret ) );
641
 
641
 
642
-#warning "Hack alert"
642
+	/* FIXME: Hack alert */
643
 	DBGC ( tls, "RSA encrypting plaintext, modulus, exponent:\n" );
643
 	DBGC ( tls, "RSA encrypting plaintext, modulus, exponent:\n" );
644
 	DBGC_HD ( tls, &tls->pre_master_secret,
644
 	DBGC_HD ( tls, &tls->pre_master_secret,
645
 		  sizeof ( tls->pre_master_secret ) );
645
 		  sizeof ( tls->pre_master_secret ) );
838
 	uint8_t *cert = certificate->asn1_start;
838
 	uint8_t *cert = certificate->asn1_start;
839
 	int offset = 0;
839
 	int offset = 0;
840
 
840
 
841
+	/* FIXME */
842
+	(void) len;
843
+
841
 	if (asn1_next_obj(cert, &offset, ASN1_SEQUENCE) < 0 ||
844
 	if (asn1_next_obj(cert, &offset, ASN1_SEQUENCE) < 0 ||
842
 	    asn1_next_obj(cert, &offset, ASN1_SEQUENCE) < 0 ||
845
 	    asn1_next_obj(cert, &offset, ASN1_SEQUENCE) < 0 ||
843
             asn1_skip_obj(cert, &offset, ASN1_EXPLICIT_TAG) ||
846
             asn1_skip_obj(cert, &offset, ASN1_EXPLICIT_TAG) ||
919
 static int tls_new_finished ( struct tls_session *tls,
922
 static int tls_new_finished ( struct tls_session *tls,
920
 			      void *data, size_t len ) {
923
 			      void *data, size_t len ) {
921
 
924
 
922
-#warning "Handle this properly"
925
+	/* FIXME: Handle this properly */
923
 	tls->tx_state = TLS_TX_DATA;
926
 	tls->tx_state = TLS_TX_DATA;
924
 	( void ) data;
927
 	( void ) data;
925
 	( void ) len;
928
 	( void ) len;
1091
 	void *mac;
1094
 	void *mac;
1092
 	void *padding;
1095
 	void *padding;
1093
 
1096
 
1094
-#warning "TLSv1.1 has an explicit IV"
1097
+	/* FIXME: TLSv1.1 has an explicit IV */
1095
 	iv_len = 0;
1098
 	iv_len = 0;
1096
 
1099
 
1097
 	/* Calculate block-ciphered struct length */
1100
 	/* Calculate block-ciphered struct length */
1289
 	}
1292
 	}
1290
 	iv_len = tls->rx_cipherspec.cipher->blocksize;
1293
 	iv_len = tls->rx_cipherspec.cipher->blocksize;
1291
 
1294
 
1292
-#warning "TLSv1.1 uses an explicit IV"
1295
+	/* FIXME: TLSv1.1 uses an explicit IV */
1293
 	iv_len = 0;
1296
 	iv_len = 0;
1294
 
1297
 
1295
 	mac_len = tls->rx_cipherspec.digest->digestsize;
1298
 	mac_len = tls->rx_cipherspec.digest->digestsize;

Loading…
Cancel
Save