return 0;
}
- if (!s->hit && !tls1_save_sigalgs(s, &supported_sig_algs, 1)) {
+ /*
+ * We use this routine on both clients and servers, and when clients
+ * get asked for PHA we need to always save the sigalgs regardless
+ * of whether it was a resumption or not.
+ */
+ if ((!s->server || (s->server && !s->hit))
+ && !tls1_save_sigalgs(s, &supported_sig_algs, 1)) {
SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
return 0;
}
return 0;
}
- if (!s->hit && !tls1_save_sigalgs(s, &supported_sig_algs, 0)) {
+ /*
+ * We use this routine on both clients and servers, and when clients
+ * get asked for PHA we need to always save the sigalgs regardless
+ * of whether it was a resumption or not.
+ */
+ if ((!s->server || (s->server && !s->hit))
+ && !tls1_save_sigalgs(s, &supported_sig_algs, 0)) {
SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
return 0;
}