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

C recursion return values

1  Asked on December 3, 2020 by johnsulaw


React and reCAPTCHA v3

3  Asked on December 3, 2020 by comcool


Sympy string to equation

1  Asked on December 3, 2020 by mel


type casting boost multiprecision integer returns wrong answer

2  Asked on December 3, 2020 by amritkrs


clock() returning negative time difference on Windows machine

1  Asked on December 3, 2020 by a-sinha


Can I constrain constructor parameters in C#

2  Asked on December 2, 2020 by batekha


How to add a number to the picture php

0  Asked on December 2, 2020 by user13670828


Flutter: SilverAppBar Background Image with Text

2  Asked on December 2, 2020 by gsk


Ask a Question

Get help from others!

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