Revision tags: OpenSSL_1_0_2u |
|
#
79c44b4e |
| 30-Nov-2019 |
Veres Lajos |
Fix some typos Reported-by: misspell-fixer <https://github.com/vlajos/misspell-fixer> CLA: trivial Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Revie
Fix some typos Reported-by: misspell-fixer <https://github.com/vlajos/misspell-fixer> CLA: trivial Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10544)
show more ...
|
Revision tags: OpenSSL_1_0_2t, OpenSSL_1_1_0l, OpenSSL_1_1_1d, OpenSSL_1_1_1c, OpenSSL_1_1_0k, OpenSSL_1_0_2s |
|
#
6a835fcf |
| 23-May-2019 |
Richard Levitte |
Replumbing: pre-populate the EVP namemap with commonly known names This adds ossl_namemap_empty(), to detect if a namemap is empty and can thereby be pre-populated. This also af
Replumbing: pre-populate the EVP namemap with commonly known names This adds ossl_namemap_empty(), to detect if a namemap is empty and can thereby be pre-populated. This also affects the way legacy NIDs are looked up in evp_cipher_from_dispatch() and evp_md_from_dispatch(). Instead of trying to find the NID directly, look up the legacy method structure and grab the NID from there. The reason is that NIDs can be aliases for other NIDs, which looks like a clash even if wasn't really one. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/8984)
show more ...
|
#
0ddf74bf |
| 31-Oct-2019 |
Richard Levitte |
Final cleanup after move to leaner EVP_PKEY methods Now that KEYMGMT method pointers have moved away from the diverse methods that are used with EVP_PKEY_CTX, we no longer need to pass
Final cleanup after move to leaner EVP_PKEY methods Now that KEYMGMT method pointers have moved away from the diverse methods that are used with EVP_PKEY_CTX, we no longer need to pass special argument to evp_generic_fetch() and evp_generic_do_all(). Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10309)
show more ...
|
#
f651c727 |
| 23-Sep-2019 |
Richard Levitte |
EVP: add name traversal functions to all fetchable types The following new functions all do the same thing; they traverse the set of names assigned to implementations of each algorithm t
EVP: add name traversal functions to all fetchable types The following new functions all do the same thing; they traverse the set of names assigned to implementations of each algorithm type: EVP_MD_names_do_all(), EVP_CIPHER_names_do_all(), EVP_MAC_names_do_all(), EVP_KEYMGMT_names_do_all(), EVP_KEYEXCH_names_do_all(), EVP_KDF_names_do_all(), EVP_SIGNATURE_names_do_all() We add a warning to the documentation of EVP_CIPHER_name() and EVP_MD_name(), as they aren't suitable to use with multiple-name implementation. We also remove EVP_MAC_name() and evp_KDF_name(), as they serve no useful purpose. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/9979)
show more ...
|
#
251e610c |
| 23-Sep-2019 |
Richard Levitte |
EVP: add missing common functionality This adds the missing functions that should be common for all fetchable EVP sub-APIs: EVP_KEYMGMT_is_a(), EVP_KEYMGMT_do_all_provided(), EV
EVP: add missing common functionality This adds the missing functions that should be common for all fetchable EVP sub-APIs: EVP_KEYMGMT_is_a(), EVP_KEYMGMT_do_all_provided(), EVP_KEYEXCH_is_a(), EVP_KEYEXCH_do_all_provided(), EVP_KDF_is_a(), EVP_MD_is_a(), EVP_SIGNATURE_do_all_provided(), EVP_SIGNATURE_is_a(). This also renames EVP_MD_do_all_ex(), EVP_CIPHER_do_all_ex(), EVP_KDF_do_all_ex(), EVP_MAC_do_all_ex() to change '_ex' to '_provided'. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/9979)
show more ...
|
#
6a36f209 |
| 13-Oct-2019 |
Richard Levitte |
EVP_{CIPHER,MD}_CTX_ctrl(): make extra sure to return 0 or 1 The previous fix was incomplete. Fixes #10106 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged f
EVP_{CIPHER,MD}_CTX_ctrl(): make extra sure to return 0 or 1 The previous fix was incomplete. Fixes #10106 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10163)
show more ...
|
#
c3885102 |
| 15-Oct-2019 |
Matt Caswell |
Correctly handle SSL3 Master Secret when calling providers We need to pass the SSL3 Master Secret down to the provider code in order for SSLv3 to work correctly. Fixes #10182
Correctly handle SSL3 Master Secret when calling providers We need to pass the SSL3 Master Secret down to the provider code in order for SSLv3 to work correctly. Fixes #10182 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10186)
show more ...
|
#
72df8f88 |
| 07-Oct-2019 |
Matt Caswell |
Support calling EVP_DigestUpdate instead of EVP_Digest[Sign|Verify]Update Prior to OpenSSL 3.0 EVP_Digest[Sign|Verify|Update were just macros for EVP_DigestUpdate. They are now separate
Support calling EVP_DigestUpdate instead of EVP_Digest[Sign|Verify]Update Prior to OpenSSL 3.0 EVP_Digest[Sign|Verify|Update were just macros for EVP_DigestUpdate. They are now separate functions. Unfortunately some code assumes that EVP_Digest[Sign|Verify]Update is interchangeable with EVP_DigestUpdate. For example the dgst app uses an MD bio which always calls EVP_DigestUpdate(). However the dgst app supports signing instead of digesting and may initialise with EVP_DigestSignInit_ex() instead of just EVP_DigestInit(). We now detect these differences and redirect to the correct function where appropriate. Fixes #10114 Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10116)
show more ...
|
#
552be00d |
| 06-Oct-2019 |
Richard Levitte |
EVP_{CIPHER,MD}_CTX_ctrl(): make sure to return 0 or 1 Even thought the underlying calls might return something other than 0 or 1, EVP_CIPHER_CTX_ctrl() and EVP_MD_CTX_ctrl() were made t
EVP_{CIPHER,MD}_CTX_ctrl(): make sure to return 0 or 1 Even thought the underlying calls might return something other than 0 or 1, EVP_CIPHER_CTX_ctrl() and EVP_MD_CTX_ctrl() were made to only return those values regardless. That behaviour was recently lost, so we need to restore it. Fixes #10106 Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/10108)
show more ...
|
#
19cfe784 |
| 03-Oct-2019 |
Matt Caswell |
Don't follow legacy path if ctx->pctx is set EVP_DigestInit_ex forced following of the legacy path if ctx->pctx is set (meaning we've actually been called via EVP_DigestSignInit_ex).
Don't follow legacy path if ctx->pctx is set EVP_DigestInit_ex forced following of the legacy path if ctx->pctx is set (meaning we've actually been called via EVP_DigestSignInit_ex). There is some code in the legacy path that calls the EVP_PKEY_CTRL_DIGESTINIT ctrl on the pctx. Not going down the legacy path if ctx->pctx is set means that ctrl message will neve get sent. However, it turns out that all algs that understand that ctrl also set the EVP_MD_CTX_FLAG_NO_INIT flag which forces legacy anyway. Therefore the ctx->pctx check is not required and can be removed. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10082)
show more ...
|
#
14bec2c4 |
| 26-Sep-2019 |
Matt Caswell |
Free a fetched digest during EVP_MD_CTX_reset() not EVP_MD_free() Otherwise a mem leak can occur since EVP_MD_free() calls EVP_MD_CTX_reset() which then clears the contents of the ctx.
Free a fetched digest during EVP_MD_CTX_reset() not EVP_MD_free() Otherwise a mem leak can occur since EVP_MD_free() calls EVP_MD_CTX_reset() which then clears the contents of the ctx. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10013)
show more ...
|
#
15de965f |
| 26-Sep-2019 |
Matt Caswell |
Don't call EVP_MD_CTX_reset during EVP_DigestFinal This resets the fields of the EVP_MD_CTX and means we can no longer make calls using the EVP_MD_CTX, such as to query parameters.
Don't call EVP_MD_CTX_reset during EVP_DigestFinal This resets the fields of the EVP_MD_CTX and means we can no longer make calls using the EVP_MD_CTX, such as to query parameters. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10013)
show more ...
|
#
5f5c3b4f |
| 24-Sep-2019 |
Matt Caswell |
Update EVP_MD_CTX_get_params() et al to be EVP_DigestSign*() aware If doing an EVP_DigestSign*() or EVP_DigestVerify*() operation we use the embedded pctx for communication with the prov
Update EVP_MD_CTX_get_params() et al to be EVP_DigestSign*() aware If doing an EVP_DigestSign*() or EVP_DigestVerify*() operation we use the embedded pctx for communication with the provider. Any MD params need to use that ctx instead. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10013)
show more ...
|
#
aa64cf24 |
| 24-Sep-2019 |
Matt Caswell |
Ensure we look at EVP_MD_CTX_FLAG_KEEP_PKEY_CTX in non-legacy code This flag is still relevant even for non-legacy code so we should check it where appropriate. Reviewed-by: Pau
Ensure we look at EVP_MD_CTX_FLAG_KEEP_PKEY_CTX in non-legacy code This flag is still relevant even for non-legacy code so we should check it where appropriate. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10013)
show more ...
|
#
d8c98d79 |
| 16-Sep-2019 |
Matt Caswell |
Add the provider function signatures for DigestSign* Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10013)
|
#
706457b7 |
| 27-Sep-2019 |
Dr. Matthias St. Pierre |
Reorganize local header files Apart from public and internal header files, there is a third type called local header files, which are located next to source files in the source direc
Reorganize local header files Apart from public and internal header files, there is a third type called local header files, which are located next to source files in the source directory. Currently, they have different suffixes like '*_lcl.h', '*_local.h', or '*_int.h' This commit changes the different suffixes to '*_local.h' uniformly. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9333)
show more ...
|
#
25f2138b |
| 27-Sep-2019 |
Dr. Matthias St. Pierre |
Reorganize private crypto header files Currently, there are two different directories which contain internal header files of libcrypto which are meant to be shared internally: W
Reorganize private crypto header files Currently, there are two different directories which contain internal header files of libcrypto which are meant to be shared internally: While header files in 'include/internal' are intended to be shared between libcrypto and libssl, the files in 'crypto/include/internal' are intended to be shared inside libcrypto only. To make things complicated, the include search path is set up in such a way that the directive #include "internal/file.h" could refer to a file in either of these two directoroes. This makes it necessary in some cases to add a '_int.h' suffix to some files to resolve this ambiguity: #include "internal/file.h" # located in 'include/internal' #include "internal/file_int.h" # located in 'crypto/include/internal' This commit moves the private crypto headers from 'crypto/include/internal' to 'include/crypto' As a result, the include directives become unambiguous #include "internal/file.h" # located in 'include/internal' #include "crypto/file.h" # located in 'include/crypto' hence the superfluous '_int.h' suffixes can be stripped. The files 'store_int.h' and 'store.h' need to be treated specially; they are joined into a single file. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9333)
show more ...
|
#
e6879a31 |
| 24-Sep-2019 |
Matt Caswell |
Make EVP_MD_CTX_[gettable|settable]_params() take an EVP_MD_CTX EVP_MD_CTX_gettable_params() and EVP_MD_CTX_settable_params() were confusingly named because they did not take an EVP_MD_C
Make EVP_MD_CTX_[gettable|settable]_params() take an EVP_MD_CTX EVP_MD_CTX_gettable_params() and EVP_MD_CTX_settable_params() were confusingly named because they did not take an EVP_MD_CTX parameter. In addition we add the functions EVP_MD_gettable_ctx_params() and EVP_MD_settable_ctx_params() which do the same thing but are passed an EVP_MD object instead. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9998)
show more ...
|
#
32040838 |
| 21-Sep-2019 |
Richard Levitte |
Rework cipher / digest fetching for legacy nids with multiple name support With multiple names, it's no longer viable to just grab the "first" in the set and use that to find the legacy
Rework cipher / digest fetching for legacy nids with multiple name support With multiple names, it's no longer viable to just grab the "first" in the set and use that to find the legacy NID. Instead, all names for an algorithm must be checked, and if we encounter more than one NID asssociated with those names, we consider it an error and make that method unloadable. This ensures that all methods that do have an internal NID associated will get that NID in their structure, thereby ensuring that other parts of libcrypto that haven't gone away from using NIDs for comparison will continue to work as expected. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9969)
show more ...
|
#
f7c16d48 |
| 14-Sep-2019 |
Richard Levitte |
In provider implemented methods, save the name number, not the name string Multiple names per implementation is already supported in the namemap, but hasn't been used yet. However, as s
In provider implemented methods, save the name number, not the name string Multiple names per implementation is already supported in the namemap, but hasn't been used yet. However, as soon as we have multiple names, we will get an issue with what name should be saved in the method. The solution is to not save the name itself, but rather the number it's associated with. This number is supposed to be unique for each set of names, and we assume that algorithm names are globally unique, i.e. there can be no name overlap between different algorithm types. Incidently, it was also found that the 'get' function used by ossl_construct_method() doesn't need all the parameters it was given; most of what it needs, it can now get through the data structure given by the caller of ossl_construct_method(). As a consequence, ossl_construct_method() itself doesn't need all the parameters it was given either. There are some added internal functions that are expected to disappear as soon as legacy code is removed, such as evp_first_name() and ossl_namemap_num2name(). Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9897)
show more ...
|
#
864b89ce |
| 04-Sep-2019 |
Matt Caswell |
Move EVP_PKEY algorithm implementations into a union An EVP_PKEY can be used for multiple different algorithm operations. Only one can be used at a time, so we move those into a union.
Move EVP_PKEY algorithm implementations into a union An EVP_PKEY can be used for multiple different algorithm operations. Only one can be used at a time, so we move those into a union. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9753)
show more ...
|
#
dfcb5d29 |
| 30-Aug-2019 |
Matt Caswell |
Add the ability to perform signatures in a provider This makes EVP_PKEY_sign and EVP_PKEY_sign_init provider aware. It also introduces the new type EVP_SIGNATURE to represent signature
Add the ability to perform signatures in a provider This makes EVP_PKEY_sign and EVP_PKEY_sign_init provider aware. It also introduces the new type EVP_SIGNATURE to represent signature algorithms. This also automatically makes the EVP_Sign* APIs provider aware because they use EVP_Digest* (which is already provider aware) and EVP_PKEY_sign(_init) under the covers. At this stage there are no signature algorithms in any providers. That will come in the following commits. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9753)
show more ...
|
#
3fd70262 |
| 03-Sep-2019 |
Richard Levitte |
New function EVP_MD_free() This function re-implements EVP_MD_meth_free(), but has a name that isn't encumbered by legacy EVP_MD construction functionality. We also refactor mos
New function EVP_MD_free() This function re-implements EVP_MD_meth_free(), but has a name that isn't encumbered by legacy EVP_MD construction functionality. We also refactor most of EVP_MD_meth_new() into an internal evp_md_new() that's used when creating fetched methods. EVP_MD_meth_new() and EVP_MD_meth_free() are rewritten in terms of evp_md_new() and EVP_MD_free(). This means that at any time, we can deprecate all the EVP_MD_meth_ functions with no harmful consequence. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9758)
show more ...
|
#
3ca9d210 |
| 23-Aug-2019 |
Richard Levitte |
Refactor how KEYMGMT methods get associated with other methods KEYMGMT methods were attached to other methods after those were fully created and registered, thereby creating a potential
Refactor how KEYMGMT methods get associated with other methods KEYMGMT methods were attached to other methods after those were fully created and registered, thereby creating a potential data race, if two threads tried to create the exact same method at the same time. Instead of this, we change the method creating function to take an extra data parameter, passed all the way from the public fetching function. In the case of EVP_KEYEXCH, we pass all the necessary data that evp_keyexch_from_dispatch() needs to be able to fetch the appropriate KEYMGMT method on the fly. Fixes #9592 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9678)
show more ...
|
#
ed71e917 |
| 14-Aug-2019 |
Matt Caswell |
Fix data races in EVP_CIPHER_fetch and EVP_MD_fetch Don't modify the cipher/md we just fetched - it could be shared by multiple threads. Reviewed-by: Paul Dale <paul.dale@oracle
Fix data races in EVP_CIPHER_fetch and EVP_MD_fetch Don't modify the cipher/md we just fetched - it could be shared by multiple threads. Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9590)
show more ...
|