Commit Graph

33 Commits

Author SHA1 Message Date
Steven Allen
ecfa88cc5b fix: unsafe pointer passing
Use github.com/mattn/go-pointer to save/restore "pointers" across FFI
bounderies. Go reserves the right to move pointers, so using
`unsafe.Pointer` for this is not safe.
2021-08-27 10:46:42 -07:00
Masih H. Derkani
597b8983b0
Address staticcheck issues
Fix `staticcheck` issues:
- S1028 use `fmt.Errorf` to construct formatted errors
- ST1017 yoda conditions
- ST1005 error message capitalization
- ST1006 avoid `self` as receiver name
- S1030 use `buf.String`
- S1011 avoid redundant loop when `append` suffices
- SA4006 unused value
- S1019 remove redundant capacity on `make` call
- SA2002 `t.Fatal` called outside of test

Exported error violates ST1012, which is ignored by this PR since rename may cause breaking changes.

Remove redundant parentheses wrapping, and use CamelCase naming while at it.
2021-07-19 16:53:28 +01:00
Steven Allen
01a7c5e769 move to libp2p 2019-06-29 11:53:15 +02:00
Jeff Wendling
37dddbfb29 add AUTHORS and unify copyright info 2017-06-05 18:07:03 -06:00
Jeff Wendling
0d0212094c remove useless build tags 2017-06-05 18:07:03 -06:00
Andrew Harding
b90544c9b0 openssl 1.1.x support
- created a uniform shim layer for the Go code to invoke that does the
  right thing depending on the version of openssl. functions that have
  yet to be moved can be done so as needed.

- fixed the incorrect use of X509_STORE_CTX_get_app_data in verify_cb to
  pull out the SSL object from the x509 store context, which causes
  crashes when the SSL object index happens to not be zero.

- fix engine not being passed to HMAC_Init_ex

- fix HMAC tests not checking for failures with NewHMAC
2017-06-05 18:07:03 -06:00
Jeff Wendling
90498e17ed expose information about the *SSL on the *Conn
Change-Id: I844ecc4b82472e6d7a8476da2f5380f05f274b7c
2017-03-02 15:14:35 -07:00
Jeff Wendling
4d3c3b16ef support session resumption and hooking into the ticket callback
Change-Id: I8e12e4c1f0a8b350853a41636035baf1cfb0c952
2015-06-09 20:31:03 +00:00
Jeff Wendling
67e06b66c4 fix darwin build
since apple packages a really old openssl version, some of the constants
introduced recently were not present. on darwin, don't compile them in unless
explicititly asked for with the 'brew' build tag.

fixes #14
2014-10-09 11:25:36 -06:00
JT Olds
62e1937684 Merge pull request #13 from bramp/verify-result
Added support for SSL_get_verify_result(..)
2014-10-08 11:04:20 -06:00
Andrew Brampton
948f122871 Correctly formated my changes. 2014-10-08 09:25:03 -07:00
Andrew Brampton
87a7e0f1c3 Add SSL_get_cipher_name(...) 2014-10-07 20:41:21 -07:00
Andrew Brampton
f13a5e0288 Added support for SSL_get_verify_result(..) 2014-10-07 20:09:48 -07:00
paul cannon
8db626a560 use CString with SetTlsExtHostName
i guess we can't rely on there being a null byte after the memory for a
byte array. in retrospect it seems really stupid to think there would
be.

go me

Change-Id: I35ab6704cefbfbde064906aa682985574cb7e034
2014-05-15 12:58:28 -06:00
JT Olds
0022daa4f4 case change
Change-Id: Ia5d0629bd2649f50b462994752029ac8a586a8da
2014-05-13 09:44:10 -06:00
JT Olds
42391d89a5 add license
Change-Id: I4642fb9b97256ec6b3ffbe403272efc690bf1606
2014-05-09 15:38:13 -06:00
JT Olds
b364999a65 fix releasebuffers
Change-Id: I2aaeb8c5a411ef089b3a52a2ec7f0c8353d7dfd3
2014-04-30 14:47:50 -06:00
JT Olds
3c41e85fc4 openssl: add sni to dial helper
Change-Id: Ibfa19f720987a7ba39e3a02c47d8e9f3fff925be
2014-04-29 10:43:01 -06:00
JT Olds
cd4183cd7c godoc 2014-04-29 03:00:19 -06:00
paul cannon
5d58645e49 space monkey internal commit export
[katamari commit: 0b4b2864fe889ae19bf082e6c87cbb90965ed6b3]
2014-04-28 03:10:49 +00:00
Andrew Harding
420209b5b2 space monkey internal commit export
[katamari commit: ec10a16bdc8a55c53af32481120946fa49570b30]
2014-03-11 18:09:47 +00:00
JT Olds
b713c0097b space monkey internal commit export
[katamari commit: 9d8135ffb1b15694ef69909c3b174f246eae7559]
2014-03-07 01:50:08 +00:00
JT Olds
11c5494405 space monkey internal commit export
[katamari commit: eb9538894a23e6b6381ec2e33e825466989451dd]
2014-02-28 22:16:25 +00:00
JT Olds
9038b3bfc8 space monkey internal commit export
[katamari commit: a787e0a0c25fd8ad187772370e3c7272418f6ef8]
2014-02-28 22:00:18 +00:00
JT Olds
6993541398 space monkey internal commit export
[katamari commit: e83c1c725d54438eea74343bfd6b3d2e2f3c9761]
2014-02-28 19:09:37 +00:00
JT Olds
b94151d9ec space monkey internal commit export
[katamari commit: b476ea016d372f9735e59c175c4b3f3b0b053ead]
2014-02-28 18:03:09 +00:00
Jeff Wendling
fa8eb6a573 space monkey internal commit export
[katamari commit: 9bd04d1d78e85304589695c66e328d23128f509c]
2014-02-25 19:01:49 +00:00
Jeff Wendling
751143ef9c space monkey internal commit export
[katamari commit: ce8d2d36f887ab400c77a4eed9e37d02ecc8968a]
2014-02-25 17:36:24 +00:00
Andrew Harding
9191dc4a2c space monkey internal commit export
[katamari commit: 77dd3ea8a00bdc73be495e9b06c491a85b4521ff]
2014-01-24 01:27:18 +00:00
JT Olds
88870b4b4c space monkey internal commit export
[katamari commit: b70e599dbbed2ba3cd5ba278a0278c8ff8c553cb]
2014-01-20 21:00:12 +00:00
JT Olds
053d794fe5 space monkey internal commit export
[katamari commit: 66d3bf715795d3696ca37003fba5dba1af7ffacf]
2014-01-20 19:29:56 +00:00
JT Olds
a9b372afa5 space monkey internal commit export
[katamari commit: 53135767bbc8a5d26c9a2db6e3e66791f36398b8]
2014-01-20 19:29:46 +00:00
JT Olds
f3fa51fc61 space monkey internal commit export
[katamari commit: fbadad69fa95d38c389d6dbf9607599c51353e78]
2014-01-18 01:30:37 +00:00