Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Libriciel
Signature
libersign
Commits
5f82e1db
Commit
5f82e1db
authored
Jan 22, 2020
by
Lukas Hameury
Browse files
Problème de multiple signature au format xades détaché
parent
967d3120
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
5f82e1db
...
...
@@ -5,6 +5,11 @@ Tous les changements notables sur ce projet seront documentés dans ce fichier.
Ce format est basé sur [Keep a Changelog](http://keepachangelog.com/)
et ce projet adhère au [Semantic Versioning](http://semver.org/).
## [1.9.10] - 2020-01-22
## Corrections
- Problème de multiple signature au format xades détaché
## [1.9.9] - 2020-01-20
### Modifications
...
...
SplittedSignatureApplet/SplittedSignatureApplet/src/org/adullact/parapheur/applets/splittedsign/SignUtil.java
View file @
5f82e1db
...
...
@@ -282,8 +282,27 @@ public class SignUtil {
// signatureBytes = XADESSignUtil.sign(signingCertificate, privKey, hexDecode(digests.get(iddoc)));
XADESSignUtil
signeur
=
new
XADESSignUtil
(
digests
.
get
(
iddoc
).
pesIds
);
signatureBytes
=
signeur
.
signXAdES132
(
signingCertificate
,
privKey
,
hexDecode
(
digests
.
get
(
iddoc
).
digests
));
signedHashMap
.
put
(
iddoc
,
new
String
(
Base64Coder
.
encode
(
signatureBytes
)));
if
(
digests
.
get
(
iddoc
).
digests
.
contains
(
","
))
{
// the result will be serialized in this:
StringBuilder
sigStringBuilder
=
new
StringBuilder
();
String
[]
hashesTab
=
digests
.
get
(
iddoc
).
digests
.
split
(
","
);
boolean
first
=
true
;
for
(
String
hashesTab1
:
hashesTab
)
{
if
(
first
)
{
first
=
false
;
}
else
{
sigStringBuilder
.
append
(
","
);
}
signatureBytes
=
signeur
.
signXAdES132
(
signingCertificate
,
privKey
,
hexDecode
(
hashesTab1
));
// After, gather the signatures!
sigStringBuilder
.
append
(
new
String
(
Base64Coder
.
encode
(
signatureBytes
)));
}
signedHashMap
.
put
(
iddoc
,
sigStringBuilder
.
toString
());
}
else
{
signatureBytes
=
signeur
.
signXAdES132
(
signingCertificate
,
privKey
,
hexDecode
(
digests
.
get
(
iddoc
).
digests
));
signedHashMap
.
put
(
iddoc
,
new
String
(
Base64Coder
.
encode
(
signatureBytes
)));
}
}
else
if
(
"XADES132"
.
equalsIgnoreCase
(
formatSigString
))
{
XADESSignUtil
signeur
=
new
XADESSignUtil
(
digests
.
get
(
iddoc
).
pesIds
,
digests
.
get
(
iddoc
).
pespolicyid
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment