Title: Support Bouncycastle's BC-Prov 1.60 · Issue #80 · hap-java/HAP-Java · GitHub
Open Graph Title: Support Bouncycastle's BC-Prov 1.60 · Issue #80 · hap-java/HAP-Java
X Title: Support Bouncycastle's BC-Prov 1.60 · Issue #80 · hap-java/HAP-Java
Description: HAP-Java is incompatible with Bouncycastle's BC-Prov dependency version 1.60. While correctly specified in the pom.xml file, other dependencies in the same project can still cause a version bump, in my case it was Spring-Cloud Greenwich....
Open Graph Description: HAP-Java is incompatible with Bouncycastle's BC-Prov dependency version 1.60. While correctly specified in the pom.xml file, other dependencies in the same project can still cause a version bump, i...
X Description: HAP-Java is incompatible with Bouncycastle's BC-Prov dependency version 1.60. While correctly specified in the pom.xml file, other dependencies in the same project can still cause a version bum...
Opengraph URL: https://github.com/hap-java/HAP-Java/issues/80
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support Bouncycastle's BC-Prov 1.60","articleBody":"HAP-Java is incompatible with Bouncycastle's BC-Prov dependency version 1.60.\r\n\r\nWhile correctly specified in the `pom.xml` file, other dependencies in the same project can still cause a version bump, in my case it was Spring-Cloud Greenwich.SR1.\r\nIt updates the dependency to version 1.60 and then HAP-Java is raising the following, very confusing error during pairing:\r\n\r\n```\r\norg.bouncycastle.crypto.tls.TlsFatalAlert: bad_record_mac(20)\r\n\tat com.beowulfe.hap.impl.crypto.ChachaDecoder.decodeCiphertext(ChachaDecoder.java:31) ~[hap-1.1.5.jar:na]\r\n\tat com.beowulfe.hap.impl.crypto.ChachaDecoder.decodeCiphertext(ChachaDecoder.java:41) ~[hap-1.1.5.jar:na]\r\n\tat com.beowulfe.hap.impl.pairing.FinalPairHandler.decrypt(FinalPairHandler.java:44) ~[hap-1.1.5.jar:na]\r\n\tat com.beowulfe.hap.impl.pairing.FinalPairHandler.handle(FinalPairHandler.java:39) ~[hap-1.1.5.jar:na]\r\n\tat com.beowulfe.hap.impl.pairing.PairingManager.handle(PairingManager.java:59) ~[hap-1.1.5.jar:na]\r\n\tat com.beowulfe.hap.impl.connections.HttpSession.handlePairSetup(HttpSession.java:109) ~[hap-1.1.5.jar:na]\r\n\tat com.beowulfe.hap.impl.connections.HttpSession.handleRequest(HttpSession.java:53) ~[hap-1.1.5.jar:na]\r\n\tat com.beowulfe.hap.impl.connections.ConnectionImpl.doHandleRequest(ConnectionImpl.java:54) ~[hap-1.1.5.jar:na]\r\n\tat com.beowulfe.hap.impl.connections.ConnectionImpl.handleRequest(ConnectionImpl.java:47) ~[hap-1.1.5.jar:na]\r\n\tat com.beowulfe.hap.impl.http.impl.AccessoryHandler.channelRead0(AccessoryHandler.java:52) ~[hap-1.1.5.jar:na]\r\n\tat com.beowulfe.hap.impl.http.impl.AccessoryHandler.channelRead0(AccessoryHandler.java:17) ~[hap-1.1.5.jar:na]\r\n\tat io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) ~[netty-all-4.1.34.Final.jar:4.1.34.Final]\r\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) ~[netty-all-4.1.34.Final.jar:4.1.34.Final]\r\n\tat io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:38) ~[netty-all-4.1.34.Final.jar:4.1.34.Final]\r\n\tat io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:350) ~[netty-all-4.1.34.Final.jar:4.1.34.Final]\r\n\tat io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66) ~[netty-all-4.1.34.Final.jar:4.1.34.Final]\r\n\tat io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905) ~[netty-all-4.1.34.Final.jar:4.1.34.Final]\r\n\tat io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-all-4.1.34.Final.jar:4.1.34.Final]\r\n\tat java.base/java.lang.Thread.run(Thread.java:835) ~[na:na]\r\n```\r\n\r\nI'm not an expert in this area, but the following note one the [bouncycastle page](https://www.bouncycastle.org/latest_releases.html) looks promising:\r\n\r\n\u003e The PEM Parser now returns an X509TrustedCertificate block when parsing an openssl trusted certificate, the new object was required to allow the proper return of the trusted certificate's attribute block\r\n\r\nI've now \"fixed\" it by enforcing version 1.51 like this, but it would, of course, break Spring Cloud, if it's using that particular part of the code. \r\n\r\n```kotlin\r\nimplementation(\"org.bouncycastle:bcprov-jdk15on:1.51\") {\r\n isForce = true\r\n}\r\n```\r\n\r\nA proper fix to support the latest version of bcprov would be nice, but until then it's at least documented and others can find it. Took me hours to finally figure this out and Google doesn't help in this case.\r\n\r\n","author":{"url":"https://github.com/dfrommi","@type":"Person","name":"dfrommi"},"datePublished":"2019-06-29T09:31:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/80/HAP-Java/issues/80"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:831e591a-a144-77b6-a3a3-521ccee2868d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8684:38680B:105DC8E:14C82E8:6975A34F |
| html-safe-nonce | 1a147b657dfb002e113f77dde5fceb9df5a0b1adf1a201640bd6d9b9b5055350 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Njg0OjM4NjgwQjoxMDVEQzhFOjE0QzgyRTg6Njk3NUEzNEYiLCJ2aXNpdG9yX2lkIjoiMzIwMDkzOTkwOTQzODYxMjMwMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 616a63b3bf93c935ee4521b528ff8a64e9e5ae2959a085e3a91e451162c722d3 |
| hovercard-subject-tag | issue:462285202 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/hap-java/HAP-Java/80/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9b6489b59023700e3a1f95e9d66737f097abb503e749d29c8c10952890c42e1b/hap-java/HAP-Java/issues/80 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9b6489b59023700e3a1f95e9d66737f097abb503e749d29c8c10952890c42e1b/hap-java/HAP-Java/issues/80 |
| og:image:alt | HAP-Java is incompatible with Bouncycastle's BC-Prov dependency version 1.60. While correctly specified in the pom.xml file, other dependencies in the same project can still cause a version bump, i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dfrommi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| turbo-cache-control | no-preview |
| go-import | github.com/hap-java/HAP-Java git https://github.com/hap-java/HAP-Java.git |
| octolytics-dimension-user_id | 47992845 |
| octolytics-dimension-user_login | hap-java |
| octolytics-dimension-repository_id | 31193475 |
| octolytics-dimension-repository_nwo | hap-java/HAP-Java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31193475 |
| octolytics-dimension-repository_network_root_nwo | hap-java/HAP-Java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width