Closed The-Lum closed 1 year ago
Well, the value for "algorithm" depends on the capabilities of the JCE provider that is backing the KeyStore type.
In the case of PKCS#12, JCEKS and JKS it's the SUN provider of the JRE, which means there are differences when using different versions of the JRE. For example the included Java 17 shows the right algorithm name:
So for these keystore types this not surprising and while I could implement a workaround, by translating the OID into something human-readable, it would only mask the real issue and probably cause other problems somewhere else. It is one of those fundamental disadvantages that KSE has compared to keytool: Keytool only has to work with exactly one Java version, while KSE currently supports everything from Java 8 up to 19, the currently latest one (and Java 8 has had so many drastic changes in its overly long lifetime that it hardly counts as a single version). IMHO there are already too many workarounds in KSE for handling issues with older Java versions and this is simply not sustainable in the long run.
For BCFKS things are a bit more complicated. Everything (BC documentation, provider infos, source code) says that HMAC-SHA256 is supported and should work but for some reason it does not... I will have to debug through the BC code, which requires some preparation and therefore will take some time.
Ok, that responds at my interrogation:
the value for "algorithm" depends on the capabilities of the JCE provider that is backing the KeyStore type.
Then you can do whatever you want with this issue. Regards.
Describe the bug The name
HMAC SHA-256
for OID1.2.840.113549.2.9
on Secret Key generation (depending of keystore) is not always display, some time only the OID.To Reproduce Steps to reproduce the behavior:
HMAC SHA-256
Secret Keykeystore
format...Expected behavior See the name
HMAC SHA-256
instead of the OID.Screenshots Here are some examples of HMAC key generation, depending of the keystore type:
UBER or BKS
PKCS#12
BCFKS
Error:
Environment
Contrary to #340, I have no idea to indicate the code to change... Regards.