https://github.com/daggerok/spring-boot-ssl
This project contains simple spring-boot https example
https://github.com/daggerok/spring-boot-ssl
keytool spring spring-boot spring-boot-https spring-boot-ssl spring-mvc ssl
Last synced: 4 months ago
JSON representation
This project contains simple spring-boot https example
- Host: GitHub
- URL: https://github.com/daggerok/spring-boot-ssl
- Owner: daggerok
- Created: 2016-05-01T21:45:19.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-10-23T09:09:22.000Z (over 8 years ago)
- Last Synced: 2025-04-28T18:45:35.874Z (about 1 year ago)
- Topics: keytool, spring, spring-boot, spring-boot-https, spring-boot-ssl, spring-mvc, ssl
- Language: Java
- Homepage:
- Size: 60.5 KB
- Stars: 10
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
spring-boot-ssl [](https://travis-ci.org/daggerok/spring-boot-ssl)
===============
This project contains simple spring-boot https example
```sh
gradle build bootRun
open https://localhost:8443/
```
using curl:
```sh
curl -k https://localhost:8443
```
using docker
```bash
docker build -t app .
docker run --rm -d -p 443:8443 --name=app app
curl -k https://localhost/health
docker rm -f -v app
```
using docker-compose
```bash
docker-compose up --build -d
curl -k https://localhost/health
docker-compose down -v
```
not worked shit...
```sh
keytool -genkey -alias tomcat -storetype PKCS12 -keyalg RSA -keysize 2048 -keystore build/keystore.p12 -validity 3650
use password: password
openssl pkcs12 -in build/keystore.p12 -out build/file.key -nocerts -nodes
openssl pkcs12 -export -in "build/keystore.p12" -out "build/keystore.pem" -passin pass:password
openssl pkcs12 -in build/keystore.p12 -out build/keystore.crt.pem -clcerts -nokeys
openssl pkcs12 -in build/keystore.p12 -out build/keystore.key.pem -nocerts -nodes
openssl pkcs12 -in build/keystore.p12 -out build/keystore.pem
# old - not works
keytool -genkey -alias tomcat -storetype PKCS12 -keyalg RSA -keysize 2048 -keystore build/keystore.p12 -validity 3650
use password: password
curl -k --cert build/keystore.p12:password https://localhost:8443
```