gt; On Mon, Apr 15, 2024 at 4:02 AM Shivli Srivastava
> wrote:
> >>
> >> When I run the command on my terminal , everything works as fine but
> running it using exec.Command gives Error: Could not find or load main
> class org.Sign
> >> Caused by: java.lang
t;, jarPath, "org/Sign").
CombinedOutput()
boot.Logger(ctx).Infow("", map[string]interface{}{
"output": string(output),
})
//cmd.Env = os.Environ()
if err != nil {
return "", err
}
return string(output), nil
}
return "", cerror.InternalGatewayError.Ne
I created a jar where I want to run the main function of the Sign class .
*jar tf DigitalSign.jar*
META-INF/MANIFEST.MF
org/
org/Sign.class
META-INF/
bcmail-jdk15on-1.59.jar
xml-apis-1.4.01.jar
xercesImpl-2.12.2.jar
bcutil-jdk18on-1.77.jar
bcprov-jdk18on-1.77.jar
bcpkix-jdk15on-1.55.jar
If I have to call my java code from golang application , how can I
integrate it ?
On Wednesday, April 3, 2024 at 5:21:28 PM UTC+5:30 Shivli Srivastava wrote:
> I tried with pkcs7, but for the same canonical input the digest is
> matching but the signature format is not similar to t
ub.com/fullsailor/pkcs7?utm_source=godoc#SignedData
> (https://github.com/smallstep/pkcs7)
>
> For the XML canonicalization, you may try
> https://pkg.go.dev/github.com/lafriks/go-xmldsig/v2#Canonicalizer
>
>
>
> Shivli Srivastava a következőt írta (2024. április 2., kedd, 1
I have to replicate the Java code for signing xml in Go. The java code
uses org.bouncycastle.cms.CMSSignedData from BouncyCastle for signing and
org.apache.xml.serialize.XMLSerializer for Serializing the input xml .
The signing process should be exactly same as the signature otherwise would
er and
> verifier.
> For example, you can use http://www.w3.org/2001/10/xml-exc-c14n#
> canonicalization algorithm. Check
> https://github.com/russellhaering/goxmldsig/blob/main/canonicalize.go for
> details.
>
> On Wed, Feb 14, 2024 at 10:18 PM Shivli Srivastava
>
I have the task of generating the digital signature of an xml, enveloping
it in a PKCS7 packet and attaching it to the xml . I decided to
use https://pkg.go.dev/go.mozilla.org/pkcs7 , and was able to generate the
sign but it is not matching with the expected output . It seems to me that
xml