Skip to content

Commit

Permalink
Adding spacemonkeygo#139 from origin on reducing size of binary
Browse files Browse the repository at this point in the history
  • Loading branch information
amanelis committed May 22, 2020
1 parent 26da4e5 commit 7c04a91
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 17 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# CHANGELOG

# v1.0.1, 5/22/20

Merged #139 from origin, which lowers binary sizes by removing spacelogger package.

# v1.0.0, 5/22/20

Added in several rand functions and PRNG seeding processes during EC key creation phase.
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
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module github.com/spacemonkeygo/openssl
module github.com/block27/openssl

require github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572
require golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 // indirect

go 1.13
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
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=
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 h1:DYfZAGf2WMFjMxbgTjaC+2HC7NkNAQs+6Q8b9WEB/F4=
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
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
2 changes: 1 addition & 1 deletion ssl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"testing"
"time"

"github.com/spacemonkeygo/openssl/utils"
"github.com/block27/openssl/utils"
)

var (
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

0 comments on commit 7c04a91

Please sign in to comment.