summaryrefslogtreecommitdiff
path: root/lib/libcrypto
AgeCommit message (Collapse)Author
2022-01-22Use memmove instead of memcpy for overlapping memoryKinichiro Inoguchi
CID 251047 251094 OK beck@ jsing@ millert@ tb@
2022-01-22Use memmove instead of memcpy for overlapping memoryKinichiro Inoguchi
CID 250936 251103 OK beck@ jsing@ millert@ tb@
2022-01-22X509_GET_PUBKEY(3) return value check in libcryptoKinichiro Inoguchi
CID 345116 ok beck@ tb@
2022-01-22X509_GET_PUBKEY(3) return value check in libcryptoKinichiro Inoguchi
CID 25131 ok beck@ tb@ suggest using X509_REQ_get0_pubkey() and remove the EVP_PKEY_free() from tb@
2022-01-22X509_GET_PUBKEY(3) return value check in libcryptoKinichiro Inoguchi
ok beck@ tb@ suggest using X509_get0_pubkey() and remove EVP_PKEY_free() from tb@
2022-01-22X509_GET_PUBKEY(3) return value check in libcryptoKinichiro Inoguchi
ok beck@ tb@
2022-01-22X509_GET_PUBKEY(3) return value check in libcryptoKinichiro Inoguchi
ok beck@ tb@
2022-01-20Add check for EVP_CIPHER_CTX_ctrlKinichiro Inoguchi
suggestion from tb@
2022-01-20Add check for EVP_CIPHER_CTX_set_key_length return valueKinichiro Inoguchi
CID 21653 ok jsing@ millert@ tb@
2022-01-20Add check for OBJ_nid2obj return valueKinichiro Inoguchi
input from tb@
2022-01-20Add check for ASN1_INTEGER_setKinichiro Inoguchi
CID 24893 ok jsing@ millert@ tb@
2022-01-20Fix check for BN_mod_inverse_ct return valueKinichiro Inoguchi
ok jsing@ millert@ tb@
2022-01-20Add check for BN_sub return valueKinichiro Inoguchi
CID 24839 ok jsing@ millert@ tb@
2022-01-20Fix check for BN_mod_inverse_ct return valueKinichiro Inoguchi
ok jsing@ millert@ tb@
2022-01-20Add check for BIO_indent return valueKinichiro Inoguchi
CID 24778 ok jsing@ millert@ tb@
2022-01-20Fix check for BN_mod_inverse_ct return valueKinichiro Inoguchi
ok jsing@ millert@ tb@
2022-01-20Fix check for BN_mod_inverse_ct return valueKinichiro Inoguchi
ok jsing@ millert@ tb@
2022-01-20Add check for BIO_indent return valueKinichiro Inoguchi
CID 24812 ok jsing@ millert@ tb@
2022-01-20Add check for EVP_CIPHER_CTX_set_key_length return valueKinichiro Inoguchi
It returns 1 on success and 0 for failure, never negative value. ok jsing@ millert@ tb@
2022-01-20Add and fix check for BN functions return valueKinichiro Inoguchi
ok jsing@ millert@ tb@
2022-01-20Add check for BN functions return valueKinichiro Inoguchi
CID 21665 24835 comment from jsing@ and tb@ ok jsing@ millert@ tb@
2022-01-20Add check for BIO_indent return valueKinichiro Inoguchi
CID 24869 ok jsing@ millert@ tb@
2021-08-18Import initial code for the SM2 cipherTheo Buehler
This adds the SM2 algorithm defined in the Chinese standards GB/T 32918.1-2016, GB/T 32918.2-2016, GB/T 32918.3-2016, GB/T 32918.4-2016 and GB/T 32918.5-2017. This is an ISC licensed implementation contributed by Ribose.inc, based on the same code that was contributed to OpenSSL by Jack Lloyd. The port to LibreSSL was done by Ronald Tse and Nickolay Olshevsky. Github PR #105 I made quite a few cleanup passes on this, but more is needed, some of which will happen in-tree before this is linked to the build. ok deraadt inoguchi (a long time ago), jsing
2022-01-19Document the bizarre fact that {CMS,PCKS7}_get0_signers() needs someTheo Buehler
freeing of what they return despite being get0 functions: the stack of X509s that they return must be freed with sk_X509_free(). The get0 thus probably refers to the individual certs, but not to the stack itself. The libcrypto and libssl APIs never cease to amaze with new traps. ok inoguchi
2022-01-19Check return value from EVP_CIPHER_CTX_new in cms_pwri.cKinichiro Inoguchi
CID 345137 ok jsing@ tb@
2022-01-15spellingJonathan Gray
ok tb@
2022-01-15Add back an accidentally dropped .PpTheo Buehler
2022-01-15Update for HMAC_CTX_{init,cleanup} hand HMAC_cleanup removalTheo Buehler
2022-01-15Stop documenting clone digests.Theo Buehler
2022-01-15Minor cleanup and simplification in dsa_pub_encode()Theo Buehler
This function has a weird dance of allocating an ASN1_STRING in an inner scope and assigning it to a void pointer in an outer scope for passing it to X509_PUBKEY_set0_param() and ASN1_STRING_free() on error. This can be simplified and streamlined. ok inoguchi
2022-01-14Avoid buffer overflow in asn1_parse2Kinichiro Inoguchi
asn1_par.c r1.29 changed to access p[0] directly, and this pointer could be overrun since ASN1_get_object advances pointer to the first content octet. In case invalid ASN1 Boolean data, it has length but no content, I thought this could be happen. Adding check p with tot (diff below) will avoid this failure. Reported by oss-fuzz 43633 and 43648(later) ok tb@
2022-01-14bump libcrypto, libssl, libtls majors after struct visibility changesTheo Buehler
and Symbol addition and removal in libcrypto.
2022-01-14Update Symbols.listTheo Buehler
ok inoguchi
2022-01-14Unconditionally comment out OPENSSL_NO_RFC3779Theo Buehler
ok inoguchi jsing
2022-01-14Remove header guard around RFC 3779 declarationsTheo Buehler
ok inoguchi jsing
2022-01-14Expose Certificate Transparency symbols in headersTheo Buehler
ok inoguchi jsing
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-14Move ASN1_BOOLEAN to internal only.Theo Buehler
This moves {d2i,i2d}_ASN1_BOOLEAN() to internal only. They are unused, but help us testing the encoding. ok jsing
2022-01-14Remove check_defer and obj_cleanup_defer from public visibilityTheo Buehler
ok inoguchi jsing
2022-01-14Remove name_cmp from public visibilityTheo Buehler
ok inoguchi jsing
2022-01-14Remove all asn1_* symbols from public visibilityTheo Buehler
ok inoguchi jsing
2022-01-14Implement new-style OpenSSL BIO callbacksTheo Buehler
This provides support for new-style BIO callbacks in BIO_{read,write,gets,puts}() and a helper function to work out whether it should call the new or the old style callback. It also adds a few typedefs and minor code cleanup as well as the BIO_{get,set}_callback_ex() from jsing, ok tb
2022-01-14Remove legacy sign/verify from EVP_MD.Theo Buehler
This removes m_dss.c, m_dss1.c, and m_ecdsa.c and the corresponding public API EVP_{dss,dss1,ecdsa}(). This is basically the following OpenSSL commit. The mentioned change in RSA is already present in rsa/rsa_pmeth.c. ok inoguchi jsing commit 7f572e958b13041056f377a62d3219633cfb1e8a Author: Dr. Stephen Henson <steve@openssl.org> Date: Wed Dec 2 13:57:04 2015 +0000 Remove legacy sign/verify from EVP_MD. Remove sign/verify and required_pkey_type fields of EVP_MD: these are a legacy from when digests were linked to public key types. All signing is now handled by the corresponding EVP_PKEY_METHOD. Only allow supported digest types in RSA EVP_PKEY_METHOD: other algorithms already block unsupported types. Remove now obsolete EVP_dss1() and EVP_ecdsa(). Reviewed-by: Richard Levitte <levitte@openssl.org> Plus OpenSSL commit 625a9baf11c1dd94f17e5876b6ee8d6271b3921d for m_dss.c
2022-01-14Make RSA, RSA_PSS_PARAMS and RSA_METHOD opaqueTheo Buehler
Move the struct internals to rsa_locl.h and provide a missing typedef in ossl_typ.h. ok inoguchi jsing
2022-01-14Make structs in ocsp.h opaqueTheo Buehler
This adds a little order to this pig sty. ok inoguchi jsing
2022-01-14Move ECDSA_SIG to ecs_locl.hTheo Buehler
We can't make ECDSA_METHOD opaque since it is still used in smtpd(8) ok inoguchi jsing
2022-01-14Simplify DSAPublicKey_itTheo Buehler
This was obtained by porting the OpenSSL commit below and then using expand_crypto_asn1.go to unroll the new ASN.1 macros - actually the ones from 987157f6f63 which fixed the omission of dsa_cb() in the first commit. ok inoguchi jsing commit ea6b07b54c1f8fc2275a121cdda071e2df7bd6c1 Author: Dr. Stephen Henson <steve@openssl.org> Date: Thu Mar 26 14:35:49 2015 +0000 Simplify DSA public key handling. DSA public keys could exist in two forms: a single Integer type or a SEQUENCE containing the parameters and public key with a field called "write_params" deciding which form to use. These forms are non standard and were only used by functions containing "DSAPublicKey" in the name. Simplify code to only use the parameter form and encode the public key component directly in the DSA public key method. Reviewed-by: Richard Levitte <levitte@openssl.org>
2022-01-14Make DSA opaqueTheo Buehler
This moves DSA_SIG, DSA and DSA_METHOD to dsa_locl.h. ok inoguchi jsing
2022-01-14Make structs in dh.h opaqueTheo Buehler
This moves the struct internals for DH and DH_METHOD to dh_local.h. ok inoguchi jsing
2022-01-14Garbage collect the unused OPENSSL_ITEMTheo Buehler
ok inoguchi jsing