Help us understand the problem. What is going on with this article?

SpringBoot と Let's Encriptの構成

参照

ほぼここのパクリ

アプリ側の対応

gradle へ依存追加

implementation("de.dentrassi.crypto:pem-keystore:2.2.0")

Application(エントリポイント)で読み込み追加

import de.dentrassi.crypto.pem.PemKeyStoreProvider
import java.security.Security

@SpringBootApplication
class Application {
}

fun main(args: Array<String>) {
    Security.addProvider(PemKeyStoreProvider());
    runApplication<Application>(*args) {
        setBannerMode(Banner.Mode.OFF)
    }
}

application.propeties

server.ssl.enabled=true
server.ssl.key-store=/path/to/keystore.properties
server.ssl.key-store-type=PEMCFG.MOD
server.ssl.key-store-password=dummy
server.ssl.key-alias=keycert

server.ssl.key-store-passwordは、まんまdummyで良い。
server.ssl.key-storeは、サーバ上のパスになり、keystore.propertiesはサーバに配置すること。

keystore.properties

keystore.properties
alias=keycert
source.cert=/etc/…/fullchain.pem
source.key=/etc/…/privkey.pem

source.certとsource.keyは、let's encryptで作ったものを指す。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした