Skip to content

x509: malformed certificate #10

Closed
Closed
@theobouwman

Description

@theobouwman

With an exported WWDR certificate (https://www.apple.com/certificateauthority/AppleWWDRCAG4.cer):

        signInfo, err := passkit.LoadSigningInformationFromFiles(
		"apple.pass/Certificates.p12",
		"xxxxxxxx",
		"apple.pass/wwdr.pem",
	)
	if err != nil {
		panic(err)
	}
2023/11/01 23:56:09 http: panic serving 127.0.0.1:59909: x509: malformed certificate
goroutine 65 [running]:
net/http.(*conn).serve.func1()
        /usr/local/go/src/net/http/server.go:1868 +0xb9
panic({0x1664420?, 0xc000486310?})
        /usr/local/go/src/runtime/panic.go:920 +0x270
main.SignAndStore({0x1, {0x17655d1, 0x4}, {0x1774ca0, 0x19}, {0x0, 0x0}, {0x176f8f4, 0x12}, {0x176f906, ...}, ...}, ...)
        /Users/theobouwman/dev/projects/momo/momo-wallet-pass-api/pass.go:68 +0x129
main.(*App).Handler(0x18617e0?, {0x18603f0?, 0xc0003d22a0}, 0xc000163100)
        /Users/theobouwman/dev/projects/momo/momo-wallet-pass-api/handler.go:40 +0x1e5
net/http.HandlerFunc.ServeHTTP(0xc000163000?, {0x18603f0?, 0xc0003d22a0?}, 0x2f8ea50?)
        /usr/local/go/src/net/http/server.go:2136 +0x29
github.com/gorilla/mux.(*Router).ServeHTTP(0xc0000ec000, {0x18603f0, 0xc0003d22a0}, 0xc000162f00)
        /Users/theobouwman/go/pkg/mod/github.com/gorilla/[email protected]/mux.go:210 +0x1c5
net/http.serverHandler.ServeHTTP({0xc0003fa930?}, {0x18603f0?, 0xc0003d22a0?}, 0x6?)
        /usr/local/go/src/net/http/server.go:2938 +0x8e
net/http.(*conn).serve(0xc0001c9320, {0x18617e0, 0xc0003fa3c0})
        /usr/local/go/src/net/http/server.go:2009 +0x5f4
created by net/http.(*Server).Serve in goroutine 45
        /usr/local/go/src/net/http/server.go:3086 +0x5cb

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions