Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting SSL certificate expiry date #80

Open
skogs opened this issue Jan 25, 2022 · 0 comments · May be fixed by #81
Open

Getting SSL certificate expiry date #80

skogs opened this issue Jan 25, 2022 · 0 comments · May be fixed by #81

Comments

@skogs
Copy link

skogs commented Jan 25, 2022

Hi, I am looking to retrieve SSL certificate expiry date information for a site. I see there is a INFO_CERTINFO argument to Easy GetInfo() method to obtain this information. The call is supposed to return a slist of certificates in the chain (I presume). However, the test code crashes when this parameter to used.

Is there a way around this or some example code to try out? Or, is there any other way to get the same information using a different API call?
if err := easy.Perform(); err != nil { fmt.Printf("ERROR: %v\n", err) } else { x, err := easy.Getinfo(curl.INFO_CERTINFO) if err != nil { } fmt.Printf("certinfo:%f", x) }

goroutine 1 [running]: github.com/andelf/go-curl.(*CURL).Getinfo.func5(0x40743c, 0x0, 0x0) /DIR/pkg/mod/github.com/andelf/[email protected]/easy.go:409 +0x5b github.com/andelf/go-curl.(*CURL).Getinfo(0xc00010a000, 0x400022) /DIR/pkg/mod/github.com/andelf/[email protected]/easy.go:409 +0xe6 main.main() /DIR/gotest/hello/main.go:27 +0xff exit status 2

Thanks and appreciate all the hard work that went into this work!

@sashayakovtseva sashayakovtseva linked a pull request Apr 4, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant