jose icon indicating copy to clipboard operation
jose copied to clipboard

Port OpenSSL code to use contemporary API

Open abbra opened this issue 6 years ago • 10 comments

Port Jose code to use contemporary OpenSSL API, allowing to use external engines and algorithms provided by them.

abbra avatar Sep 29 '18 13:09 abbra

It looks like JOSE already uses EVP API, as you suggested. The major place which can not do that is JWK support. You have to define/specify new JWK types and add functions to convert them to/from EVP_PKEY.

lumag avatar Sep 30 '18 09:09 lumag

Thanks @lumag. So we would need to extend JWK spec for that, right?

abbra avatar Sep 30 '18 10:09 abbra

Namely, https://tools.ietf.org/html/rfc7518 needs to be extended to add GOST to JWA registries

abbra avatar Sep 30 '18 10:09 abbra

I'm not sure it's so necessary. RFC 7515 (https://tools.ietf.org/html/rfc7515#section-4), 7516 (https://tools.ietf.org/html/rfc7516#section-4.1.7), 7517 (https://tools.ietf.org/html/rfc7517#section-4.6) specifies attributes x5u/x5c so for some cases we can avoid both hardcoding algorithms identifiers and algorithm-specific attributes.

beldmit avatar Oct 02 '18 09:10 beldmit

@beldmit amending the "JSON Web Signature and Encryption Algorithms" registry is required to add any algorithm. x509 certs identifier are optional and not even implemented in many Jose libraries, and they do not influence in any way the algorithm selection.

simo5 avatar Oct 02 '18 12:10 simo5

OK, so it makes sense to start adding new algorithms in JOSE RFCs. But after that we'll have a hardly maintainable case structures that should be converted in pluggable API somewhen.

beldmit avatar Oct 02 '18 14:10 beldmit

@beldmit , @simo5 : what are the next steps then? Is it necessary to add a new amend to the corresponding RFC?

sarroutbi avatar Oct 06 '21 14:10 sarroutbi

@sarroutbi I currently don't have plans related to Russian GOST and not aware of similar plans for anybody in Russia. I'm afraid tha library uses a lot of functions deprecated in OpenSSL 3.0 though...

beldmit avatar Oct 07 '21 10:10 beldmit

Hello @beldmit. Thanks for your quick response.

Can this issue be closed then?

sarroutbi avatar Oct 07 '21 12:10 sarroutbi

Unfortunately, no. Did you try compile your library against openssl 3.0 with -Wdeprecated?

beldmit avatar Oct 07 '21 12:10 beldmit