3 ms·
Good points, but if you are able to do that, doesn't it suggest the function could easily be split into multiple, more specific functions?
by jfoster 11y ago
Good points, but if you are able to do that, doesn't it suggest the function could easily be split into multiple, more specific functions?
- ectoplasm 11y agoYes, of course, it's just the first step. In fact you'd probably need to introduce a couple more variables. For example, i gets defined three times: i = sk_X509_num(ctx->chain); i = check_trust(ctx); i = X509_chain_check_suiteb(&ctx->error_depth, NULL, ctx->chain, ctx->param->flags); What a mess. I would probably start by moving towards a module / class for all the functions that take either an X509_STORE_CTX *ctx pointer or something accessed through ctx.