hap-java / HAP-Java

Java implementation of the HomeKit Accessory Protocol
MIT License
155 stars 82 forks source link

Upgrade bouncycastle dependencies to 1.72 #169

Closed wborn closed 2 years ago

wborn commented 2 years ago

Fixes #80 Succeeds #146

For release notes, see:

https://www.bouncycastle.org/releasenotes.html#r1rv72

Pull Request Checklist

Please confirm that you've done the following when opening a new pull request:

wborn commented 2 years ago

As Java 8 is targeted:

https://github.com/hap-java/HAP-Java/blob/781311e94c7967080119daec41d288a3a90b7691/pom.xml#L184-L185

the "jdk18on" artifacts can be used. :slightly_smiling_face:

ccutrer commented 2 years ago

If I apply this, then the HomeKit add-on won't load in OpenHAB 3.4.0-SNAPSHOT (as of last night), citing Unresolved requirement: Import-Package: org.bouncycastle.tls; version="[1.72.0,2.0.0)". Is there a migration plan, or do all addons have to update to the new artifactid at the same time?

wborn commented 2 years ago

Thanks for having a look! Did you also build an add-on with the changes in https://github.com/openhab/openhab-addons/pull/11104? Those changes are required for embedding bouncycastle 1.72 into the bundle.

ccutrer commented 2 years ago

I didn't see that PR. I now tried it. I can install the bundle, but logging reports 2022-10-14 13:57:55.948 [WARN ] [.server.impl.connections.HttpSession] - Unrecognized request for /characteristics (which means it's using the unauthenticated servlet, instead of the authenticated one), and every accessory shows up as "No Response" on iOS.

wborn commented 2 years ago

That's unfortunate since I don't use HomeKit myself so I can't easily test or debug it. :slightly_frowning_face:

Do you have an idea what goes wrong? Is there some kind of HomeKit client that can be used for testing?

It would be helpful if there were unit tests for testing the crypto logic which would then fail with the upgraded dependencies. Then I could look into fixing those test. :slightly_smiling_face: