Whitespace change only.
-/* $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.
*
}
return (ret);
-err:
+ err:
if (ret != ai)
ASN1_ENUMERATED_free(ret);
return (NULL);
}
return (n);
-err:
+ err:
return (-1);
}
bs->data = s;
return (1);
-err_sl:
+ err_sl:
ASN1error(ASN1_R_SHORT_LINE);
-err:
+ err:
free(s);
return (ret);
}
-/* $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.
*
}
return (ret);
-err:
+ err:
if (ret != ai)
ASN1_INTEGER_free(ret);
return (NULL);
}
return (n);
-err:
+ err:
return (-1);
}
bs->data = s;
return (1);
-err_sl:
+ err_sl:
ASN1error(ASN1_R_SHORT_LINE);
-err:
+ err:
free(s);
return (ret);
}
*pp = pend;
return (ret);
-err:
+ err:
ASN1error(i);
if (a == NULL || *a != ret)
ASN1_INTEGER_free(ret);
*pp = p;
return (ret);
-err:
+ err:
ASN1error(i);
if (a == NULL || *a != ret)
ASN1_INTEGER_free(ret);
-/* $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.
*/
traverse_string(in, len, inform, cpyfunc, &p);
return str_type;
-err:
+ err:
if (free_out) {
ASN1_STRING_free(dest);
*out = NULL;
-/* $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.
*
BN_free(bl);
return (len);
-err:
+ err:
if (tmp != ftmp)
free(tmp);
BN_free(bl);
*pp = p;
return ret;
-err:
+ err:
ASN1error(i);
return (NULL);
}
*pp = p;
return (ret);
-err:
+ err:
if (a == NULL || ret != *a)
ASN1_OBJECT_free(ret);
return (NULL);
-/* $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.
*
(*a) = ret;
return (ret);
-err:
+ err:
if (a == NULL || *a != ret)
EVP_PKEY_free(ret);
return (NULL);
-/* $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.
*
(*a) = ret;
return (ret);
-err:
+ err:
if (a == NULL || *a != ret)
EVP_PKEY_free(ret);
return (NULL);
-/* $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.
*
}
return (n);
-err:
+ err:
return (-1);
}
bs->data = s;
return (1);
-err_sl:
+ err_sl:
ASN1error(ASN1_R_SHORT_LINE);
-err:
+ err:
free(s);
return (ret);
}
-/* $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.
*/
/* Obtain new ASN1_TYPE structure */
ret = d2i_ASN1_TYPE(NULL, &cp, len);
-err:
+ err:
free(orig_der);
free(new_der);
der = NULL;
-bad:
+ bad:
free(der);
if (sk)
sk_ASN1_TYPE_pop_free(sk, ASN1_TYPE_free);
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;
}
-/* $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.
*
if (oct)
*oct = octmp;
return octmp;
-err:
+ err:
if (!oct || octmp != *oct)
ASN1_STRING_free(octmp);
return NULL;
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);
/* memset(&ctx,0,sizeof(ctx)); */
ret = 1;
-err:
+ err:
EVP_MD_CTX_cleanup(&ctx);
return (ret);
}
*pb = b;
return off;
-err:
+ err:
if (b != NULL)
BUF_MEM_free(b);
return -1;
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);
-/* $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.
*
p = (unsigned char *)b->data;
ret = d2i(x, &p, len);
-err:
+ err:
if (b != NULL)
BUF_MEM_free(b);
return (ret);
-/* $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.
*
if (BIO_printf(bp, "%-18s", p) <= 0)
goto err;
return (1);
-err:
+ err:
return (0);
}
}
ret = 1;
-end:
+ end:
if (o != NULL)
ASN1_OBJECT_free(o);
ASN1_OCTET_STRING_free(os);
-/* $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.
*/
ret = 1;
-err:
+ err:
return ret;
}
return headers;
-merr:
+ merr:
if (mhdr != NULL)
mime_hdr_free(mhdr);
sk_MIME_HEADER_pop_free(headers, mime_hdr_free);
goto err;
}
return mhdr;
-err:
+ err:
free(tmpname);
free(tmpval);
return NULL;
goto err;
}
return 1;
-err:
+ err:
free(tmpname);
free(tmpval);
return 0;
-/* $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.
*/
}
-done:
+ done:
BIO_clear_retry_flags(b);
BIO_copy_next_retry(b);
-/* $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.
*/
return sarg.ndef_bio;
-err:
+ err:
BIO_free(asn_bio);
free(ndef_aux);
return NULL;
-/* $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.
*
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);
*pp = p;
-err:
+ err:
NETSCAPE_ENCRYPTED_PKEY_free(enckey);
return ret;
goto err;
}
-err:
+ err:
EVP_CIPHER_CTX_cleanup(&ctx);
NETSCAPE_PKEY_free(pkey);
return (ret);
-/* $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.
*/
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);
-/* $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.
*/
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);
PBKDF2PARAM_free(kdf);
return keyfunc;
-merr:
+ merr:
ASN1error(ERR_R_MALLOC_FAILURE);
PBKDF2PARAM_free(kdf);
X509_ALGOR_free(keyfunc);
-/* $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.
*/
return 1;
-err:
+ err:
return 0;
}
-/* $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.
*
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;
return (1);
-err:
+ err:
X509error(ERR_R_BUF_LIB);
return (0);
}
-/* $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.
*
}
ret = 1;
-err:
+ err:
free(m);
return (ret);
}
return (1);
-err:
+ err:
free(der);
return (0);
}
else
return (1);
-err:
+ err:
BIO_write(bp, "Bad time value", 14);
return (0);
}
else
return (1);
-err:
+ err:
BIO_write(bp, "Bad time value", 14);
return (0);
}
ret = 1;
if (0) {
-err:
+ err:
X509error(ERR_R_BUF_LIB);
}
free(b);
-/* $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.
*/
return 0;
}
-auxerr:
+ auxerr:
ASN1error(ASN1_R_AUX_ERROR);
-err:
+ err:
if (combine == 0)
ASN1_item_ex_free(pval, it);
if (errtt)
*in = p;
return 1;
-err:
+ err:
ASN1_template_free(val, tt);
return 0;
}
*in = p;
return 1;
-err:
+ err:
ASN1_template_free(val, tt);
return 0;
}
ret = 1;
-err:
+ err:
if (!ret) {
ASN1_TYPE_free(typ);
if (opval)
-/* $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.
*/
}
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;
}
/* 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;
}
-/* $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.
*/
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);
-/* $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.
*
ASN1_TYPE_set(val, atrtype, value);
return (ret);
-err:
+ err:
if (ret != NULL)
X509_ATTRIBUTE_free(ret);
if (val != NULL)
-/* $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.
*
*val = (ASN1_VALUE *)ret;
return 1;
-memerr:
+ memerr:
ASN1error(ERR_R_MALLOC_FAILURE);
if (ret) {
if (ret->entries)
*in = p;
return ret;
-err:
+ err:
if (nm.x != NULL)
X509_NAME_free(nm.x);
ASN1error(ERR_R_NESTED_ASN1_ERROR);
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);
i2d_name_canon(intname, &p);
ret = 1;
-err:
+ err:
if (tmpentry)
X509_NAME_ENTRY_free(tmpentry);
if (intname)
-/* $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.
*
ret->references = 1;
return (ret);
-err:
+ err:
if (ret) {
X509_ALGOR_free(ret->enc_algor);
free(ret);
-/* $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.
*
return 1;
-error:
+ error:
if (pk != NULL)
X509_PUBKEY_free(pk);
return 0;
return ret;
-error:
+ error:
EVP_PKEY_free(ret);
return (NULL);
}
-/* $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.
*
}
return ret;
-err:
+ err:
X509_free(ret);
return NULL;
}
-/* $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.
*/
if (rc != 0)
return rc;
-err:
+ err:
ASN1_OBJECT_free(objtmp);
return 0;
}
if (rc != 0)
return rc;
-err:
+ err:
ASN1_OBJECT_free(objtmp);
return 0;
}