| skipped 157 lines |
158 | 158 | | /** |
159 | 159 | | * ssl_set_verify_partial - Allow verification using partial chains (with no root) |
160 | 160 | | * @param ctx SSL context |
161 | | - | * @retval 0 Success |
162 | | - | * @retval -1 Error |
| 161 | + | * @retval true Success |
| 162 | + | * @retval false Error |
163 | 163 | | */ |
164 | | - | static int ssl_set_verify_partial(SSL_CTX *ctx) |
| 164 | + | static bool ssl_set_verify_partial(SSL_CTX *ctx) |
165 | 165 | | { |
166 | | - | int rc = 0; |
| 166 | + | bool rc = true; |
167 | 167 | | #ifdef HAVE_SSL_PARTIAL_CHAIN |
168 | 168 | | X509_VERIFY_PARAM *param = NULL; |
169 | 169 | | |
| skipped 7 lines |
177 | 177 | | if (SSL_CTX_set1_param(ctx, param) == 0) |
178 | 178 | | { |
179 | 179 | | mutt_debug(LL_DEBUG2, "SSL_CTX_set1_param() failed\n"); |
180 | | - | rc = -1; |
| 180 | + | rc = false; |
181 | 181 | | } |
182 | 182 | | X509_VERIFY_PARAM_free(param); |
183 | 183 | | } |
184 | 184 | | else |
185 | 185 | | { |
186 | 186 | | mutt_debug(LL_DEBUG2, "X509_VERIFY_PARAM_new() failed\n"); |
187 | | - | rc = -1; |
| 187 | + | rc = false; |
188 | 188 | | } |
189 | 189 | | } |
190 | 190 | | #endif |
| skipped 1072 lines |
1263 | 1263 | | SSL_CTX_set_cipher_list(sockdata(conn)->sctx, c_ssl_ciphers); |
1264 | 1264 | | } |
1265 | 1265 | | |
1266 | | - | if (ssl_set_verify_partial(sockdata(conn)->sctx)) |
| 1266 | + | if (!ssl_set_verify_partial(sockdata(conn)->sctx)) |
1267 | 1267 | | { |
1268 | 1268 | | mutt_error(_("Warning: error enabling ssl_verify_partial_chains")); |
1269 | 1269 | | } |
| skipped 163 lines |