Sfoglia il codice sorgente

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

tags/v0.9.3
Michael Brown 17 anni fa
parent
commit
60e3aa4d75
1 ha cambiato i file con 11 aggiunte e 8 eliminazioni
  1. 11
    8
      src/net/tls.c

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

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

Loading…
Annulla
Salva