I would like to know if it is possible to generate a new certificate with the same public key (for a private key) and change the order of the attributes in the Issuer / Subject string?
It is about an old server system that is working with "self signed" certificates. They are stored & used in JKS files (Private Key on server, Public Key shared to all clients). The last update of the keys happened last year. As it turned out one of the consuming client applications can't handle the new certificates, because of the order of the attributes in the Subject/Issuer string.
Like "C=XX, O=MyOrganization, OU=MyOrganizationalUnit, CN=myCommonName" is OK
vs "CN=myCommonName, OU=MyOrganizationalUnit, O=MyOrganization, C=XX" is not OK.
In short time, it is NOT possible to update the consuming client application to make it compatible with the “new” string format. Therefore, the only option would be to have a new JKS with a public key certificate, that is for the current private key, but with different order of the attributes in the Subject/Issuer string.
We cannot simply generate a new pair for the system, as there are a lot of clients already running with the public key (and are able to handle it correct).
Is it somehow possible to create a new trust store JKS with the public key certificate and an updated order of the attributes in the Subject/Issuer string.
The Keytool commands seem to not allow this?
keytoolcan be used in this process.