-/* v3_ocsp.c */
/*
* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project
* 1999.
*/
# include <stdio.h>
-# include "cryptlib.h"
+# include "internal/cryptlib.h"
# include <openssl/conf.h>
# include <openssl/asn1.h>
# include <openssl/ocsp.h>
# include "ocsp_lcl.h"
# include <openssl/x509v3.h>
+# include "../x509v3/ext_dat.h"
/*
* OCSP extensions and a couple of CRL entry extensions
{
ASN1_OCTET_STRING *os, **pos;
pos = a;
- if (!pos || !*pos)
+ if (pos == NULL || *pos == NULL) {
os = ASN1_OCTET_STRING_new();
- else
+ if (os == NULL)
+ goto err;
+ } else {
os = *pos;
+ }
if (!ASN1_OCTET_STRING_set(os, *pp, length))
goto err;
return os;
err:
- if (os && (!pos || (*pos != os)))
- M_ASN1_OCTET_STRING_free(os);
+ if ((pos == NULL) || (*pos != os))
+ ASN1_OCTET_STRING_free(os);
OCSPerr(OCSP_F_D2I_OCSP_NONCE, ERR_R_MALLOC_FAILURE);
return NULL;
}
static void ocsp_nonce_free(void *a)
{
- M_ASN1_OCTET_STRING_free(a);
+ ASN1_OCTET_STRING_free(a);
}
static int i2r_ocsp_nonce(const X509V3_EXT_METHOD *method, void *nonce,