Issue#533: Bug in using Parm-Z algorithm parameter fo GOST28147 engine
oidMappings.put(CryptoProObjectIdentifiers.id_Gost28147_89_CryptoPro_B_ParamSet, "E-B");
oidMappings.put(CryptoProObjectIdentifiers.id_Gost28147_89_CryptoPro_C_ParamSet, "E-C");
oidMappings.put(CryptoProObjectIdentifiers.id_Gost28147_89_CryptoPro_D_ParamSet, "E-D");
- oidMappings.put(RosstandartObjectIdentifiers.id_tc26_gost_28147_param_Z, "Param-Z");
+ oidMappings.put(RosstandartObjectIdentifiers.id_tc26_gost_28147_param_Z, "PARAM-Z");
nameMappings.put("E-A", CryptoProObjectIdentifiers.id_Gost28147_89_CryptoPro_A_ParamSet);
nameMappings.put("E-B", CryptoProObjectIdentifiers.id_Gost28147_89_CryptoPro_B_ParamSet);
nameMappings.put("E-C", CryptoProObjectIdentifiers.id_Gost28147_89_CryptoPro_C_ParamSet);
nameMappings.put("E-D", CryptoProObjectIdentifiers.id_Gost28147_89_CryptoPro_D_ParamSet);
- nameMappings.put("Param-Z", RosstandartObjectIdentifiers.id_tc26_gost_28147_param_Z);
+ nameMappings.put("PARAM-Z", RosstandartObjectIdentifiers.id_tc26_gost_28147_param_Z);
}
private GOST28147()
@@ -291,7 +291,10 @@ else if (paramSpec instanceof GOST28147ParameterSpec)
protected static ASN1ObjectIdentifier getSBoxOID(String name)
{
- ASN1ObjectIdentifier oid = (ASN1ObjectIdentifier)nameMappings.get(name);
+ ASN1ObjectIdentifier oid = null;
+
+ if (name!=null)
+ oid = (ASN1ObjectIdentifier)nameMappings.get(name.toUpperCase());
if (oid == null)
{
