NULL.
ok deraadt@ guenther@ jsing@
-/* $OpenBSD: t_crl.c,v 1.15 2014/07/11 08:44:47 jsing Exp $ */
+/* $OpenBSD: t_crl.c,v 1.16 2014/07/12 16:33:25 miod Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 1999.
*/
l = X509_CRL_get_version(x);
BIO_printf(out, "%8sVersion %lu (0x%lx)\n", "", l + 1, l);
i = OBJ_obj2nid(x->sig_alg->algorithm);
- X509_signature_print(out, x->sig_alg, NULL);
+ if (X509_signature_print(out, x->sig_alg, NULL) == 0)
+ goto err;
p = X509_NAME_oneline(X509_CRL_get_issuer(x), NULL, 0);
+ if (p == NULL)
+ goto err;
BIO_printf(out, "%8sIssuer: %s\n", "", p);
free(p);
BIO_printf(out, "%8sLast Update: ", "");
X509V3_extensions_print(out, "CRL entry extensions",
r->extensions, 0, 8);
}
- X509_signature_print(out, x->sig_alg, x->signature);
+ if (X509_signature_print(out, x->sig_alg, x->signature) == 0)
+ goto err;
return 1;
+err:
+ return 0;
}
-/* $OpenBSD: t_x509.c,v 1.24 2014/07/11 08:44:47 jsing Exp $ */
+/* $OpenBSD: t_x509.c,v 1.25 2014/07/12 16:33:25 miod Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
l = 80 - 2 - obase;
b = X509_NAME_oneline(name, NULL, 0);
- if (!*b) {
+ if (b == NULL)
+ return 0;
+ if (*b == '\0') {
free(b);
return 1;
}
-/* $OpenBSD: t_crl.c,v 1.15 2014/07/11 08:44:47 jsing Exp $ */
+/* $OpenBSD: t_crl.c,v 1.16 2014/07/12 16:33:25 miod Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 1999.
*/
l = X509_CRL_get_version(x);
BIO_printf(out, "%8sVersion %lu (0x%lx)\n", "", l + 1, l);
i = OBJ_obj2nid(x->sig_alg->algorithm);
- X509_signature_print(out, x->sig_alg, NULL);
+ if (X509_signature_print(out, x->sig_alg, NULL) == 0)
+ goto err;
p = X509_NAME_oneline(X509_CRL_get_issuer(x), NULL, 0);
+ if (p == NULL)
+ goto err;
BIO_printf(out, "%8sIssuer: %s\n", "", p);
free(p);
BIO_printf(out, "%8sLast Update: ", "");
X509V3_extensions_print(out, "CRL entry extensions",
r->extensions, 0, 8);
}
- X509_signature_print(out, x->sig_alg, x->signature);
+ if (X509_signature_print(out, x->sig_alg, x->signature) == 0)
+ goto err;
return 1;
+err:
+ return 0;
}
-/* $OpenBSD: t_x509.c,v 1.24 2014/07/11 08:44:47 jsing Exp $ */
+/* $OpenBSD: t_x509.c,v 1.25 2014/07/12 16:33:25 miod Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
l = 80 - 2 - obase;
b = X509_NAME_oneline(name, NULL, 0);
- if (!*b) {
+ if (b == NULL)
+ return 0;
+ if (*b == '\0') {
free(b);
return 1;
}