diff options
Diffstat (limited to 'lib/libcrypto')
29 files changed, 101 insertions, 101 deletions
diff --git a/lib/libcrypto/asn1/a_enum.c b/lib/libcrypto/asn1/a_enum.c index f48543ef3fd..007a4218495 100644 --- a/lib/libcrypto/asn1/a_enum.c +++ b/lib/libcrypto/asn1/a_enum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: a_enum.c,v 1.22 2021/12/25 08:52:44 jsing Exp $ */ +/* $OpenBSD: a_enum.c,v 1.23 2021/12/25 13:17:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -195,7 +195,7 @@ BN_to_ASN1_ENUMERATED(const BIGNUM *bn, ASN1_ENUMERATED *ai) } return (ret); -err: + err: if (ret != ai) ASN1_ENUMERATED_free(ret); return (NULL); @@ -245,7 +245,7 @@ i2a_ASN1_ENUMERATED(BIO *bp, const ASN1_ENUMERATED *a) } return (n); -err: + err: return (-1); } @@ -333,9 +333,9 @@ a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size) bs->data = s; return (1); -err_sl: + err_sl: ASN1error(ASN1_R_SHORT_LINE); -err: + err: free(s); return (ret); } diff --git a/lib/libcrypto/asn1/a_int.c b/lib/libcrypto/asn1/a_int.c index eac7546eacd..c4b40ff7a41 100644 --- a/lib/libcrypto/asn1/a_int.c +++ b/lib/libcrypto/asn1/a_int.c @@ -1,4 +1,4 @@ -/* $OpenBSD: a_int.c,v 1.37 2021/12/25 08:52:44 jsing Exp $ */ +/* $OpenBSD: a_int.c,v 1.38 2021/12/25 13:17:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -242,7 +242,7 @@ BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai) } return (ret); -err: + err: if (ret != ai) ASN1_INTEGER_free(ret); return (NULL); @@ -299,7 +299,7 @@ i2a_ASN1_INTEGER(BIO *bp, const ASN1_INTEGER *a) } return (n); -err: + err: return (-1); } @@ -385,9 +385,9 @@ a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size) bs->data = s; return (1); -err_sl: + err_sl: ASN1error(ASN1_R_SHORT_LINE); -err: + err: free(s); return (ret); } @@ -579,7 +579,7 @@ c2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **pp, long len) *pp = pend; return (ret); -err: + err: ASN1error(i); if (a == NULL || *a != ret) ASN1_INTEGER_free(ret); @@ -666,7 +666,7 @@ d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp, long length) *pp = p; return (ret); -err: + err: ASN1error(i); if (a == NULL || *a != ret) ASN1_INTEGER_free(ret); diff --git a/lib/libcrypto/asn1/a_mbstr.c b/lib/libcrypto/asn1/a_mbstr.c index b7cfba379a2..8cff3ae1cad 100644 --- a/lib/libcrypto/asn1/a_mbstr.c +++ b/lib/libcrypto/asn1/a_mbstr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: a_mbstr.c,v 1.23 2017/01/29 17:49:22 beck Exp $ */ +/* $OpenBSD: a_mbstr.c,v 1.24 2021/12/25 13:17:48 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -248,7 +248,7 @@ ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, traverse_string(in, len, inform, cpyfunc, &p); return str_type; -err: + err: if (free_out) { ASN1_STRING_free(dest); *out = NULL; diff --git a/lib/libcrypto/asn1/a_object.c b/lib/libcrypto/asn1/a_object.c index a029a12fd80..5d91806ba45 100644 --- a/lib/libcrypto/asn1/a_object.c +++ b/lib/libcrypto/asn1/a_object.c @@ -1,4 +1,4 @@ -/* $OpenBSD: a_object.c,v 1.35 2021/12/25 08:52:44 jsing Exp $ */ +/* $OpenBSD: a_object.c,v 1.36 2021/12/25 13:17:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -261,7 +261,7 @@ a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num) BN_free(bl); return (len); -err: + err: if (tmp != ftmp) free(tmp); BN_free(bl); @@ -326,7 +326,7 @@ d2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, long length) *pp = p; return ret; -err: + err: ASN1error(i); return (NULL); } @@ -401,7 +401,7 @@ c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, long len) *pp = p; return (ret); -err: + err: if (a == NULL || ret != *a) ASN1_OBJECT_free(ret); return (NULL); diff --git a/lib/libcrypto/asn1/a_pkey.c b/lib/libcrypto/asn1/a_pkey.c index 2e97d32ab4f..3b8dea7db56 100644 --- a/lib/libcrypto/asn1/a_pkey.c +++ b/lib/libcrypto/asn1/a_pkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: a_pkey.c,v 1.2 2021/12/12 21:30:13 tb Exp $ */ +/* $OpenBSD: a_pkey.c,v 1.3 2021/12/25 13:17:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -118,7 +118,7 @@ d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp, long length) (*a) = ret; return (ret); -err: + err: if (a == NULL || *a != ret) EVP_PKEY_free(ret); return (NULL); diff --git a/lib/libcrypto/asn1/a_pubkey.c b/lib/libcrypto/asn1/a_pubkey.c index 7ad13e9761d..f3bb5d81a6a 100644 --- a/lib/libcrypto/asn1/a_pubkey.c +++ b/lib/libcrypto/asn1/a_pubkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: a_pubkey.c,v 1.2 2021/12/12 21:30:13 tb Exp $ */ +/* $OpenBSD: a_pubkey.c,v 1.3 2021/12/25 13:17:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -131,7 +131,7 @@ d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, long length) (*a) = ret; return (ret); -err: + err: if (a == NULL || *a != ret) EVP_PKEY_free(ret); return (NULL); diff --git a/lib/libcrypto/asn1/a_string.c b/lib/libcrypto/asn1/a_string.c index 7a9eabe6c60..6d227f3688f 100644 --- a/lib/libcrypto/asn1/a_string.c +++ b/lib/libcrypto/asn1/a_string.c @@ -1,4 +1,4 @@ -/* $OpenBSD: a_string.c,v 1.3 2021/12/25 12:11:57 jsing Exp $ */ +/* $OpenBSD: a_string.c,v 1.4 2021/12/25 13:17:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -298,7 +298,7 @@ i2a_ASN1_STRING(BIO *bp, const ASN1_STRING *a, int type) } return (n); -err: + err: return (-1); } @@ -384,9 +384,9 @@ a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size) bs->data = s; return (1); -err_sl: + err_sl: ASN1error(ASN1_R_SHORT_LINE); -err: + err: free(s); return (ret); } diff --git a/lib/libcrypto/asn1/asn1_gen.c b/lib/libcrypto/asn1/asn1_gen.c index ad7802cb11e..d800b77a6a1 100644 --- a/lib/libcrypto/asn1/asn1_gen.c +++ b/lib/libcrypto/asn1/asn1_gen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asn1_gen.c,v 1.17 2018/04/25 11:48:21 tb Exp $ */ +/* $OpenBSD: asn1_gen.c,v 1.18 2021/12/25 13:17:48 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2002. */ @@ -258,7 +258,7 @@ ASN1_generate_v3(const char *str, X509V3_CTX *cnf) /* Obtain new ASN1_TYPE structure */ ret = d2i_ASN1_TYPE(NULL, &cp, len); -err: + err: free(orig_der); free(new_der); @@ -478,7 +478,7 @@ asn1_multi(int utype, const char *section, X509V3_CTX *cnf) der = NULL; -bad: + bad: free(der); if (sk) sk_ASN1_TYPE_pop_free(sk, ASN1_TYPE_free); @@ -771,9 +771,9 @@ asn1_str2type(const char *str, int format, int utype) atmp->type = utype; return atmp; -bad_str: + bad_str: ERR_asprintf_error_data("string=%s", str); -bad_form: + bad_form: ASN1_TYPE_free(atmp); return NULL; } diff --git a/lib/libcrypto/asn1/asn1_item.c b/lib/libcrypto/asn1/asn1_item.c index d2819dbb965..7dad8e0df1c 100644 --- a/lib/libcrypto/asn1/asn1_item.c +++ b/lib/libcrypto/asn1/asn1_item.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asn1_item.c,v 1.2 2021/12/25 12:21:36 jsing Exp $ */ +/* $OpenBSD: asn1_item.c,v 1.3 2021/12/25 13:17:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -195,7 +195,7 @@ ASN1_item_pack(void *obj, const ASN1_ITEM *it, ASN1_STRING **oct) if (oct) *oct = octmp; return octmp; -err: + err: if (!oct || octmp != *oct) ASN1_STRING_free(octmp); return NULL; @@ -314,7 +314,7 @@ ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2, signature->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07); signature->flags |= ASN1_STRING_FLAG_BITS_LEFT; -err: + err: EVP_MD_CTX_cleanup(ctx); freezero((char *)buf_in, inl); freezero((char *)buf_out, outll); @@ -411,7 +411,7 @@ ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, /* memset(&ctx,0,sizeof(ctx)); */ ret = 1; -err: + err: EVP_MD_CTX_cleanup(&ctx); return (ret); } @@ -555,7 +555,7 @@ asn1_d2i_read_bio(BIO *in, BUF_MEM **pb) *pb = b; return off; -err: + err: if (b != NULL) BUF_MEM_free(b); return -1; @@ -576,7 +576,7 @@ ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x) p = (const unsigned char *)b->data; ret = ASN1_item_d2i(x, &p, len, it); -err: + err: if (b != NULL) BUF_MEM_free(b); return (ret); diff --git a/lib/libcrypto/asn1/asn1_old.c b/lib/libcrypto/asn1/asn1_old.c index d23cae06fbe..59e9cdb101a 100644 --- a/lib/libcrypto/asn1/asn1_old.c +++ b/lib/libcrypto/asn1/asn1_old.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asn1_old.c,v 1.1 2021/12/25 12:00:22 jsing Exp $ */ +/* $OpenBSD: asn1_old.c,v 1.2 2021/12/25 13:17:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -123,7 +123,7 @@ ASN1_d2i_bio(void *(*xnew)(void), d2i_of_void *d2i, BIO *in, void **x) p = (unsigned char *)b->data; ret = d2i(x, &p, len); -err: + err: if (b != NULL) BUF_MEM_free(b); return (ret); diff --git a/lib/libcrypto/asn1/asn1_par.c b/lib/libcrypto/asn1/asn1_par.c index 46049305932..aec71d3be9a 100644 --- a/lib/libcrypto/asn1/asn1_par.c +++ b/lib/libcrypto/asn1/asn1_par.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asn1_par.c,v 1.30 2021/12/14 17:35:21 jsing Exp $ */ +/* $OpenBSD: asn1_par.c,v 1.31 2021/12/25 13:17:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -97,7 +97,7 @@ asn1_print_info(BIO *bp, int tag, int xclass, int constructed, if (BIO_printf(bp, "%-18s", p) <= 0) goto err; return (1); -err: + err: return (0); } @@ -371,7 +371,7 @@ asn1_parse2(BIO *bp, const unsigned char **pp, long length, int offset, } ret = 1; -end: + end: if (o != NULL) ASN1_OBJECT_free(o); ASN1_OCTET_STRING_free(os); diff --git a/lib/libcrypto/asn1/asn_mime.c b/lib/libcrypto/asn1/asn_mime.c index 7a51808631e..31502143783 100644 --- a/lib/libcrypto/asn1/asn_mime.c +++ b/lib/libcrypto/asn1/asn_mime.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asn_mime.c,v 1.28 2021/12/12 21:30:13 tb Exp $ */ +/* $OpenBSD: asn_mime.c,v 1.29 2021/12/25 13:17:48 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. */ @@ -268,7 +268,7 @@ asn1_write_micalg(BIO *out, STACK_OF(X509_ALGOR) *mdalgs) ret = 1; -err: + err: return ret; } @@ -779,7 +779,7 @@ STACK_OF(MIME_HEADER) *mime_parse_hdr(BIO *bio) return headers; -merr: + merr: if (mhdr != NULL) mime_hdr_free(mhdr); sk_MIME_HEADER_pop_free(headers, mime_hdr_free); @@ -867,7 +867,7 @@ mime_hdr_new(char *name, char *value) goto err; } return mhdr; -err: + err: free(tmpname); free(tmpval); return NULL; @@ -902,7 +902,7 @@ mime_hdr_addparam(MIME_HEADER *mhdr, char *name, char *value) goto err; } return 1; -err: + err: free(tmpname); free(tmpval); return 0; diff --git a/lib/libcrypto/asn1/bio_asn1.c b/lib/libcrypto/asn1/bio_asn1.c index 9a14d2bb848..016e570480c 100644 --- a/lib/libcrypto/asn1/bio_asn1.c +++ b/lib/libcrypto/asn1/bio_asn1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bio_asn1.c,v 1.14 2021/11/27 13:10:33 schwarze Exp $ */ +/* $OpenBSD: bio_asn1.c,v 1.15 2021/12/25 13:17:48 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. */ @@ -271,7 +271,7 @@ asn1_bio_write(BIO *b, const char *in , int inl) } -done: + done: BIO_clear_retry_flags(b); BIO_copy_next_retry(b); diff --git a/lib/libcrypto/asn1/bio_ndef.c b/lib/libcrypto/asn1/bio_ndef.c index 890b1413049..88b204e8aa3 100644 --- a/lib/libcrypto/asn1/bio_ndef.c +++ b/lib/libcrypto/asn1/bio_ndef.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bio_ndef.c,v 1.10 2017/01/29 17:49:22 beck Exp $ */ +/* $OpenBSD: bio_ndef.c,v 1.11 2021/12/25 13:17:48 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. */ @@ -143,7 +143,7 @@ BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it) return sarg.ndef_bio; -err: + err: BIO_free(asn_bio); free(ndef_aux); return NULL; diff --git a/lib/libcrypto/asn1/n_pkey.c b/lib/libcrypto/asn1/n_pkey.c index cfc00887e56..40d8fa4240e 100644 --- a/lib/libcrypto/asn1/n_pkey.c +++ b/lib/libcrypto/asn1/n_pkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_pkey.c,v 1.34 2021/12/12 21:30:13 tb Exp $ */ +/* $OpenBSD: n_pkey.c,v 1.35 2021/12/25 13:17:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -316,7 +316,7 @@ i2d_RSA_NET(const RSA *a, unsigned char **pp, goto err; ret = i2d_NETSCAPE_ENCRYPTED_PKEY(enckey, pp); -err: + err: EVP_CIPHER_CTX_cleanup(&ctx); NETSCAPE_ENCRYPTED_PKEY_free(enckey); NETSCAPE_PKEY_free(pkey); @@ -365,7 +365,7 @@ d2i_RSA_NET(RSA **a, const unsigned char **pp, long length, *pp = p; -err: + err: NETSCAPE_ENCRYPTED_PKEY_free(enckey); return ret; @@ -424,7 +424,7 @@ d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os, goto err; } -err: + err: EVP_CIPHER_CTX_cleanup(&ctx); NETSCAPE_PKEY_free(pkey); return (ret); diff --git a/lib/libcrypto/asn1/p5_pbe.c b/lib/libcrypto/asn1/p5_pbe.c index 8fd416a3e52..a150b20bcdc 100644 --- a/lib/libcrypto/asn1/p5_pbe.c +++ b/lib/libcrypto/asn1/p5_pbe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p5_pbe.c,v 1.22 2017/01/29 17:49:22 beck Exp $ */ +/* $OpenBSD: p5_pbe.c,v 1.23 2021/12/25 13:17:48 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -159,7 +159,7 @@ PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter, if (X509_ALGOR_set0(algor, OBJ_nid2obj(alg), V_ASN1_SEQUENCE, pbe_str)) return 1; -err: + err: if (pbe != NULL) PBEPARAM_free(pbe); ASN1_STRING_free(pbe_str); diff --git a/lib/libcrypto/asn1/p5_pbev2.c b/lib/libcrypto/asn1/p5_pbev2.c index 54dd1eb614e..d88a4dfc64b 100644 --- a/lib/libcrypto/asn1/p5_pbev2.c +++ b/lib/libcrypto/asn1/p5_pbev2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p5_pbev2.c,v 1.26 2021/12/12 21:30:13 tb Exp $ */ +/* $OpenBSD: p5_pbev2.c,v 1.27 2021/12/25 13:17:48 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999-2004. */ @@ -274,10 +274,10 @@ PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter, unsigned char *salt, return ret; -merr: + merr: ASN1error(ERR_R_MALLOC_FAILURE); -err: + err: PBE2PARAM_free(pbe2); /* Note 'scheme' is freed as part of pbe2 */ X509_ALGOR_free(kalg); @@ -366,7 +366,7 @@ PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen, int prf_nid, PBKDF2PARAM_free(kdf); return keyfunc; -merr: + merr: ASN1error(ERR_R_MALLOC_FAILURE); PBKDF2PARAM_free(kdf); X509_ALGOR_free(keyfunc); diff --git a/lib/libcrypto/asn1/t_crl.c b/lib/libcrypto/asn1/t_crl.c index b7f94a86447..3ded015d2fd 100644 --- a/lib/libcrypto/asn1/t_crl.c +++ b/lib/libcrypto/asn1/t_crl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t_crl.c,v 1.19 2021/11/01 20:53:08 tb Exp $ */ +/* $OpenBSD: t_crl.c,v 1.20 2021/12/25 13:17:48 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -140,6 +140,6 @@ X509_CRL_print(BIO *out, X509_CRL *x) return 1; -err: + err: return 0; } diff --git a/lib/libcrypto/asn1/t_req.c b/lib/libcrypto/asn1/t_req.c index 320eaff9c00..cc9da46439a 100644 --- a/lib/libcrypto/asn1/t_req.c +++ b/lib/libcrypto/asn1/t_req.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t_req.c,v 1.20 2021/11/01 20:53:08 tb Exp $ */ +/* $OpenBSD: t_req.c,v 1.21 2021/12/25 13:17:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -194,7 +194,7 @@ X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags, ii = 0; count = sk_ASN1_TYPE_num( a->value.set); -get_next: + get_next: at = sk_ASN1_TYPE_value( a->value.set, ii); type = at->type; @@ -257,7 +257,7 @@ get_next: return (1); -err: + err: X509error(ERR_R_BUF_LIB); return (0); } diff --git a/lib/libcrypto/asn1/t_x509.c b/lib/libcrypto/asn1/t_x509.c index ff7871cd060..563edac0743 100644 --- a/lib/libcrypto/asn1/t_x509.c +++ b/lib/libcrypto/asn1/t_x509.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t_x509.c,v 1.36 2021/12/25 12:11:57 jsing Exp $ */ +/* $OpenBSD: t_x509.c,v 1.37 2021/12/25 13:17:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -244,7 +244,7 @@ X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, unsigned long cflag) } ret = 1; -err: + err: free(m); return (ret); } @@ -295,7 +295,7 @@ X509_ocspid_print(BIO *bp, X509 *x) return (1); -err: + err: free(der); return (0); } @@ -416,7 +416,7 @@ ASN1_GENERALIZEDTIME_print(BIO *bp, const ASN1_GENERALIZEDTIME *tm) else return (1); -err: + err: BIO_write(bp, "Bad time value", 14); return (0); } @@ -459,7 +459,7 @@ ASN1_UTCTIME_print(BIO *bp, const ASN1_UTCTIME *tm) else return (1); -err: + err: BIO_write(bp, "Bad time value", 14); return (0); } @@ -505,7 +505,7 @@ X509_NAME_print(BIO *bp, const X509_NAME *name, int obase) ret = 1; if (0) { -err: + err: X509error(ERR_R_BUF_LIB); } free(b); diff --git a/lib/libcrypto/asn1/tasn_dec.c b/lib/libcrypto/asn1/tasn_dec.c index e207691e2ea..21602f1ee6b 100644 --- a/lib/libcrypto/asn1/tasn_dec.c +++ b/lib/libcrypto/asn1/tasn_dec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tasn_dec.c,v 1.46 2021/12/14 17:35:21 jsing Exp $ */ +/* $OpenBSD: tasn_dec.c,v 1.47 2021/12/25 13:17:48 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -444,9 +444,9 @@ asn1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, return 0; } -auxerr: + auxerr: ASN1error(ASN1_R_AUX_ERROR); -err: + err: if (combine == 0) ASN1_item_ex_free(pval, it); if (errtt) @@ -533,7 +533,7 @@ asn1_template_ex_d2i(ASN1_VALUE **val, const unsigned char **in, long inlen, *in = p; return 1; -err: + err: ASN1_template_free(val, tt); return 0; } @@ -650,7 +650,7 @@ asn1_template_noexp_d2i(ASN1_VALUE **val, const unsigned char **in, long len, *in = p; return 1; -err: + err: ASN1_template_free(val, tt); return 0; } @@ -924,7 +924,7 @@ asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, int utype, ret = 1; -err: + err: if (!ret) { ASN1_TYPE_free(typ); if (opval) diff --git a/lib/libcrypto/asn1/tasn_new.c b/lib/libcrypto/asn1/tasn_new.c index 231d5f66ce9..24145c73ac8 100644 --- a/lib/libcrypto/asn1/tasn_new.c +++ b/lib/libcrypto/asn1/tasn_new.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tasn_new.c,v 1.19 2021/12/15 17:53:36 jsing Exp $ */ +/* $OpenBSD: tasn_new.c,v 1.20 2021/12/25 13:17:48 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -173,11 +173,11 @@ asn1_item_ex_combine_new(ASN1_VALUE **pval, const ASN1_ITEM *it, int combine) } return 1; -memerr: + memerr: ASN1error(ERR_R_MALLOC_FAILURE); return 0; -auxerr: + auxerr: ASN1error(ASN1_R_AUX_ERROR); ASN1_item_ex_free(pval, it); return 0; @@ -248,7 +248,7 @@ ASN1_template_new(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt) } /* Otherwise pass it back to the item routine */ ret = asn1_item_ex_combine_new(pval, it, tt->flags & ASN1_TFLG_COMBINE); -done: + done: return ret; } diff --git a/lib/libcrypto/asn1/tasn_utl.c b/lib/libcrypto/asn1/tasn_utl.c index 391ef01a575..e64bbe1f1a0 100644 --- a/lib/libcrypto/asn1/tasn_utl.c +++ b/lib/libcrypto/asn1/tasn_utl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tasn_utl.c,v 1.12 2017/01/29 17:49:22 beck Exp $ */ +/* $OpenBSD: tasn_utl.c,v 1.13 2021/12/25 13:17:48 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -272,7 +272,7 @@ asn1_do_adb(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt, int nullerr) goto err; return adb->default_tt; -err: + err: /* FIXME: should log the value or OID of unsupported type */ if (nullerr) ASN1error(ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE); diff --git a/lib/libcrypto/asn1/x_attrib.c b/lib/libcrypto/asn1/x_attrib.c index a40edc1f1d2..47b5afd95d2 100644 --- a/lib/libcrypto/asn1/x_attrib.c +++ b/lib/libcrypto/asn1/x_attrib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_attrib.c,v 1.15 2021/11/01 20:53:08 tb Exp $ */ +/* $OpenBSD: x_attrib.c,v 1.16 2021/12/25 13:17:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -194,7 +194,7 @@ X509_ATTRIBUTE_create(int nid, int atrtype, void *value) ASN1_TYPE_set(val, atrtype, value); return (ret); -err: + err: if (ret != NULL) X509_ATTRIBUTE_free(ret); if (val != NULL) diff --git a/lib/libcrypto/asn1/x_name.c b/lib/libcrypto/asn1/x_name.c index 4563a513483..4c698ac2f0d 100644 --- a/lib/libcrypto/asn1/x_name.c +++ b/lib/libcrypto/asn1/x_name.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_name.c,v 1.36 2021/11/01 20:53:08 tb Exp $ */ +/* $OpenBSD: x_name.c,v 1.37 2021/12/25 13:17:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -257,7 +257,7 @@ x509_name_ex_new(ASN1_VALUE **val, const ASN1_ITEM *it) *val = (ASN1_VALUE *)ret; return 1; -memerr: + memerr: ASN1error(ERR_R_MALLOC_FAILURE); if (ret) { if (ret->entries) @@ -337,7 +337,7 @@ x509_name_ex_d2i(ASN1_VALUE **val, const unsigned char **in, long len, *in = p; return ret; -err: + err: if (nm.x != NULL) X509_NAME_free(nm.x); ASN1error(ERR_R_NESTED_ASN1_ERROR); @@ -422,7 +422,7 @@ x509_name_encode(X509_NAME *a) a->modified = 0; return len; -memerr: + memerr: sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname.s, local_sk_X509_NAME_ENTRY_free); ASN1error(ERR_R_MALLOC_FAILURE); @@ -512,7 +512,7 @@ x509_name_canon(X509_NAME *a) i2d_name_canon(intname, &p); ret = 1; -err: + err: if (tmpentry) X509_NAME_ENTRY_free(tmpentry); if (intname) diff --git a/lib/libcrypto/asn1/x_pkey.c b/lib/libcrypto/asn1/x_pkey.c index c946281f4a0..fdf0e002f10 100644 --- a/lib/libcrypto/asn1/x_pkey.c +++ b/lib/libcrypto/asn1/x_pkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_pkey.c,v 1.20 2017/01/29 17:49:22 beck Exp $ */ +/* $OpenBSD: x_pkey.c,v 1.21 2021/12/25 13:17:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -91,7 +91,7 @@ X509_PKEY_new(void) ret->references = 1; return (ret); -err: + err: if (ret) { X509_ALGOR_free(ret->enc_algor); free(ret); diff --git a/lib/libcrypto/asn1/x_pubkey.c b/lib/libcrypto/asn1/x_pubkey.c index fecd6c97e30..69be6ed1f92 100644 --- a/lib/libcrypto/asn1/x_pubkey.c +++ b/lib/libcrypto/asn1/x_pubkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_pubkey.c,v 1.30 2021/12/12 21:30:13 tb Exp $ */ +/* $OpenBSD: x_pubkey.c,v 1.31 2021/12/25 13:17:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -169,7 +169,7 @@ X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) return 1; -error: + error: if (pk != NULL) X509_PUBKEY_free(pk); return 0; @@ -222,7 +222,7 @@ X509_PUBKEY_get0(X509_PUBKEY *key) return ret; -error: + error: EVP_PKEY_free(ret); return (NULL); } diff --git a/lib/libcrypto/asn1/x_x509.c b/lib/libcrypto/asn1/x_x509.c index 713ffbbb11e..7147069e832 100644 --- a/lib/libcrypto/asn1/x_x509.c +++ b/lib/libcrypto/asn1/x_x509.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_x509.c,v 1.29 2021/11/01 20:53:08 tb Exp $ */ +/* $OpenBSD: x_x509.c,v 1.30 2021/12/25 13:17:48 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -339,7 +339,7 @@ d2i_X509_AUX(X509 **a, const unsigned char **pp, long length) } return ret; -err: + err: X509_free(ret); return NULL; } diff --git a/lib/libcrypto/asn1/x_x509a.c b/lib/libcrypto/asn1/x_x509a.c index 572178157a6..87dc045a5f1 100644 --- a/lib/libcrypto/asn1/x_x509a.c +++ b/lib/libcrypto/asn1/x_x509a.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_x509a.c,v 1.17 2021/11/01 20:53:08 tb Exp $ */ +/* $OpenBSD: x_x509a.c,v 1.18 2021/12/25 13:17:48 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -228,7 +228,7 @@ X509_add1_trust_object(X509 *x, const ASN1_OBJECT *obj) if (rc != 0) return rc; -err: + err: ASN1_OBJECT_free(objtmp); return 0; } @@ -250,7 +250,7 @@ X509_add1_reject_object(X509 *x, const ASN1_OBJECT *obj) if (rc != 0) return rc; -err: + err: ASN1_OBJECT_free(objtmp); return 0; } |