Re: [go-nuts] Executing JAR from Go

2024-04-17 Thread Shivli Srivastava
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

[go-nuts] Re: Executing JAR from Go

2024-04-15 Thread Shivli Srivastava
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

[go-nuts] Executing JAR from Go

2024-04-15 Thread Shivli Srivastava
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

[go-nuts] Re: CMSSignedData in Golang

2024-04-03 Thread Shivli Srivastava
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

[go-nuts] Re: CMSSignedData in Golang

2024-04-03 Thread Shivli Srivastava
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

[go-nuts] CMSSignedData in Golang

2024-04-02 Thread Shivli Srivastava
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

Re: [go-nuts] XML Canonicalization and signing

2024-02-17 Thread Shivli Srivastava
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 >

[go-nuts] XML Canonicalization and signing

2024-02-14 Thread 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