Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
317 changes: 93 additions & 224 deletions GeneXusXmlSignature/src/main/java/com/genexus/dsig/XmlDSigSigner.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static AsymmetricSigningAlgorithm getAsymmetricSigningAlgorithm(String as
case "ECDSA":
return AsymmetricSigningAlgorithm.ECDSA;
default:
error.setError("AS001", "Unrecognized AsymmetricSigningAlgorithm");
error.setError("ASA01", "Unrecognized AsymmetricSigningAlgorithm");
return null;
}
}
Expand All @@ -47,7 +47,7 @@ public static String valueOf(AsymmetricSigningAlgorithm asymmetricSigningAlgorit
case ECDSA:
return "ECDSA";
default:
error.setError("AS002", "Unrecognized AsymmetricSigningAlgorithm");
error.setError("ASA02", "Unrecognized AsymmetricSigningAlgorithm");
return "";
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static CanonicalizerWrapper getCanonicalizerWrapper(String canonicalizerW
case "exc_C14N_WITH_COMMENTS":
return CanonicalizerWrapper.ALGO_ID_C14N_EXCL_WITH_COMMENTS;
default:
error.setError("CM001", "Unrecognized CanonicalizationMethod: " + canonicalizerWrapper);
error.setError("CAW01", "Unrecognized CanonicalizationMethod");
return null;
}
}
Expand All @@ -55,7 +55,7 @@ public static String valueOf(CanonicalizerWrapper canonicalizerWrapper, Error er
case ALGO_ID_C14N_EXCL_WITH_COMMENTS:
return "exc_C14N_WITH_COMMENTS";
default:
error.setError("CM002", "Unrecognized CanonicalizationMethod");
error.setError("CAW02", "Unrecognized CanonicalizationMethod");
return "";
}
}
Expand All @@ -78,7 +78,7 @@ public static String valueOfInternal(CanonicalizerWrapper canonicalizerWrapper,
case ALGO_ID_C14N_EXCL_WITH_COMMENTS:
return "ALGO_ID_C14N_EXCL_WITH_COMMENTS";
default:
error.setError("CM003", "Unrecognized CanonicalizationMethod");
error.setError("CAW03", "Unrecognized CanonicalizationMethod");
return "";
}
}
Expand All @@ -94,7 +94,7 @@ public static String getCanonicalizationMethodAlorithm(CanonicalizerWrapper cano
case ALGO_ID_C14N_EXCL_OMIT_COMMENTS:
return Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS;
default:
error.setError("CM004", "Unrecognized CanonicalizationMethod");
error.setError("CAW04", "Unrecognized CanonicalizationMethod");
return null;

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static KeyInfoType getKeyInfoType(String keyInfoType, Error error) {
case "X509Certificate":
return X509Certificate;
default:
error.setError("KI001", "Unrecognized KeyInfoType");
error.setError("KIT01", "Unrecognized KeyInfoType");
return NONE;
}

Expand All @@ -30,7 +30,7 @@ public static String valueOf(KeyInfoType keyInfoType, Error error) {
case X509Certificate:
return "X509Certificate";
default:
error.setError("KI002", "Unrecognized KeyInfoType");
error.setError("KIT02", "Unrecognized KeyInfoType");
return "";
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static MessageDigestAlgorithmWrapper getMessageDigestAlgorithmWrapper(Str
case "SHA512":
return MessageDigestAlgorithmWrapper.SHA512;
default:
error.setError("MD001", "Algorithm not found: " + messageDigestAlgorithmWrapper);
error.setError("MDA01", "Not recognized digest algorithm");
return null;
}
}
Expand All @@ -49,7 +49,7 @@ public static String valueOf(MessageDigestAlgorithmWrapper messageDigestAlgorith
case SHA512:
return "SHA512";
default:
error.setError("MD002", "Not recognized digest algorithm");
error.setError("MDA02", "Not recognized digest algorithm");
return null;
}
}
Expand All @@ -63,7 +63,7 @@ public static String getDigestMethod(MessageDigestAlgorithmWrapper messageDigest
case SHA512:
return MessageDigestAlgorithm.ALGO_ID_DIGEST_SHA512;
default:
error.setError("MD003", "Not recognized digest algorithm");
error.setError("MDA03", "Not recognized digest algorithm");
return null;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static String valueOf(SignatureElementType signatureElementType, Error er
case document:
return "document";
default:
error.setError("SE001", "Unrecognized SignatureElementType");
error.setError("SET01", "Unrecognized SignatureElementType");
return "";

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static TransformsWrapper getTransformsWrapper(String transformsWrapper, E
case "DETACHED":
return TransformsWrapper.DETACHED;
default:
error.setError("TW001", "Unrecognized transformation: " + transformsWrapper);
error.setError("TRW01", "Unrecognized transformation");
return null;
}
}
Expand All @@ -47,7 +47,7 @@ public static String valueOf(TransformsWrapper transformsWrapper, Error error) {
case DETACHED:
return "DETACHED";
default:
error.setError("TW002", "Unrecognized transformation");
error.setError("TRW02", "Unrecognized transformation");
return null;
}
}
Expand All @@ -61,7 +61,7 @@ public static String getSignatureTypeTransform(TransformsWrapper transformsWrapp
case DETACHED:
return "http://www.w3.org/2000/09/xmldsig#detached-signature";
default:
error.setError("TW003", "Unrecognized transformation");
error.setError("TRW03", "Unrecognized transformation");
return null;

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static XMLSignatureWrapper getXMLSignatureWrapper(String xMLSignatureWrap
case "ECDSA_SHA256":
return ECDSA_SHA256;
default:
error.setError("XS001", "Unrecognized algorithm: " + xMLSignatureWrapper);
error.setError("XSW01", "Unrecognized algorithm");
return null;
}
}
Expand All @@ -55,7 +55,7 @@ public static String valueOf(XMLSignatureWrapper xMLSignatureWrapper, Error erro
case ECDSA_SHA256:
return "ECDSA_SHA256";
default:
error.setError("XS002", "Unrecognized algorithm");
error.setError("XSW02", "Unrecognized algorithm");
return null;
}
}
Expand All @@ -73,7 +73,7 @@ public static String getSignatureMethodAlgorithm(XMLSignatureWrapper xMLSignatur
case ECDSA_SHA256:
return XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA256;
default:
error.setError("XS003", "Unrecognized algorithm");
error.setError("XSW03", "Unrecognized algorithm");
return null;
}
}
Expand Down