Browse Source

tls_change_cipher() can complain about null cipher and digest

algorithms; we only need the pubkey check disabled (and only because
pubkey algorithms are not yet integrated into the crypto_algorithm
subsystem).
tags/v0.9.3
Michael Brown 17 years ago
parent
commit
847ac4f336
1 changed files with 2 additions and 4 deletions
  1. 2
    4
      src/net/tls.c

+ 2
- 4
src/net/tls.c View File

498
 			       struct tls_cipherspec *pending,
498
 			       struct tls_cipherspec *pending,
499
 			       struct tls_cipherspec *active ) {
499
 			       struct tls_cipherspec *active ) {
500
 
500
 
501
-	/* FIXME: Why is this disabled? */
502
-#if 0
503
 	/* Sanity check */
501
 	/* Sanity check */
504
-	if ( ( pending->pubkey == &crypto_null ) ||
502
+	if ( /* FIXME (when pubkey is not hard-coded to RSA):
503
+	      * ( pending->pubkey == &crypto_null ) || */
505
 	     ( pending->cipher == &crypto_null ) ||
504
 	     ( pending->cipher == &crypto_null ) ||
506
 	     ( pending->digest == &crypto_null ) ) {
505
 	     ( pending->digest == &crypto_null ) ) {
507
 		DBGC ( tls, "TLS %p refusing to use null cipher\n", tls );
506
 		DBGC ( tls, "TLS %p refusing to use null cipher\n", tls );
508
 		return -ENOTSUP;
507
 		return -ENOTSUP;
509
 	}
508
 	}
510
-#endif
511
 
509
 
512
 	tls_clear_cipher ( tls, active );
510
 	tls_clear_cipher ( tls, active );
513
 	memswap ( active, pending, sizeof ( *active ) );
511
 	memswap ( active, pending, sizeof ( *active ) );

Loading…
Cancel
Save