AlejoDev
AlejoDev

Reputation: 3252

Spring Boot Api Rest SSL

I have a Spring Boot Api Rest, but I have problems with SSL certificate. When I use the application without configuring the HTTPS, it works fine as shown below:

application.properties:

server.port=8443
#security.require-ssl=true
#server.ssl.key-store-type=PKCS12
#server.ssl.key-store=classpath:keystore.p12
#server.ssl.key-store-password=MyPass
#server.ssl.key-alias=opusclick

Postman request:

enter image description here

On the other hand, when I enable the HTTPS protocol:

application.properties:

server.port=8443
security.require-ssl=true
server.ssl.key-store-type=PKCS12
server.ssl.key-store=classpath:keystore.p12
server.ssl.key-store-password=MyPass
server.ssl.key-alias=opusclick

Postman request:

enter image description here

The strangest thing is that when I have the HTTPS configured, if I place a breakpoint in the controller response, returns the same response as when the HTTP protocol is enabled.

My question is why does this happen?

Upvotes: 3

Views: 2193

Answers (1)

Christian
Christian

Reputation: 22343

I just guess you use a self-signed SSL certificate. Postman disables self-signed SSL certificates by default

You have to disable the SSL certificate verification in the postman-settings.

Just go into Settings > General and disable it.

Upvotes: 5

Related Questions