cleanup
[openssl.git] / apps / ocsp.c
index f23aa4c52a856b397f794d79964cc83dd61c000c..cec2f2b8090f65a5c837498bbd53614be7b104b0 100644 (file)
@@ -525,7 +525,7 @@ static int add_ocsp_serial(OCSP_REQUEST **req, char *serial, X509 *issuer,
        if(!*req) *req = OCSP_REQUEST_new();
        if(!*req) goto err;
        iname = X509_get_subject_name(issuer);
-       ikey = issuer->cert_info->key->public_key;
+       ikey = X509_get0_pubkey_bitstr(issuer);
        sno = s2i_ASN1_INTEGER(NULL, serial);
        if(!sno)
                {
@@ -585,7 +585,7 @@ static int print_ocsp_summary(BIO *out, OCSP_BASICRESP *bs, OCSP_REQUEST *req,
                if (status != V_OCSP_CERTSTATUS_REVOKED)
                        continue;
 
-               if (reason > 0)
+               if (reason != -1)
                        BIO_printf(out, "\tReason: %s\n",
                                OCSP_crl_reason_str(reason));