summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/x_algor.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Hide global _it variables in x509.hbeck2024-07-081-1/+3
| | | | ok tb@
* Hide public symbols in x509.hbeck2024-04-091-1/+11
| | | | | | | This picks up most of the remaining public symbols in x509.h ok tb@
* Remove X509_ALGOR_set_md()tb2024-03-021-7/+1
| | | | | | | | One of those void APIs that are super hard to use safely since they can fail but can't communicate failure. Nothing uses this. Internal uses have been converted to error checked X509_ALGOR_set_evp_md(). ok jsing
* Use X509_ALGOR_set0_by_nid() in X509_ALGOR_set_evp_md()tb2023-11-011-6/+6
| | | | ok jsing
* Add X509_ALGOR_set0_by_nid()tb2023-11-011-1/+30
| | | | | | | | | | | | | X509_ALGOR_set0() is annoyingly unergonomic since it takes an ASN1_OBJECT rather than a nid. This means that almost all callers call OBJ_obj2nid() and they often do this inline without error checking so that the resulting X509_ALGOR object is corrupted and may lead to incorrect encodings. Provide an internal alternative X509_ALGOR_set0_by_nid() that takes a nid instead of an ASN1_OBJECT and performs proper error checking. This will be used to convert callers of X509_ALGOR_set0() in the library. ok jsing
* Explain the weird order of doing things in X509_ALGOR_set0()tb2023-11-011-1/+2
|
* Rename ptype and pval to parameter_type and parameter_valuetb2023-11-011-7/+9
| | | | ok jsing
* Unindent X509_ALGOR_set0_parameter()tb2023-11-011-8/+11
| | | | ok jsing
* Split X509_ALGOR_set0_parameter() out of X509_ALGOR_set0()tb2023-11-011-6/+15
| | | | ok jsing
* Split X509_ALGOR_set0_obj() out of X509_ALGOR_set0()tb2023-11-011-3/+12
| | | | ok jsing
* Some housekeeping in x_algortb2023-10-111-3/+5
| | | | | | Fix includes and zap an empty line. ok jsing
* Rewrite X509_ALGOR_set0()tb2023-10-111-17/+13
| | | | | | | | | | | | | | | | | | | | The current implementation is a complete mess. There are three cases: 1) ptype == V_ASN1_UNDEF: parameter must be freed and set to NULL. 2) ptype == 0: existing non-NULL parameters are left untouched, NULL parameters are replaced with ASN1_TYPE_new()'s wacky defaults. 3) otherwise allocate new parameters if needed and set them to ptype/pval. In all three cases free the algorithm and set it to aobj. The challenge now is to implement this using nine if statements and one else clause... We can do better. This preserves existing behavior. There would be cleaner implementations possible, but they would change behavior. There are many callers in the ecosystem that do not error check X509_ALGOR_set0() since OpenSSL failed to do so. So this was carefully rewritten to leave alg in a consisten state so that unchecking callers don't encounter corrupted algs. ok jsing
* Ensure that out_value is initialized even if out_type is NULLtb2023-10-111-1/+5
| | | | | | This fixes the printf in the x509_algor regress. ok jsing
* Rewrite X509_ALGOR_get0()tb2023-10-111-13/+19
| | | | | | | | Make the logic slightly less convoluted. Preserve the behavior that *ppval remains unset if pptype == NULL for now. However, ensure that *ppval is set to NULL if pptype is V_ASN1_UNDER. ok jsing
* Add internal version of X509_ALGOR_set_md()tb2023-10-111-6/+14
| | | | | | | | | | | | | | | | | | | X509_ALGOR_set_md() is a void function that cannot easily be error checked. The caller has to jump through hoops to make sure this function doesn't fail. Prepare replacing this internally with X509_ALGOR_set_evp_md(), which allows error checking. There is one slight change of behavior: if the EVP_MD object passed in does not have an OID known to the library, then this new API fails. It is unclear what the library should do with such an object and people who use EVP_MD_meth_new() need to know what they are doing anyway and they are better off teaching the lib about the OID if they're going to be messing with certs. Oh, and the prototype is in x509_local.h because the rest of this API is in x509.h despite being implemented in asn1/. ok jsing
* Clean up X509_ALGOR_cmp()tb2023-10-111-10/+10
| | | | | | | This is currently written in what is likely the most stupid way possible. Rewrite this function in a more straightforward way. ok jsing
* Unbreak the namespace build after a broken mk.conf and tool misfire hadbeck2023-07-071-12/+1
| | | | | | | | me aliasing symbols not in the headers I was procesing. This unbreaks the namespace build so it will pass again ok tb@
* Hide symbols in asn1 and biobeck2023-07-051-1/+12
| | | | ok jsing@
* Rewrite X509_ALGOR_set_md() without reaching into EVP_MD.tb2021-12-121-5/+3
| | | | ok inoguchi schwarze
* Convert a handful of X509_*() functions to take const as in OpenSSL.tb2018-05-011-3/+3
| | | | | tested in a bulk by sthen ok jsing
* Expand ASN1_ITEM_TEMPLATE/ASN1_EX_TEMPLATE_TYPE/ASN1_ITEM_TEMPLATE_ENDjsing2015-07-241-4/+18
| | | | macros - the generated assembly only differs by changes to line numbers.
* Remove initialisers with default values from the ASN1 data structures.jsing2015-02-111-5/+1
| | | | | Minor changes in generated assembly due to the compiler swapping from .quad 0/.long 0 to .zero, along with changes due to line numbering.
* Expand most of the ASN1_SEQUENCE* and associated macros, making the datajsing2015-02-111-5/+27
| | | | | | | | | | structures visible and easier to review, without having to wade through layers and layers of asn1t.h macros. Change has been scripted and the generated assembly only differs by changes to line numbers. Discussed with beck@ miod@ tedu@
* The IMPLEMENT_STACK_OF and IMPLEMENT_ASN1_SET_OF macros were turned intojsing2015-02-101-4/+1
| | | | | noops around 15 years ago. Remove multiple occurances of both that still exist in the code today.
* Expand IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname macros that got missed.jsing2015-02-101-2/+14
|
* Manually expand ASN1_ITEM_rptr macros that should have been expanded withjsing2015-02-101-2/+2
| | | | the IMPLEMENT_ASN1_DUP_FUNCTION macro.
* Expand the IMPLEMENT_ASN1_DUP_FUNCTION macro so that the code is visiblejsing2015-02-101-2/+7
| | | | | | | | | and functions can be readily located. Change has been scripted and the generated assembly only differs by changes to line numbers. Discussed with beck@ miod@ tedu@
* Expand the IMPLEMENT_ASN1_FUNCTIONS macro so that the code is visible andjsing2015-02-091-2/+26
| | | | | | | | | functions can be readily located. Change has been scripted and the generated assembly only differs by changes to line numbers. Discussed with beck@ miod@ tedu@
* Fix a number of issues relating to algorithms in signatures, Mostlybeck2015-01-281-1/+15
| | | | | | from OpenSSL with a hint of boring and some things done here. Addresses CVE-2014-8275 for OpenSSL fully ok miod@ doug@
* tags as requested by miod and teduderaadt2014-06-121-1/+1
|
* More KNF.jsing2014-04-181-13/+13
|
* lob a few more knf grenades in here to soften things up.tedu2014-04-181-12/+6
|
* putting most of the braces in the right column is the very least we can do.tedu2014-04-181-16/+16
|
* resolve conflictsdjm2012-10-131-0/+14
|
* resolve conflictsdjm2009-01-091-1/+1
|
* resolve conflictsdjm2008-09-061-0/+57
|
* OpenSSL 0.9.7 stable 2002 05 08 mergebeck2002-05-151-105/+60
|
* openssl-engine-0.9.6 mergebeck2000-12-151-1/+1
|
* OpenSSL 0.9.5 mergebeck2000-03-191-1/+1
| | | | | | *warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2 if you are using the ssl26 packages for ssh and other things to work you will need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs
* OpenSSL 0.9.4 mergebeck1999-09-291-18/+10
|
* Import of SSLeay-0.9.0b with RSA and IDEA stubbed + OpenBSD buildryker1998-10-051-0/+126
functionality for shared libs. Note that routines such as sslv2_init and friends that use RSA will not work due to lack of RSA in this library. Needs documentation and help from ports for easy upgrade to full functionality where legally possible.