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

Remove spacelog dependency #139

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions bio.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ func bioSetRetryRead(b *C.BIO) {
func go_write_bio_write(b *C.BIO, data *C.char, size C.int) (rc C.int) {
defer func() {
if err := recover(); err != nil {
logger.Critf("openssl: writeBioWrite panic'd: %v", err)
rc = -1
}
}()
Expand All @@ -88,7 +87,6 @@ func go_write_bio_ctrl(b *C.BIO, cmd C.int, arg1 C.long, arg2 unsafe.Pointer) (
rc C.long) {
defer func() {
if err := recover(); err != nil {
logger.Critf("openssl: writeBioCtrl panic'd: %v", err)
rc = -1
}
}()
Expand Down Expand Up @@ -169,7 +167,6 @@ func loadReadPtr(b *C.BIO) *readBio {
func go_read_bio_read(b *C.BIO, data *C.char, size C.int) (rc C.int) {
defer func() {
if err := recover(); err != nil {
logger.Critf("openssl: go_read_bio_read panic'd: %v", err)
rc = -1
}
}()
Expand Down Expand Up @@ -204,7 +201,6 @@ func go_read_bio_ctrl(b *C.BIO, cmd C.int, arg1 C.long, arg2 unsafe.Pointer) (

defer func() {
if err := recover(); err != nil {
logger.Critf("openssl: readBioCtrl panic'd: %v", err)
rc = -1
}
}()
Expand Down
5 changes: 0 additions & 5 deletions ctx.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,10 @@ import (
"sync"
"time"
"unsafe"

"github.com/spacemonkeygo/spacelog"
)

var (
ssl_ctx_idx = C.X_SSL_CTX_new_index()

logger = spacelog.GetLogger()
)

type Ctx struct {
Expand Down Expand Up @@ -426,7 +422,6 @@ type VerifyCallback func(ok bool, store *CertificateStoreCtx) bool
func go_ssl_ctx_verify_cb_thunk(p unsafe.Pointer, ok C.int, ctx *C.X509_STORE_CTX) C.int {
defer func() {
if err := recover(); err != nil {
logger.Critf("openssl: verify callback panic'd: %v", err)
os.Exit(1)
}
}()
Expand Down
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
module github.com/spacemonkeygo/openssl

require github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU=
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc=
2 changes: 0 additions & 2 deletions ssl.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ type SSL struct {
func go_ssl_verify_cb_thunk(p unsafe.Pointer, ok C.int, ctx *C.X509_STORE_CTX) C.int {
defer func() {
if err := recover(); err != nil {
logger.Critf("openssl: verify callback panic'd: %v", err)
os.Exit(1)
}
}()
Expand Down Expand Up @@ -154,7 +153,6 @@ func (s *SSL) SetSSLCtx(ctx *Ctx) {
func sni_cb_thunk(p unsafe.Pointer, con *C.SSL, ad unsafe.Pointer, arg unsafe.Pointer) C.int {
defer func() {
if err := recover(); err != nil {
logger.Critf("openssl: verify callback sni panic'd: %v", err)
os.Exit(1)
}
}()
Expand Down
1 change: 0 additions & 1 deletion tickets.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ func go_ticket_key_cb_thunk(p unsafe.Pointer, s *C.SSL, key_name *C.uchar,
// so just abort everything.
defer func() {
if err := recover(); err != nil {
logger.Critf("openssl: ticket key callback panic'd: %v", err)
os.Exit(1)
}
}()
Expand Down