Skip to content

Conversation

@scottjg
Copy link
Contributor

@scottjg scottjg commented Feb 24, 2015

in later openssl, the key param in EVP_PKEY_assign changed from char* to
void*. causes this error:

../github.com/spacemonkeygo/openssl/key.go:324: cannot use
(*C.char)(unsafe.Pointer(rsa)) (type *C.char) as type unsafe.Pointer in
argument to _Cfunc_EVP_PKEY_assign

this fix adds a shim function in C, where the char* can be automatically coerced into void*

in later openssl, the key param in EVP_PKEY_assign changed from char* to
void*. causes this error:
../github.com/spacemonkeygo/openssl/key.go:324: cannot use
(*C.char)(unsafe.Pointer(rsa)) (type *C.char) as type unsafe.Pointer in
argument to _Cfunc_EVP_PKEY_assign
@thepaul
Copy link
Contributor

thepaul commented Feb 26, 2015

+1

zeebo referenced this pull request Mar 4, 2015
Newer versions of Go (at least 1.4) do not like mixing C pointer
types. Cast an unsafe.Pointer to *C.char to make the compiler see
matching types.
zeebo added a commit that referenced this pull request Mar 4, 2015
fix compilation for later openssl
@zeebo zeebo merged commit 8feeee5 into spacemonkeygo:master Mar 4, 2015
@zeebo
Copy link
Member

zeebo commented Mar 4, 2015

Thanks. 👍

merlin-northern pushed a commit to merlin-northern/openssl that referenced this pull request Aug 26, 2020
nathan454 pushed a commit to nathan454/openssl that referenced this pull request Nov 30, 2022
…eout-call

Add openssl.DialTimeout(network, addr, timeout, ctx, flags) call
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 this pull request may close these issues.

3 participants