# Problem with HTTPS

**URL:** <https://forum.keycloak.org/t/problem-with-https/2303>\
**Category:** Configuring the server\
**Created:** [April 22, 2020, 8:30pm UTC](https://forum.keycloak.org/t/problem-with-https/2303 "2020-04-22T20:30:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![guilhermeasgrj](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@guilhermeasgrj](https://forum.keycloak.org/u/guilhermeasgrj)\
**Post date:** [April 22, 2020, 8:30pm UTC](https://forum.keycloak.org/t/problem-with-https/2303/1 "2020-04-22T20:30:28Z")

</div>

Hi, guys…

I generated my valid certificate ([https://www.sslforfree.com](https://www.sslforfree.com)) to my keycloak, however I am not able to install it in any way.  
I’m using the image of the docker.  
1- I’ve renamed it to tls.crt (root) and tls.key (private)  
2- I already put the two files inside certs  
3- I already put it inside / etc / x509 /

But it doesn’t work, can you help me?

---

<div class="post-metadata">

**Author:** ![jangaraj](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/jangaraj/32/5175_2.png) [@jangaraj](https://forum.keycloak.org/u/jangaraj)\
**Post date:** [April 22, 2020, 11:14pm UTC](https://forum.keycloak.org/t/problem-with-https/2303/2 "2020-04-22T23:14:13Z")

</div>

```auto
docker run \
  --name keycloak \
  -e KEYCLOAK_USER=myadmin \
  -e KEYCLOAK_PASSWORD=mypassword \
  -p 8443:8443 \
  -v /<local-os-path>/mysslforfreecert.crt:/etc/x509/https/tls.crt \
  -v /<local-os-path>/mysslforfreekey.key:/etc/x509/https/tls.key \
  jboss/keycloak

```

---

<div class="post-metadata">

**Author:** ![guilhermeasgrj](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@guilhermeasgrj](https://forum.keycloak.org/u/guilhermeasgrj)\
**Post date:** [April 24, 2020, 4:54pm UTC](https://forum.keycloak.org/t/problem-with-https/2303/3 "2020-04-24T16:54:28Z")

</div>

Sorry my friend, where I execute this commands? I`’’ need creat with there commands in .yml ?

---

<div class="post-metadata">

**Author:** ![guilhermeasgrj](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@guilhermeasgrj](https://forum.keycloak.org/u/guilhermeasgrj)\
**Post date:** [April 24, 2020, 5:06pm UTC](https://forum.keycloak.org/t/problem-with-https/2303/4 "2020-04-24T17:06:14Z")

</div>

look my .yml  
whats wrong?

volumes:  
postgres\_data:  
driver: local

services:  
postgres:  
image: postgres  
volumes:  
- postgres\_data:/var/lib/postgresql/data  
environment:  
POSTGRES\_DB: keycloak  
POSTGRES\_USER: keycloak  
POSTGRES\_PASSWORD: password@@@321  
keycloak:  
image: [quay.io/keycloak/keycloak:latest](http://quay.io/keycloak/keycloak:latest)  
environment:  
DB\_VENDOR: POSTGRES  
KEYCLOAK\_HTTP\_PORT: 8080  
KEYCLOAK\_HTTPS\_PORT: 8443  
KEYCLOAK\_HOSTNAME: auth.client.com.br  
DB\_ADDR: postgres  
DB\_DATABASE: keycloak  
DB\_USER: keycloak  
DB\_SCHEMA: public  
DB\_PASSWORD: password@@@321  
KEYCLOAK\_USER: admin  
KEYCLOAK\_PASSWORD: admin123  
# Uncomment the line below if you want to specify JDBC parameters. The parameter below is just an example, and it shouldn’t be used in production without knowledge. It is highly recommended that you read the PostgreSQL JDBC driver documentation in order to use it.  
#JDBC\_PARAMS: “ssl=true”  
ports:  
- 8080:8080  
- 8443:8443  
depends\_on:  
- postgres  
volumes:  
- ./client:/var/www/html  
- /opt/keycloak/data/certs/:/etc/x509/https

---

<div class="post-metadata">

**Author:** ![guilhermeasgrj](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@guilhermeasgrj](https://forum.keycloak.org/u/guilhermeasgrj)\
**Post date:** [April 24, 2020, 5:23pm UTC](https://forum.keycloak.org/t/problem-with-https/2303/5 "2020-04-24T17:23:40Z")

</div>

look the erro when I executed your string and after I try access the site…

17:22:25,871 ERROR [io.undertow.request] (default I/O-3) Closing SSLConduit after exception on handshake: javax.net.ssl.SSLHandshakeException: Client requested protocol TLSv1 is not enabled or supported in server context  
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)  
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)  
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:307)  
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:263)  
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:254)  
at java.base/sun.security.ssl.ClientHello$ClientHelloConsumer.negotiateProtocol(ClientHello.java:883)  
at java.base/sun.security.ssl.ClientHello$ClientHelloConsumer.onClientHello(ClientHello.java:835)  
at java.base/sun.security.ssl.ClientHello$ClientHelloConsumer.consume(ClientHello.java:813)  
at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)  
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:443)  
at java.base/sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedAction.run(SSLEngineImpl.java:1061)  
at java.base/sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedAction.run(SSLEngineImpl.java:1048)  
at java.base/java.security.AccessController.doPrivileged(Native Method)  
at java.base/sun.security.ssl.SSLEngineImpl$DelegatedTask.run(SSLEngineImpl.java:995)  
at io.undertow.core@2.0.27.Final//io.undertow.protocols.ssl.SslConduit$5.run(SslConduit.java:107

---

<div class="post-metadata">

**Author:** ![bssdev](https://avatars.discourse-cdn.com/v4/letter/b/ee7513/32.png) [@bssdev](https://forum.keycloak.org/u/bssdev)\
**Post date:** [April 27, 2020, 9:57am UTC](https://forum.keycloak.org/t/problem-with-https/2303/6 "2020-04-27T09:57:14Z")

</div>

> [@guilhermeasgrj](#):
>
> Client requested protocol TLSv1 is not enabled or supported in server context

Hi.

I don’t use docker but this problem is generated by Wildfly.  
The client require TLSv1 but Wildfly reject it as insecure.

In wildfly’s standalone search for the https-listener and change enable-http2

```
<https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>

```

i don’t remember if the parameter must be true or false (try to change it).

Pay attention to certificates. From middle 2019 (I don’t remember the exact month) some policies in SSL certification are changed and browser starts to reject some certificates or marking it as insecure.
