• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Devaka Cooray
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
Bartenders:

PKCS7 Digital Signature

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello

New to Java here coming from .NET
Trying to implement PKCS7 signing using Java similar to a previous .NET implementation.
Problem is am not able to get the same output.
Same keystore converted from P12 to JKS.

.NET Code


Java Code


Please advise on what I might be doing wrong. I picked up this method online and am open to alternatives if someone has an easier method to implement this.

Thanks
 
Bartender
Posts: 15743
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can't you use an established crypto library such as those made by Bouncy Castle? Their CMS library supports PKCS#7: https://www.bouncycastle.org/docs/pkixdocs1.5on/index.html?org/bouncycastle/cms/package-summary.html
 
Wael Reslan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
so it is not supported out of the box with JDK ? I need to use some external library ?
 
Marshal
Posts: 81617
593
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Too difficult a question for this forum. Let's try the security forum.
 
Nothing? Or something? Like this tiny ad:
The new gardening playing cards kickstarter is now live!
https://www.kickstarter.com/projects/paulwheaton/garden-cards
reply
    Bookmark Topic Watch Topic
  • New Topic