guardianproject / haven

Haven is for people who need a way to protect their personal spaces and possessions without compromising their own privacy, through an Android app and on-device sensors
https://guardianproject.github.io/haven/
GNU General Public License v3.0
6.58k stars 728 forks source link

Signal registration fails in 0.2.0-alpha2 #315

Closed micahflee closed 6 years ago

micahflee commented 6 years ago

I have a Nexus 6P running the stock rom, and I installed Haven-0.2.0-alpha-2-release.apk. When I try registering a phone number with Signal, it fails, and the phone number never receives an SMS message. Here is the error (with the actual phone number redacted to +1xxxxxxxxxx):

07-14 19:11:38.082 12488 12536 W System.err: Failed to send (some) messages:
07-14 19:11:38.082 12488 12536 W System.err: Network failure for "+1xxxxxxxxxx": org.whispersystems.signalservice.api.push.exceptions.PushNetworkException: javax.net.ssl.SSLPeerUnverifiedException: Hostname textsecure-service.whispersystems.org not verified:
07-14 19:11:38.082 12488 12536 W System.err:     certificate: sha256/HM+ifSiHwpnXD9+puSNkx6xEtwuT5qtfJQNRH+NdoBc=
07-14 19:11:38.082 12488 12536 W System.err:     DN: CN=textsecure-service.whispersystems.org,OU=Open Whisper Systems,O=Open Whisper Systems,ST=California,C=US
07-14 19:11:38.082 12488 12536 W System.err:     subjectAltNames: []

When I run 0.1.0-RC-1, it works fine to register a phone number with Signal.

lukeswitz commented 6 years ago

Thank you for the logs, it’s a headache this bug. For now please use the first dev release. The media playback library is conflicting with Signal SSL signing.

n8fr8 commented 6 years ago

Yeah, the goal is just improved performance and stability right now. I will update signal-cli as a start.

n8fr8 commented 6 years ago

(Also I think this is just a case of two libraries competing for usage of HTTPS/TLS stack, and overwriting things like hostname verifies and Root CA stores)

n8fr8 commented 6 years ago

Alright, just pushed more commits to my PR here #314

n8fr8 commented 6 years ago

Oh, and also tested Signal registration, and it seemed to work just fine.

n8fr8 commented 6 years ago

New alpha build is up: https://github.com/guardianproject/haven/releases/tag/0.2.0-alpha-3

n8fr8 commented 6 years ago

@micahflee reports the fix was good!