summaryrefslogtreecommitdiff
path: root/lib/libcrypto/objects
AgeCommit message (Collapse)Author
2023-04-25Add NIDs for truncated SHA-2, SHA-3 and related thingsTheo Buehler
From jsing
2022-12-26spelling fixes; from paul tagliamonteJason McIntyre
i removed the arithmetics -> arithmetic changes, as i felt they were not clearly correct ok tb
2022-11-26Make internal header file names consistentTheo Buehler
Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names used for internal headers. Move all these headers we inherited from OpenSSL to *_local.h, reserving the name *_internal.h for our own code. Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h. constant_time_locl.h is moved to constant_time.h since it's special. Adjust all .c files in libcrypto, libssl and regress. The diff is mechanical with the exception of tls13_quic.c, where #include <ssl_locl.h> was fixed manually. discussed with jsing, no objection bcook
2022-11-13Add ED25519 aliases for NID, SN and OBJTheo Buehler
The Ed25519 versions already existed, but OpenSSL chose to uppercase the D.
2022-11-11Stop pretending that obj_mac.h is optional.Joel Sing
This is effectively: unifdef -m -DUSE_OBJ_MAC objects/objects.h ok beck@, with extreme prejudice.
2022-11-10Map objects for ED25519 to Ed25519.Joel Sing
OpenSSL used ED25519, even though the RFCs use Ed25519 - as such, we get to provide both. ok tb@
2022-11-08In case lh_OBJ_NAME_insert returns NULL due to a failed malloc, onpMoritz Buhl
is leaked in OBJ_NAME_add. ok tb Found by CodeChecker.
2022-09-15Add OID for RPKI signedTAL objectsJob Snijders
IANA made a permanent registration in the SMI Security for S/MIME CMS Content Type registry at https://www.iana.org/assignments/smi-numbers/smi-numbers.xhtml#security-smime-1 for signed objects conforming to draft-ietf-sidrops-signed-tal. OK tb@
2022-07-16Add NID for signingCertificateV2Klemens Nanni
https://oidref.com/1.2.840.113549.1.9.16.2.47 OK tb
2022-07-12Remove mkerr.pl remnants from LibreSSLKlemens Nanni
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
2022-05-05Add NID for HKDFTheo Buehler
ok beck jsing
2022-03-19Provide t2i_ASN1_OBJECT_internal() and use it for OBJ_txt2obj()Joel Sing
The current OBJ_txt2obj() implementation converts the text to ASN.1 object content octets, builds a full DER encoding from it, then feeds the entire thing back through the DER to ASN.1 object conversion. Rather than doing this crazy dance, provide an t2i_ASN1_OBJECT_internal() function that converts the text to ASN.1 object content octets, then creates a new ASN1_OBJECT and attaches the content octets to it. ok inoguchi@ tb@
2022-03-02Rewrite ASN1_OBJECT content to ascii/text conversion.Joel Sing
Rewrite the ASN1_OBJECT content to ascii/text conversion code using CBB and CBS. Currently there is a strange split with i2t_ASN1_OBJECT() calling OBJ_obj2txt() which implements the conversion, while OBJ_txt2obj() calls back into the misnamed a2d_ASN1_OBJECT() function. Move the conversion code into asn1/a_object.c and have OBJ_txt2obj() call that instead. ok inoguchi@ tb@
2022-02-12Limit OID text conversion to 64 bits per arc.Joel Sing
The current implementation uses an unsigned long, then switches to BN once the arc exceeds its size. However, the complexity of BN_bn2dec() is quadratic in the length of number being converted. This means that OIDs with excessively large arcs take a lot of computation to convert to text. While the X.660 specification states that arcs are unbounded, in reality they are not overly large numbers - 640K^W64 bits ought to be enough for any arc. Remove BN entirely, switch from unsigned long to uin64_t and fail if an arc exceeds this size. Identified via oss-fuzz timeouts - should fix #41028 and #44372. ok tb@
2022-02-11Make OBJ_obj2nid() work correctly with NID_undef.Joel Sing
Currently OBJ_obj2nid() with NID_undef returns NID_ccitt - this is due to doing a lookup on an empty value and having NID_undef conflict with an uninitialised NID value. Somewhat based on OpenSSL 0fb99904809. ok tb@
2022-01-14Hide OBJ_bsearch_ from public visibility,Theo Buehler
This removes OBJ_bsearch_ex_() from the exported symbols and makes OBJ_bsearch_() semi-private. It is still used in libssl. While here, remove some hideous unused macros ok inoguchi jsing
2022-01-14Remove check_defer and obj_cleanup_defer from public visibilityTheo Buehler
ok inoguchi jsing
2022-01-14Unifdef LIBRESSL_OPAQUE_* and LIBRESSL_NEXT_APITheo Buehler
This marks the start of major surgery in libcrypto. Do not attempt to build the tree for a while (~50 commits).
2022-01-08Prepare to provide OBJ_length() and OBJ_get0_data()Theo Buehler
OBJ_length() turns the int obj->length into a size_t, so add an overflow check. While obj->length should never be negative, who knows... ok jsing
2022-01-08tiny whitespace tweakTheo Buehler
2022-01-07include asn1_locl.h where it will be needed for the bump.Theo Buehler
discussed with jsing
2021-11-24Make the certificate transparency code build with the rest of the libraryBob Beck
Do not expose it yet, this will wait for an upcoming bump ok tb@
2021-11-09Add ASPA OIDJob Snijders
draft-ietf-sidrops-aspa-profile OK tb@
2021-10-26Add tlsfeature NIDJob Snijders
OK beck@ tb@
2021-09-11Add BGPSec Router (RFC 8209) Key Purpose OIDJob Snijders
OK tb@
2021-09-01Remove assignment of value that is never read.Bob Beck
ok tb@
2021-05-19Adjust libcrypto obj_xref.txt to obj_xref.hKinichiro Inoguchi
To generate current obj_xref.h, third item of lines id_tc26_signwithdigest_gost3410_2012_256/512 should be id_GostR3410_2001. obj_xref.txt r1.2 and obj_xref.h r1.3 were committed at the same time, and these third item were coded different value each other. This adjusts obj_xref.txt to current obj_xref.h. ok tb@
2021-05-14Improve libcrypto obj_xref.h generatorKinichiro Inoguchi
Modify objxref.pl to output $OpenBSD$ header and __BEGIN_HIDDEN_DECLS / __END_HIDDEN_DECLS . ok and comment from tb@
2021-05-12Add obj_xref for ECDH schemes in RFC 5753Kinichiro Inoguchi
Found missing sigoid_srt record in crypto/objects/obj_xref.h, and this causes error while executing openssl cms -encrypt with EC key/cert. Added required definitions to obj_xref.txt and obj_xref.h. Issue reported by Theodore Wynnychenko (tmw <at> uchicago.edu) on misc. ok tb@
2021-05-09Add draft-ietf-sidrops-rpki-rsc OIDjob
Listed under 'SMI Security for S/MIME CMS Content Type (1.2.840.113549.1.9.16.1)' https://www.iana.org/assignments/smi-numbers/smi-numbers.xhtml#security-smime-1 OK tb@
2021-02-03Add OID for draft-ietf-opsawg-finding-geofeedsjob
https://tools.ietf.org/html/draft-ietf-opsawg-finding-geofeeds describes a mechanism to authenticate RFC 8805 Geofeed data files through the RPKI. OpenSSL counterpart https://github.com/openssl/openssl/pull/14050 OK tb@ jsing@
2021-02-02Add a bunch of RPKI OIDsjob
RFC6482 - A Profile for Route Origin Authorizations (ROAs) RFC6484 - Certificate Policy (CP) for the RPKI RFC6493 - The RPKI Ghostbusters Record RFC8182 - The RPKI Repository Delta Protocol (RRDP) RFC8360 - RPKI Validation Reconsidered draft-ietf-sidrops-rpki-rta - A profile for RTAs Also in OpenSSL: https://github.com/openssl/openssl/commit/d3372c2f35495d0c61ab09daf7fba3ecbbb595aa OK sthen@ tb@ jsing@
2020-06-05Add OIDs for HMAC using Streebog (GOST R 34.11-2012) hash function.Joel Sing
Diff from Dmitry Baryshkov <dbaryshkov@gmail.com> Sponsored by ROSA Linux ok inoguchi@ tb@
2020-06-05Add support for additional GOST curves.Joel Sing
These GOST curves are defined in RFC 7836 and draft-deremin-rfc4491-bis. Add aliases for 256-bit GOST curves (see draft-smyshlyaev-tls12-gost-suites) and rename the 512-bit curve ids to follow names defined in tc26 OID registry. Diff from Dmitry Baryshkov <dbaryshkov@gmail.com> Sponsored by ROSA Linux. ok inoguchi@
2019-11-01Provide NID for pSpecified.Joel Sing
ok tb@
2019-09-05Add objects for ECDH schemes in RFC 5753.Joel Sing
Based on OpenSSL 1.1.1b. ok inoguchi@ tb@
2019-07-03snprintf/vsnprintf return < 0 on error, rather than -1.Theo de Raadt
2019-04-19Allocate fixed NIDs for SM3/SM4.Joel Sing
2019-03-17Add the SM4 block cipher from the Chinese standard GB/T 32907-2016.Theo Buehler
This is an ISC licensed version based on the sources by Ribose Inc that were ported to OpenSSL in 2017. Patch from Daniel Wyatt with minor tweaks. ok inoguchi, jsing
2019-03-02Fix OID for sm3WithRSAEncryption which was apparently mixed upTheo Buehler
with the OID for SM2 signing with SM3. From Daniel Wyatt
2018-11-11Add Ribose Inc's implementation of the SM3 hashing function withTheo Buehler
tweaks from jsing and myself. The SM2/SM3/SM4 algorithms are mandatory for legal use of cryptography within China and [are] widely applied in the country, covering identification/financial cards, contactless, TPM 2.0 and PKI. ok beck inoguchi jsing
2018-09-08ASN1_OBJECTs should be freed with ASN1_OBJECT_free(3), not with free(3).Theo Buehler
ok inoguchi, jsing
2018-09-08indent labelsTheo Buehler
2018-09-08missing word & a couple of typosTheo Buehler
2018-03-17Provide object identifier for chacha20-poly1305.Joel Sing
2018-03-17Provide object identifiers for TLS cipher suite key exchange andJoel Sing
authentication.
2017-05-25Add definitions for three OIDs used in EV certificates.Joel Sing
From Kyle J. McKay <mackyle at gmail dot com>
2017-02-28Fix typo in issuingDistributionPoint description.Joel Sing
2017-01-29Send the function codes from the error functions to the bit bucket,Bob Beck
as was done earlier in libssl. Thanks inoguchi@ for noticing libssl had more reacharounds into this. ok jsing@ inoguchi@
2017-01-21Place {DECLARE,IMPLEMENT}_OBJ_BSEARCH{_GLOBAL,}_CMP_FN macros undefJoel Sing
LIBRESSL_INTERNAL.