You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to implement nebula-certs in Clojure I encountered a bug with byte serialization.
Protojure reads the data ok but during byte serialization produces "wrong" byte arrays - different from what go and Java.
Hence my code to verify the signature in Clojure fails to work.
(defncert-details->bytes"Convert protojure a RawNebulaCertificateDetails map to bytes. Uses double serializations since protojure has a serialization bug with https://github.com/protojure/lib/issues/164 Once it's fixed we can use only protojure."
[details]
(let [d-bytes ^bytes (protojure/->pb details)
cert2 (Cert$RawNebulaCertificateDetails/parseFrom d-bytes)
d-bytes2 (.toByteArray cert2)]
d-bytes2))
Hello,
While trying to implement nebula-certs in Clojure I encountered a bug with byte serialization.
Protojure reads the data ok but during byte serialization produces "wrong" byte arrays - different from what go and Java.
Hence my code to verify the signature in Clojure fails to work.
Discussion on Slack is here: https://clojurians.slack.com/archives/CNZQPJLD9/p1711152208441789 .
Cert.java.txt
cert.proto.txt
ieugen.crt.txt
ieugen.bytes.txt
ieugen-crt.bytes.txt
The text was updated successfully, but these errors were encountered: