Skip to content

TLS with cerificate as a String Resource #59

Discussion options

You must be logged in to vote

I tried replicating the problem but I couldn't. The certificate is correctly parsed. If I change the header to corrupt the data, then I get a java.io.FileNotFoundException but not for file name too long, just incorrect path syntax, but that could be a difference of the JVM we are using to run it. Please check again that your crt variable actually contains the correct certificate value OR the path to the file containing it.

This is my code:

public fun main() {
    val ca = """-----BEGIN CERTIFICATE-----
MIID7zCCAtegAwIBAgIUI4f8AI+Ldm0QuuVjUT8/Lkr8orowDQYJKoZIhvcNAQEL
BQAwgYUxCzAJBgNVBAYTAlBMMRAwDgYDVQQIDAdzbGFza2llMRMwEQYDVQQHDApM
b2R5Z293aWNlMRswGQYDVQQKDBJJbnByYXggc3AuIHogby4gby4xEjAQBgN…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Mgalazka2323
Comment options

@davidepianca98
Comment options

Answer selected by davidepianca98
@Mgalazka2323
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants