Hi,
[[[
@@ -1786,9 +1906,22 @@
return 0;
/* Select the appropriate certificate */
+ TSVN_GetSHA1HashFromX509(ca_dn, hash);
+ strcpy(lastUsedAuthCacheHash, hash);
+ client_cert_idx = TSVN_GetSavedIndexForHash(hash);
+ if ((client_cert_idx < 0) || (client_cert_idx >= sk_X509_num(certs)))
+ {
+ client_cert_idx = ctx->client_cert_select(e, ssl, certs);
+ if (client_cert_idx >= 0)
+ {
+ TSVN_SaveIndexForHash(hash, client_cert_idx);
+ }
+ }
+ else if (client_cert_idx >= sk_X509_num(certs))
+ {
+ TSVN_ClearLastUsedAuthCache();
+ }
]]]
To me it looks like the else if branch can't ever be executed since the same condition is also in the if branch. Am I missing something?
Cheers,
Daniel