eng_devcrypto: make sure digest can do copy
[openssl.git] / crypto / ocsp / ocsp_cl.c
index 118b66a2f5015fb2fe27ac0483d0b6c00127a106..739ac01807a07a413f56f6d9bfcbcc3381b2b25f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved.
  *
  * Licensed under the OpenSSL license (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
@@ -167,6 +167,16 @@ const ASN1_OCTET_STRING *OCSP_resp_get0_signature(const OCSP_BASICRESP *bs)
     return bs->signature;
 }
 
+const X509_ALGOR *OCSP_resp_get0_tbs_sigalg(const OCSP_BASICRESP *bs)
+{
+    return &bs->signatureAlgorithm;
+}
+
+const OCSP_RESPDATA *OCSP_resp_get0_respdata(const OCSP_BASICRESP *bs)
+{
+    return &bs->tbsResponseData;
+}
+
 /*
  * Return number of OCSP_SINGLERESP responses present in a basic response.
  */
@@ -230,7 +240,7 @@ int OCSP_resp_get1_id(const OCSP_BASICRESP *bs,
     } else {
         return 0;
     }
-    if (pname == NULL && pid == NULL)
+    if (*pname == NULL && *pid == NULL)
         return 0;
     return 1;
 }