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

Downgrade gothemis compatibility #253

Closed
vixentael opened this Issue Nov 6, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@vixentael
Member

vixentael commented Nov 6, 2017

It seems that gothemis uses syntax incompatible with old Go versions (TODO: check exact version, but it's definitely below 1.2).

We should re-write this line to smth more compatible
https://github.com/cossacklabs/themis/blob/master/gothemis/session/session.go#L93

As example we used this code in Hermes:

//CArrayToSlice return buffer as byte slice with len/cap equals to bufferLength
func CArrayToSlice(buffer unsafe.Pointer, bufferLength int) []byte {
	sliceHeader := reflect.SliceHeader{uintptr(buffer), int(bufferLength), bufferLength}
	data := *(*[]byte)(unsafe.Pointer(&sliceHeader))
	return data
}

(from https://github.com/cossacklabs/hermes-core/blob/master/gohermes/utils.go)

Although this code is 100% valid, but it would be nice to support previous versions.

@vixentael

This comment has been minimized.

Member

vixentael commented Nov 6, 2017

Self-check:
Internal buildbot builds that are supposed to be fixed after this fix:

  • themis-test-ubuntu_precise-x86_64
  • themis-test-ubuntu_precise-i386 (go1)
  • themis-test-debian_wheezy-i386
@vixentael

This comment has been minimized.

Member

vixentael commented Dec 6, 2017

closed by #254

@vixentael vixentael closed this Dec 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment