DEV Community

Zachary Powell
Zachary Powell

Posted on

How to Fix Error TLS_ECDHE_ECDSA_WITH_AES_256_6CM_SHA384 when intergrating the CloudDB Server SDK?

While integrating Cloud DB provided by AppGallery Connect, you have a number of options on where and how you can integrate the SDK, iOS and Android is supported but so is a separate Server SDK. This allows you to make use of CloudDB in your own (Java) Server applications.

One error that you might get is an error relating to TLS_ECDHE_ECDSA_WITH_AES_256_6CM_SHA384

Image example error log

The log might look like

The Netty framework imported in the SDK uses a specific cipher suite that is dependent on the support of JDK. If the current development environment for JDK does not support the cipher suite, an error will occur.
To resolve this problem, JCE should be installed in the local environment.

  1. Download JCE corresponding to JDK version 1.8.
    http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html

  2. Extract the local_policy and US_export_policy JAR packages from the downloaded package.

  3. Then, copy the package files to your local Java directory. The path is %JAVA_HOME%/jre/lib/security.

If files with the same name already exist in the path, just overwrite them. The following figure shows my own directory.
Image of directory with files copied

  1. Once done, restart the project or server, and the error hopefully won't re-occur.

Top comments (0)