Closed Geal closed 9 months ago
Hey folks, does the gating behind the feature not work here?
The gating works, but when activating the pem feature, the library does not compile
The gating works, but when activating the pem feature, the library does not compile
Oh, should we fix forward instead? It sounds like we need to make the pem feature enable the other features that would enable std::fs.
I think pkcs8 is a pretty common format, but I can make my own workaround. Feel free to revert.
What I'm proposing in this format keeps the pem and der loading from buffers, but not the functions to load from file, because to activate files I would then have to add a second feature gate to the router, since file loading would not make sense in other platforms like wasm. If you have the functions to load from a buffer, loading from a file is not too far, that's a reasonable tradeoff
Sounds good. I think a pkcs8 PEM file is quite common (easier to use interface), but I don’t mind the change. If we can gate pem + std::fs together that would be awesome, but I'm not quite sure how to do that. Sorry for breaking the build.
We made a mistake when merging https://github.com/biscuit-auth/biscuit-rust/pull/204, that feature can't compile right now, because it needs the
std
feature active on the e25519 crate. That features requiresstd::fs
, which may not work easily in other target platforms like web assembly. It is reasonably easy to load a file manually in rust and pass a buffer, so I propose we remove those functions entirely.cc @baranyildirim