sk_X509_pop
(void)sk_X509_pop(ctx->chain);
X509_free(sk_X509_pop(ctx->chain));
x = sk_X509_pop(chain);