Hi everyone,
i've launched a new project in my company which aim is to send data
via a secure channel to a partner using AS2 protocol. We choose for
test purpose the H2O solution for its open source aspects.
Our partner is using the closed source SEEBURGER AS2 solution.
We are the sender, our partner the receiver. We only catch MDN. The
data must be sent compressed, signed and encrypted.
i searched this list for informations while installing and configuring
my platform.
This thread was useful for adding a new key in the keystore and
modifiing the validity :
http://groups.google.com/group/cecid-hermes2/browse_frm/thread/8f85c948cb00cc3
i added BC jar (from
http://www.bouncycastle.org/fr/download/bcprov-jdk15-138.jar)
in my jre/lib/ext directory
i was able to send with the loopback test a compressed-signed-
encrypted message, using the autosigned certificate exported from my
as2.p12 keystore (i added it to both outbound and inbound parameters
for the two partnerships)
But, when i try to send the message to my partner (with a correct
partnership configured), he isn't able to decrypt the message. We
tried using for encryption a Verisign Certificate owned by our
partner, and he is then able to decrypt the message.... but not to
verify its signature.
If i try to create a new key with:
keytool -genkey -alias test -validity 3650 -keypass test -keystore
as2.p12 -storetype pkcs12 -storepass password -providerClass
org.bouncycastle.jce.provider.BouncyCastleProvider -
sigalg="SHA1withDSA",
i get this error when restarting :
Caused by: java.io.IOException: exception unwrapping private key -
java.security.InvalidKeyException: pad block corrupted
at
org.bouncycastle.jce.provider.JDKPKCS12KeyStore.unwrapKey(Unknown
Source)
at
org.bouncycastle.jce.provider.JDKPKCS12KeyStore.engineLoad(Unknown
Source)
at java.security.KeyStore.load(KeyStore.java:1150)
at
hk.hku.cecid.piazza.commons.security.KeyStoreComponent.load(KeyStoreComponent.java:
169)
So could someone explain me what's wrong in my configuration ?
What is used for signing process ?
Where is stored the certificate configured in partnership ?
How can i create a fresh new keystore ? When trying to create a new
one, i get the same errors as when trying to generate a new key with
sigalg parameter.
i'm quite confused
Thanks.