Minor refactoring
diff --git a/library/ssl_srv.c b/library/ssl_srv.c
index 01b0aca..a385c89 100644
--- a/library/ssl_srv.c
+++ b/library/ssl_srv.c
@@ -809,14 +809,13 @@
}
#if defined(POLARSSL_ECDSA_C)
- if( pk_alg == POLARSSL_PK_ECDSA )
- {
- if( ssl_key_matches_curves( cur->key, ssl->handshake->curves ) )
- break;
- }
- else
+ if( pk_alg == POLARSSL_PK_ECDSA &&
+ ! ssl_key_matches_curves( cur->key, ssl->handshake->curves ) )
+ continue;
#endif
- break;
+
+ /* If we get there, we got a winner */
+ break;
}
if( cur == NULL )