How to resolve "SSLV3_ALERT_BAD_CERTIFICATE" error in Spring Boot

Stack Overflow Asked by Pale Blue Dot on January 1, 2022

I have the following rest end point exposed protected by SSL (Spring Boot)

public class TestController {
    @RequestMapping(value = "/data", method = RequestMethod.GET)
    public String getData() {
        return "Hello World";

In YML I have the following properties

    enabled: true
    client-auth: need
    key-store: {keystore-path}
    key-store-password: {keystore-password}
    key-alias: alias-name
    key-store-type: JKS

Now I am trying to call the above rest end point from another app with the following code

URL obj = new URL(GET_URL);
        HttpURLConnection con = (HttpURLConnection) obj.openConnection();
        int responseCode = con.getResponseCode();
        System.out.println("GET Response Code :: " + responseCode);

But I am getting the following error :

Error: write EPROTO 2771201016:error:10000410:SSL routines:OPENSSL_internal:SSLV3_ALERT_BAD_CERTIFICATE:../../third_party/boringssl/src/ssl/ alert number 42`

How to resolve this error?

Add your own answers!

Related Questions

How to get records ordered by joined table field

2  Asked on December 16, 2021 by jaime


how to display input using button in right to left order?

5  Asked on December 16, 2021 by mr-josh


Kotlin Image Compression Implementation

1  Asked on December 16, 2021 by android


Finding a cover of a set of points with circles

2  Asked on December 16, 2021 by user577545


Pytorch: all-but-one summation?

3  Asked on December 16, 2021 by sterne


Is it okay to mark @Input() as private or readonly?

2  Asked on December 16, 2021 by natoboram


Linking URL in JavaScript

2  Asked on December 16, 2021 by vuk-stamenkovic


Making a 2×2 grid in Flutter

2  Asked on December 16, 2021 by zerok


Uniform tick labels for non-linear colorbar in Matplotlib

1  Asked on December 16, 2021 by marie-eve-lb


Custom Javadoc not showing in IDE

1  Asked on December 16, 2021 by hugo-bois


Ask a Question

Get help from others!

© 2023 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP