DEV Community

Discussion on: Custom Root CA in spring-boot:build-image

Collapse
 
vadiw profile image
vadiw

I added the section in pom.xml and used open ssl to create a pem cert . But I am not getting past the error. What could be wrong for me ? (disabling corp vpn resolves but i need to make it work with corp vpn)
I am using spring boot 3.1.1

[INFO] [creator] Get "github.com/bell-sw/Liberica/releas... tls: failed to verify certificate: x509: certificate signed by unknown authority

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <image>
                        <env>
                            <SERVICE_BINDING_ROOT>/bindings</SERVICE_BINDING_ROOT>
                        </env>
                        <bindings>
                            <binding>${basedir}/bindings/ca-certificates:/platform/bindings/ca-certificates</binding>
                        </bindings>
                    </image>
                </configuration>
            </plugin>
        </plugins>
    </build>
Enter fullscreen mode Exit fullscreen mode
Collapse
 
adzubla profile image
Eduardo Issao Ito

Probably you are using the wrong certificate.

The mycert.cer file should containg the public certficate used by your company to sign the incoming traffic from the internet.

The certificate is expected to be in x509 format.