if (user)
netsec_set_userid(nsc, user);
- if (tls) {
- if (netsec_set_tls(nsc, 1, &errstr) != OK)
- return sm_nerror(errstr);
- }
-
if (sm_debug)
netsec_set_snoop(nsc, 1);
if ((sd1 = rclient (server, port)) == NOTOK)
return RP_BHST;
+#if 0
SIGNAL (SIGALRM, alrmser);
+#endif
SIGNAL (SIGPIPE, SIG_IGN);
netsec_set_fd(nsc, sd1, sd1);
+ if (tls) {
+ if (netsec_set_tls(nsc, 1, &errstr) != OK)
+ return sm_nerror(errstr);
+ }
+
/*
* If tls == 2, that means that the user requested "initial" TLS,
* which happens right after the connection has opened. Do that
if (user)
netsec_set_userid(nsc, user);
- if (tls) {
- if (netsec_set_tls(nsc, 1, &errstr) != OK) {
- snprintf(response, sizeof(response), "%s", errstr);
- free(errstr);
- return NOTOK;
- }
- }
-
if (oauth_svc != NULL) {
if (netsec_set_oauth_service(nsc, oauth_svc) != OK) {
snprintf(response, sizeof(response), "OAuth2 not supported");
netsec_set_snoop(nsc, snoop);
if (tls) {
+ if (netsec_set_tls(nsc, 1, &errstr) != OK) {
+ snprintf(response, sizeof(response), "%s", errstr);
+ free(errstr);
+ return NOTOK;
+ }
+
if (netsec_negotiate_tls(nsc, &errstr) != OK) {
snprintf(response, sizeof(response), "%s", errstr);
free(errstr);