Commit Graph

201 Commits

Author SHA1 Message Date
Jeff Wendling
6db4433778 remove dependency on golang.org/x/crypto in md4 tests 2018-09-13 16:41:04 -06:00
Ramesh V Rayaprolu
543df27fc7 add m4 and m5 wrappers (#104) 2018-09-13 16:38:26 -06:00
Jeff Wendling
0ffbced908 skip ed25519 tests if not supported 2018-09-13 16:17:59 -06:00
parasssh
8ea58d1789 Ed25519 key support (#103)
* ed gen, sign, verify works. tested25519 fails
* Ignore some unit tests in ED since it relies on GoLang lib to support Ed keys
* Cleanup sign and verify operations
* Cleanup and prettify
* cleanups
* Conditional X_EVP_PKEY_ED25519 and  X_EVP_Digest{Sign|Verify}[Init] based on openssl version.
2018-09-13 16:07:17 -06:00
Jeff Wendling
3b86b42896 add support for get/set x509 version
closes #61
2018-09-05 07:34:06 -06:00
Jeff Wendling
9386dd2f5b fix bug with SetPadding and add go.mod 2018-09-05 07:04:03 -06:00
Ramesh Rayaprolu (rarayapr)
33d609e316 add wrappers to enable/disable Padding for encryption contexts 2018-08-17 00:06:36 -06:00
Jeff Wendling
5da517866c fix missing semicolon 2018-07-26 19:26:50 -06:00
Jeff Wendling
3c881b520f set callback thread id on windows 2018-07-26 11:32:16 -06:00
Ajay Nalawade
6ac1e9e6b9 Set thread id callback as required by openssl. 2018-07-26 11:20:55 -06:00
Andrew Harding
85c7f475b6 Fix hostname validation with an IPv4 SAN
Go can use 16 bytes to store an IPv4 address in a net.IP so it needs to
be converted to a 4-byte representation first.
2018-04-17 08:51:22 -06:00
Jeff Wendling
2df7e68102 Revert "remove unsupported build flags on go1.9.4+"
This reverts commit 6eae62b008.
This reverts commit baa1f6250e.

Leaves in the removal of -w from the darwin LDFLAGS as it is still
problematic on 1.9.5 and 1.10.1.
2018-04-05 16:06:18 -06:00
Jeff
baa1f6250e
remove unsupported build flags on go1.9.4+ 2018-02-07 13:17:32 -07:00
Jeff
6eae62b008
remove unsupported build flags on go1.9.4+ 2018-02-07 13:17:05 -07:00
Jakub Čajka
666cd1440a Make test confom to new requirement enforced in go 1.10 https://tip.golang.org/doc/go1.10#test. With out this change tests will always fails with go 1.10+. 2018-01-17 09:59:19 -07:00
Jeff Mitchell
e863d83e40 Add P521 to defined curves 2018-01-05 16:06:25 -07:00
Christopher Dudley
08c83c41f3 Fix spelling of some NID constants. 2018-01-05 16:06:15 -07:00
Christopher Dudley
4dc321d35e Fix incompatibilities with OpenSSL 1.0.x (#1)
Fix incompatiblities with OpenSSL 1.0.x
2018-01-05 16:06:15 -07:00
Christopher Dudley
e0d1688384 Add myself to AUTHORS :) 2018-01-05 16:06:15 -07:00
Christopher Dudley
96ce3e554e Rename Type() to KeyType() to be more descriptive. 2018-01-05 16:06:15 -07:00
Christopher Dudley
193b24e768 Add additional tests for EC key/cert marshalling. 2018-01-05 16:06:15 -07:00
Christopher Dudley
c26b4563dc change error checking style to match existing code. 2018-01-05 16:06:15 -07:00
Christopher Dudley
7689615645 add shared secret derivation and test for ECDH. 2018-01-05 16:06:15 -07:00
Christopher Dudley
64a7b8acc3 add EC key generation. 2018-01-05 16:06:15 -07:00
Christopher Dudley
1647be123d allow pKey to support any key type supported by OpenSSL. 2018-01-05 16:06:15 -07:00
Jeff Wendling
4ea35d79e3 fix build on dev version of go on osx
cgo starts exiting when pkg-config doesn't work, so limit calling
pkg-config to linux and windows.

we also need to specify -lssl and -lcrypto in the linker flags
when we don't have pkg-config
2017-12-07 13:32:27 -07:00
Andrew Harding
8ef358132a convenient tag to support static linking 2017-09-28 15:57:55 -06:00
Alexander Pyhalov
b2898d133d Fix build on solarish platforms 2017-09-25 09:47:40 -06:00
Andrew Harding
d79d6bce81 remove unnecessary windows build cruft 2017-09-18 16:57:59 -06:00
Jeff
ad5fdecfce ignore linker warnings on os x
this way if you don't have openssl@1.1 installed, it doesn't complain at you
2017-07-07 14:49:22 -06:00
JT Olds
30b9d3d440 Update README.md 2017-06-29 17:57:46 -06:00
Andrew Harding
1ea168d098 move defines to shim header 2017-06-06 08:23:50 -06: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
Stephen Gallagher
28dd155517 Fix typo in LoadPrivateKeyFromPEMWidthPassword
Fixes #62
2017-04-14 09:50:34 -06:00
Scott Kidder
535a60be66 HMAC functions
Resolves #35

Author:    Scott Kidder <skidder@brightcove.com>
Date:      Fri May 22 10:41:35 2015 -0700

	First commit of HMAC functions
	Renamed HMAC Update function to Write
	Eliminate debug logging
	Compare the HMAC result
	Call Reset function in Final return statement
2017-03-03 12:35:14 -07:00
Jeff Wendling
2980c58b82 fix bug with hostname validation on newer openssl
the signature for the X509_check_host function takes
a char **peername, and our vendored hostname code does
not have this argument. hilarity ensues!!

so since we never use it, just have our vendored code
ignore it.

Change-Id: I4fdf0a4cd43738e4cc7261e4e2d16a9deef1ac82
2017-03-02 15:14:35 -07:00
Jeff Wendling
fd0849ed03 add flags to work with homebrew openssl by default
Change-Id: I1599b4585850d81d4bc43dc067321af15ad3fafd
2017-03-02 15:14:35 -07:00
Jeff Wendling
90498e17ed expose information about the *SSL on the *Conn
Change-Id: I844ecc4b82472e6d7a8476da2f5380f05f274b7c
2017-03-02 15:14:35 -07:00
JT Olds
d63025916b Merge pull request #67 from diffeo/master
FIPS Mode capability
2016-11-28 18:02:28 -07:00
kujenga
ddb2b54e96
lock OS thread when changing FIPS mode
Based on a PR comment here: https://github.com/spacemonkeygo/openssl/pull/42
2016-11-28 19:43:27 -05:00
kujenga
9257638928
comment FIPS method, docs link, fix darwin build flag 2016-11-28 17:42:34 -05:00
kujenga
6f143c2df6
add FIPS mode from fork
This introduces this file: https://github.com/10gen/openssl/blob/master/fips.go
Which was pointed to from this issue: https://github.com/spacemonkeygo/openssl/issues/37
2016-11-28 16:39:24 -05:00
Colin Misare
a0b9b65330 adding GenerateRSAKeyWithExponent 2016-08-09 18:51:09 -06:00
Colin Misare
2ffbf8f57a adding LoadPrivateKeyFromDER 2016-08-09 18:51:05 -06:00
Colin Misare
ef69faf59b adding SHA1 and SHA512 Methods 2016-05-17 17:38:34 -06:00
Jeff Wendling
fb0c387e74 fixes for go1.6
Change-Id: I35a41afbdfe2016f7b0967087deb7b418dca2bb2
2016-03-24 14:41:08 +00:00
JT Olds
71f9da2a48 Merge pull request #41 from rfjakob/master
Fix build with openssl 1.0.2d
2015-11-29 11:55:40 -07:00
JT Olds
e6f40e41ef fix a leak and compiler error 2015-11-29 11:45:32 -07:00