summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/asn1.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Hide a couple of LCRYPTO_UNUSED in asn1.hbeck2024-04-101-7/+1
| | | | | | and remove the LIBRESSL_INTERNAL guards around them ok tb@
* Remove beck's ASN.1 time API from public visibilitytb2024-03-021-4/+1
| | | | | | | | | | | | This API was needed since OpenSSL didn't have one. We now have variants of OpenSSL's API and will also expose BoringSSL's complementary API. The users of this API were ported to the OpenSSL variants and some may switch to BoringSSL's in the future. Part of it is still used internally. ASN1_time_tm_clamp_notafter() is still used by libtls (and only libtls). This will be fixed in a future bump. ok jsing
* Remove ASN1_PCTX nonsensetb2024-03-021-13/+1
| | | | | | | | This is only used by the fuzzing code. Another bit of poorly thought out extensibility that makes people pass NULL pointers to a bunch of APIs. ok jsing
* Make ASN1_add_oid_module internaltb2024-03-021-3/+1
| | | | ok jsing
* Remove unused M_ASN1_* macrostb2024-03-021-14/+1
| | | | | | | The last comsumer, telephony/asterisk, was adjusted a few months back. pointed out by brad ok jsing
* Remove unused, incomplete ub_* macrostb2024-03-021-12/+1
| | | | | | | The only consumer, a_strnid.c, has its own, slightly more complete, up to date, and less incorrect, version of these. ok jsing
* Remove DECLARE_STACK_OF(ASN1_STRING_TABLE)tb2024-03-021-4/+1
| | | | | | Another remnant of the unused ASN1_STRING_TABLE extensibility goes away. ok jsing
* Remove ASN1_STRING_TABLE_{add,cleanup}tb2024-03-021-3/+1
| | | | | | | This was API for the ASN1_STRING_TABLE extensibility which has been neutered for months and was completely unused in the ecosystem. ok jsing
* const correct ASN1_STRING_TABLE_get()tb2024-03-021-2/+2
| | | | | | | | The ability of modifying the ASN1_STRING_TABLE was removed and the table is now static. Stop casting away const. The only consumer, security/xca, is already fixed. ok jsing
* Add posix_time.h from BoringSSLtb2024-02-181-6/+1
| | | | | | | | | | | | | | | | This is prepares to expose some internal API as OPENSSL_tm_to_posix() and OPENSSL_posix_to_tm(). They will be used in libtls and ocspcheck(8) to get rid of the portability nightmare that is timegm(). Also fix the location of OPENSSL_gmtime() and OPENSSL_timegm() (this API is not yet exposed). The former is from OpenSSL and surprisingly lives in crypto.h, not asn1.h, and the latter is BoringSSL API and lives in the new posix_time.h. Initial diff from beck, this pulls in further upstream work after review feedback. ok jsing
* asn1.h: mark a type and a bunch of macros for removaltb2023-12-161-2/+3
| | | | ok jsing
* Prepare to expose OPENSSL_gmtime and OPENSSL_timegm as publicbeck2023-11-131-1/+6
| | | | | | | | | | | This matches when BoringSSL has done, and allows for getting rid of the dependency on system timegm() and gmtime() in libtls. which will make life easier for portable, and remove our dependency on the potentially very slow system versions. ok tb@ - tb will handle the minor bump bits and expose on the next minor bump CVS :----------------------------------------------------------------------
* Remove more ASN1_BIT_STRING APItb2023-07-281-9/+1
| | | | | | | | | This removes ASN1_BIT_STRING_name_print(), ASN1_BIT_STRING_{num,set}_asc(). Before trust was properly handled using OIDs, there was a period where it used bit strings. The actual interfaces used in openssl x509 were removed, but the functions they wrapped remained unused for the next 24 years. ok jsing
* Remove ASN1_BIT_STRING_checktb2023-07-281-3/+1
| | | | | | | | This was added with the TS code for no discernible reason. I could not find a single consumer. In the unlikely event that you need this, it is easy enough to write a better version of it yourself. ok jsing
* Remove ASN1_bn_print() and ASN1_buf_print()tb2023-07-281-4/+1
| | | | | | | | | | ASN1_bn_print() is a hilariously bad API that was replaced with a saner interface internally. ASN1_buf_print() isn't terrible, but it is too specialized to be of real use. It was only exposed because ASN1_bn_print() was already there. Its only use had been in the EdDSA printing code before it was replaced with an internal helper. ok jsing
* Make ASN.1 BIO internaltb2023-07-281-3/+1
| | | | | | | | | | | | With every bump we can remove a bit more of the ASN.1 BIO and the streaming interface. At some point enough will be internal so that we can rewrite it and bring it in a shape where mere mortals can follow all the twists and turns. This is the next step: BIO_f_asn1(3) goes away and takes BIO_asn1_{get,set}_{prefix,suffix}() with it, a bunch of functions helping along in a write-after-free recently. The getters go away, the setters stay for now. ok jsing
* Move low level BIO_new_NDEF API to internal-onlytb2023-04-251-17/+1
|
* Mark the NDEF API for removaltb2023-04-241-1/+6
| | | | Discussed with jsing and beck
* Bring includes into canonical ordertb2023-04-181-2/+2
| | | | Requested by jsing
* Move some includes out of OPENSSL_NO_DEPRECATEDtb2023-04-181-3/+1
| | | | | | | | | | | | | Some headers were included conditionally on OPENSSL_NO_DEPRECATED in hopes that eventually the mess of everything includes everything will magically resolve itself. Of course everyone would end up building openssl with OPENSSL_NO_DEPRECATED over time... Right. Surprisingly, the ecosystem has come to rely on these implicit inclusions, so about two dozen ports would fail to build because of this. Patching this would be easy but really not worth the effort. ok jsing
* Expose ASN1_buf_print() in asn1.htb2022-11-131-3/+1
| | | | | This is needed to print the 32-byte Ed25519 keys which aren't handled as BNs.
* Port ASN1_buf_print() from OpenSSL 1.1.jsing2022-11-101-1/+4
| | | | | | This is needed to print byte array based keys, such as Ed25519 and X25519. ok beck@ tb@
* Remove c2i_* and i2c_* from public visibilitytb2022-09-111-9/+1
| | | | | | | | This removes c2i_ASN1_OBJECT(), {c2i,i2c}_ASN1_BIT_STRING() and {c2i,i2c}_ASN1_INTEGER(). These are not part of the OpenSSL 1.1 API and should never have been exposed in the first place. ok jsing
* Provide ASN1_R_TYPE_NOT_PRIMITIVE.jsing2022-08-291-1/+2
| | | | | | Needed for an upcoming change. ok tb@
* Remove mkerr.pl remnants from LibreSSLkn2022-07-121-5/+1
| | | | | | | This script is not used at all and files are edited by hand instead. Thus remove misleading comments incl. the obsolete script/config. Feedback OK jsing tb
* Expose new API in headers.tb2022-07-071-7/+1
| | | | | | | These are mostly security-level related, but there are also ASN1_TIME and ASN_INTEGER functions here, as well as some missing accessors. ok jsing
* The OpenSSL API is called ASN1_TIME_set_string_X509() (uppercase x)tb2022-07-041-2/+2
|
* Add new time manipulation funcitons that OpenSSL has exposed thatbeck2022-06-271-1/+8
| | | | | | | | the world seems to be using. Symbols.list changes and exposure to wait for minor bump ok jsing@ jca@
* Reuse ASN1_INTEGER functions for ASN1_ENUMERATED_{get,set}()jsing2022-06-251-1/+5
| | | | | | | Instead of having a separate get/set implementation, reuse the ASN1_INTEGER code. Also prepare to provide ASN1_ENUMERATED_{get,set}_int64(). ok beck@ tb@
* Rewrite ASN1_INTEGER_{get,set}() using CBS/CBBjsing2022-06-251-2/+11
| | | | | | In the process, prepare to provide ASN1_INTEGER_{get,set}_{u,}int64(). ok beck@ tb@
* Move ASN1_BOOLEAN to internal only.tb2022-01-141-4/+1
| | | | | | | This moves {d2i,i2d}_ASN1_BOOLEAN() to internal only. They are unused, but help us testing the encoding. ok jsing
* Remove obsolete key formatstb2022-01-141-14/+1
| | | | | | | | | | This removes NETSCAPE_X509, NETSCAPE{,_ENCRYPTED}_PKEY, RSA_NET, Netscape_RSA things. Some of the nasty tentacles that could go in principle are used in some test suites, so we need to keep them... All this was removed as part of OpenSSL commit 0bc2f365. ok inoguchi jsing
* Remove ASN1_OBJECT internals from public visibility.tb2022-01-141-15/+1
| | | | | | | | Move the struct declaration to asn1_locl.h and add a forward declaration to ossl_typ.h. This makes struct visibility in the asn1 headers match OpenSSL. ok inoguchi jsing
* Remove ASN1{_const,}_check_infinite_endtb2022-01-141-3/+1
| | | | | | Suggested by schwarze ok inoguchi jsing
* Remove ASN1{,_const}_CTXtb2022-01-141-35/+1
| | | | | | | These are leftovers of the old ASN.1 stuff. Nothing uses this. OpenSSL removed them in a469a677. ok inoguchi jsing
* Prevent future internal use of ASN1_CTX and ASN1_const_CTX by wrappingtb2021-11-181-1/+3
| | | | | | them inside #ifndef LIBRESSL_INTERNAL. suggested by jsing
* Unifdef LIBRESSL_NEW_API. Now that the library is bumped, this istb2021-11-011-3/+1
| | | | | | no longer needed. ok jsing
* Add ASN1_TIME_diff from OpenSSL.beck2021-10-271-1/+6
| | | | | | The symbol is not yet exposed and will show up with tb@'s forthcoming bump ok tb@ jsing@
* Fix a NULL dereference in GENERAL_NAME_cmp()tb2020-12-081-1/+2
| | | | | | | | | | | | Comparing two GENERAL_NAME structures containing an EDIPARTYNAME can lead to a crash. This enables a denial of service attack for an attacker who can control both sides of the comparison. Issue reported to OpenSSL on Nov 9 by David Benjamin. OpenSSL shared the information with us on Dec 1st. Fix from Matt Caswell (OpenSSL) with a few small tweaks. ok jsing
* Restore function prototype for ASN1_dup, fixing usage on I32LP64 platforms.jeremy2018-11-301-1/+7
| | | | | | This prototype was removed inadvertantly in r1.50. OK jsing@
* Add const to the data argument of ASN1_set{,_int}_octetstring().tb2018-11-091-3/+3
| | | | | | From Ben L bobsayshilol () live ! co ! uk ok jsing
* Remove some function prototypes that should have been removed in thejsing2018-11-081-10/+2
| | | | | | previous clean up. Spotted by bcook@
* Remove a bunch of ancient and highly crufty ASN.1 related code fromjsing2018-10-241-218/+15
| | | | | | libcrypto (the "new" stuff replaced this back around 2000 or so...). ok tb@
* The 'in' argument of ASN1_STRING_to_UTF8() is now adorned with const.tb2018-05-191-2/+2
| | | | | tested in a bulk build by sthen ok jsing
* const for BIO_{new,set}() and most of the BIO_{f,s}_*() family oftb2018-05-011-2/+2
| | | | | | functions. ok beck, jsing
* remove whitespace before closing parenstb2018-04-251-5/+5
|
* Add const to functions in asn1/asn1.h as they did in OpenSSL.tb2018-04-251-36/+38
| | | | | | | BIO_f_asn1() will be taken care of later. Tested in a bulk by sthen ok bcook jca jsing
* Limit ASN.1 constructed types recursive definition depthinoguchi2018-03-291-1/+2
| | | | | | | | Fixes for CVE-2018-0739. Copied from commit below, and modified for adaption to our code. https://github.com/openssl/openssl/commit/9310d45087ae546e27e61ddf8f6367f29848220d ok bcook@ beck@ jsing@
* Provide ASN1_STRING_get0_data().jsing2018-02-141-2/+3
|
* Add ASN1_TIME_set_tm to set an asn1 from a struct tm *beck2017-05-061-1/+2
| | | | ok jsing@