#endif /* OPIE_ENABLE */
/* session variables initialized in capa_probe() or pop3_getauth() */
+flag done_capa = FALSE;
#if defined(GSSAPI)
flag has_gssapi = FALSE;
#endif /* defined(GSSAPI) */
{
int ok;
+ if (done_capa) {
+ return PS_SUCCESS;
+ }
#if defined(GSSAPI)
has_gssapi = FALSE;
#endif /* defined(GSSAPI) */
if (strstr(buffer, "CRAM-MD5"))
has_cram = TRUE;
}
+ done_capa = TRUE;
}
return(ok);
}
flag got_tls = FALSE;
#endif /* SSL_ENABLE */
+ done_capa = FALSE;
#if defined(GSSAPI)
has_gssapi = FALSE;
#endif /* defined(GSSAPI) */
}
#ifdef SSL_ENABLE
+ ok = capa_probe(sock);
+ if (ok != PS_SUCCESS) {
+ return ok;
+ }
if (maybe_tls(ctl)) {
if (has_stls)
{
* guarantee a secure capability re-probe.
*/
got_tls = TRUE;
- (void)capa_probe(sock);
+ done_capa = FALSE;
+ ok = capa_probe(sock);
+ if (ok != PS_SUCCESS) {
+ return ok;
+ }
if (outlevel >= O_VERBOSE)
{
report(stdout, GT_("%s: upgrade to TLS succeeded.\n"), realhost);