Refactor wolfCrypt level classes to avoid wolfcrypt-jni
namespace conflicts
#252
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR renames the following three "wolfCrypt" classes that are part of wolfssljni, and removes them from the
com.wolfssl.wolfcrypt
package namespace. They have been placed in thecom.wolfssl
namespace:com.wolfssl.wolfcrypt.ECC
->com.wolfssl.WolfCryptECC
com.wolfssl.wolfcrypt.EccKey
->com.wolfssl.WolfCryptEccKey
com.wolfssl.wolfcrypt.RSA
->com.wolfssl.WolfCryptRSA
This is a breaking change for small set of applications/users that call these classes, but, these classes were mainly added to allow use inside the Atomic Record callbacks, which are not widely used. The big advantage to renaming these classes is that it removes namespace conflicts from classes inside the
wolfcrypt-jni
/wolfJCE
package. We have had a few customer/user reports where this conflict caused them to have to manually delete the classes mentioned above when bothwolfssljni
andwolfcrypt-jni
are used in the same project. For long-term ease of adoption, doing this rename now is the best approach.When testing Atomic Record Layer use in the
examples/Client.java
andexamples/Server.java
with recent versions of native wolfSSL, we needed to also implement theVerifyDecrypt
callback (previously we only had support for theDecryptVerify
callback). This PR adds support forVerifyDecrypt
, along with an example implementation based on native wolfSSL'swolfssl/test.h
myVerifyDecryptCb()
.