amzn / smoke-aws

AWS services integration for the Smoke Framework
Apache License 2.0
111 stars 19 forks source link

Support Ubuntu 18.04 #14

Closed joscdk closed 4 years ago

joscdk commented 5 years ago

This implementation is not supported on Ubuntu 18.04 https://github.com/amzn/smoke-aws/blob/master/Sources/SmokeAWSHttp/String%2Bhmac.swift#L29

(The same for this https://github.com/amzn/smoke-aws/blob/master/Sources/SmokeAWSHttp/String%2Bhmac.swift#L37)

There might be others, haven't looked that deep into it.

Ubuntu 18.04 support would be a very nice addition

tachyonics commented 5 years ago

Thanks for opening this issue. Do you have a Ubuntu 18.08 testing environment (docker image) that we could use to look into this?

joscdk commented 5 years ago

Currently i only have a DO droplet running with it, however i can see if i can make a Ubuntu 18.04 Docker image with Swift later tonight :)

joscdk commented 5 years ago

(The issue is caused by OpenSSL 1.1 in 18.04, as opposed to 1.0 in 16.04)

joscdk commented 5 years ago

Nvm just saw there is an official Apple docker image with 18.04 :) https://github.com/apple/swift-docker/blob/master/4.2/ubuntu/18.04/Dockerfile

foscomputerservices commented 5 years ago

Yes, I hit this issue pretty quickly as the default docker image for Swift 5.0/5.0.1/latest is 18.04 (bionic)...

joscdk commented 5 years ago

@tachyonics hi, just following up, if you have had a chance to look into this? :) .. Especially since 18.04 is now the default for Swift containers :)

joscdk commented 5 years ago

To provide a bit more information, so far it looks like it's only the String+hmac.swift file causing problems, because of API changes in OpenSSL 1.1

I needed it to compile locally (I am using 18.04 on my laptop), and made some changes in my fork, i am in no way sure if it works, but at least it compiles :D .. If anyone else is in the same position https://github.com/joscdk/smoke-aws/blob/master/Sources/SmokeAWSHttp/String%2Bhmac.swift

I haven't tested the AWS functionality, since i am working on some other features right now :)

tachyonics commented 5 years ago

I haven't. I will find some time next week to look into this.

tachyonics commented 5 years ago

I am testing this here - https://github.com/amzn/smoke-aws/tree/swift_5_0_testing

Looks like the easiest way is to take advantage of an existing library to shim the differences between OpenSSL 1.0 and 1.1. Until a SSWG-standardized one is available, I have incorporated BlueCryptor from IBM. Thoughts on this choice are welcome. So far I have been able to verify that the package now builds on both versions of Ubuntu.

https://travis-ci.com/amzn/smoke-aws/builds/114615500

I will continue testing to verify the changes to ensure that there is no functionality regression.

tachyonics commented 4 years ago

This has merged into mainline and released under the 2.x releases, starting with 2.30.7.