Forums Register Login

digital sign java mail

+Pie Number of slices to send: Send
I have a certificate that i want to sign emails with.

I think i managed to load the certificate, but I dont know where to go on from here.

can someone please point me in the right direction either with a solution or some good reading.

Thanks.
+Pie Number of slices to send: Send
Try BouncyCastle libraries, they have good examples that work. I can send sample code if you still need it
+Pie Number of slices to send: Send
Yes that is what i did.. forgot that i had made this question, but now when your here perhaps you can take a look at my code and check if im doing it the best way. It is working but perhaps i misunderstood something... like the part where i get the alias... im not verry experienced with this



[ March 14, 2007: Message edited by: simon valter ]
+Pie Number of slices to send: Send
What you did seems to be correct. Except for the way you are looking for the alias. When I was searching the web I've managed to find something more satisfying:



But a question to you, maybe you've ran into this. Do you know if its possible to encrypt email w/ .cer instead of .pfx? I got that working, but users on the receiving end seem to be having troubles decoding it. So I'm wondering if its at all possible.
+Pie Number of slices to send: Send
Thanks for the help on the alias.
I'm sorry to say I havent played with encryption yet, so I can't help you with that.
+Pie Number of slices to send: Send
I am trying to digitally sign emails using the code which you have provided but it is not working for me. I am getting an error "the type jakarta.mail.internet.mimemultipart cannot be resolved". What i am missing here? is any jar missing or imports?
+Pie Number of slices to send: Send
The post you were looking at is 19 years old - things have changed since then.

The javax name space is now jakarta so instead of importing javax.mail.internet.MimeMultipart, it would be
jakarta.mail.internet.MimeMultipart (which it sounds like you have done).

You are trying to import jakarta.mail.internet.MimeMultipart (with uppercase M), not jakarta.mail.internet.mimemultipart (with lowercase m) like you put in your post, right?
+Pie Number of slices to send: Send




The above code is not working for me. Is there a way to to send digitally signed message?
I am able to send simple mails but those are not digitally signed. Getting many error in the above piece of code. X509Certificate is deprecated.
My favorite is a chocolate cupcake with white frosting and tiny ad sprinkles.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 3685 times.
Similar Threads
Question about security certificates
What is the purpose of certificate chaining?
How to sign a certificate?
Creating CA using keytool
Using Bouncy Castle - Generate a Certificate and Sign that by CA Root Certificate
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 10:29:21.