Skip to content

Consider RsaKeyConverters.x509 reading certificates #9736

@jzheaux

Description

@jzheaux

When passing an InputStream that begins -----BEGIN PUBLIC KEY-----, RsaKeyConverters.x509 will convert this into a public key.

It might be nice to be able to do the same with certificates in the same method. For example, if it begins -----BEGIN CERTIFICATE-----, then the method could alternatively do:

X509Certificate certificate = (X509Certificate) certificateFactory.generateCertificate(source);
return (RSAPublicKey) certificate.getPublicKey();

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreAn issue in spring-security-coretype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions