S/MIME (Secure/Multipurpose Internet Mail Extensions) is a standard for public key encryption and signing of MIME data.
Questions tagged [smime]
291 questions
4
votes
1 answer
Openssl command line fails to verify detached smime signature created moments earlier
I'm using the command line interface of openssl 1.0.1b on OSX 10.6.
First I create a DSA key.
openssl dsaparam -noout -out privatekey.pem -genkey 1024
Next i create a self-signed certificate from that key.
openssl req -new -outform PEM -out…

Kaso
- 123
- 1
- 7
3
votes
1 answer
Save BIO into char* (from SMIME_write_CMS)
I want to save (pipe/copy) a BIO into a char array.
When I know the size it works, but otherwise not.
For example, I can store the content of my char* into a BIO using this
const unsigned char* data = ...
myBio = BIO_new_mem_buf((void*)data,…

Chris
- 3,057
- 5
- 37
- 63
3
votes
1 answer
Creating S/MIME from MIME?
I don't completely understand and some documentation or help would be appreciated greatly :)
Using PHP I create a MIME by using ezcomponents Mail object. But what I do not understand is:
Do you create an S/MIME message from a original MIME by…

Etienne Marais
- 1,660
- 1
- 22
- 40
3
votes
1 answer
How to send encrypted emails with SES
I'm trying to send emails to clients but securely as the contents will contain phone numbers and email addresses.
I want to use SES but I need to encrypt the contents of the email while it's in transit.
Apparently, S/MIME is an option. As per this…

Jonathan M
- 83
- 1
- 7
3
votes
1 answer
Python - extract certificate from p7s file
Decoding an incoming email in Python, I have an attachment "smime.p7s".
If I write this to a file, then it can be extracted and viewed using
openssl pkcs7 -inform der -print_certs

tuck1s
- 1,002
- 9
- 28
3
votes
1 answer
Unable to decrypt p7m using MimeKit
I have located my smime.p7m from my email message, I read it as stream and try to decrypt it using MimeKit, but it failed with Operation is not valid due to the current state of the object.
using (MemoryStream ms = new MemoryStream(data)) {
…

codenamezero
- 2,724
- 29
- 64
3
votes
1 answer
Python using M2Crypto signing a message with S/MIME
I spent hours now and I can not find my error. I want a simple routine that creates a S/MIME signed message that could be used with smtplib later.
This is, what I have so far:
#!/usr/bin/python2.7
# -*- coding: utf-8 -*-
from __future__ import…

Christian Rößner
- 447
- 1
- 5
- 18
3
votes
2 answers
Can't find class org.bouncycastle.cms.CMSSignedData
I have to load and verify pkcs7 file in java. I found many tutorials that talk about CMSSignedData but I can't find the package org.bouncycastle.cms.*, there is just org.bouncycastle.asn1.cms.* and it doesn't contain the class CMSSignedData.
I…

Hakim
- 434
- 7
- 21
3
votes
0 answers
Node.js equivalent to OpenSSL -sign operation
I'm trying to replicate the following operation in Node.js without spawning the OpenSSL command, bc that would require me to write files to disk. I already have the private key, the certificate and the file to be signed in memory, and I'm looking to…

Gaston Elhordoy
- 181
- 2
- 2
3
votes
3 answers
Trying to decrypt S/MIME file using Openssl
I am openssl Newibe.
I am trying to write a python script (calling openssl) to decrypt multiple p12 encrypted eml files but failing.
I can open them up in Thunderbird fine.
here is what i tried:
openssl pkcs12 -in keys/pkitepki.p12 -clcerts -nokeys…

Phyo Arkar Lwin
- 6,673
- 12
- 41
- 55
3
votes
1 answer
Tika detect multipart/signed
I'm using Tika to auto detect content type of documents being pushed into a DMS. Almost everything works just fine except for emails.
I have to discriminate between standard mail messages (mime => message/rfc822) and signed mail messages (mime =>…

Nicola
- 2,876
- 2
- 18
- 26
3
votes
1 answer
Multiple signatures in S/MIME
Is it possible to sign a MIME email (RFC 2822) multiple times using S/MIME, so that all signatures are verifiable and retrievable?

m0sa
- 10,712
- 4
- 44
- 91
3
votes
1 answer
able to decrypt smime with openssl, but not with python and M2crypto
I have to create a searchable archive of old emails, many of which are encrypted using S/MIME.
I can decrypt the .eml files using openssl. This works:
openssl smime -decrypt -in mails/example.eml -inkey certs/example.pem
However, when I try to do…

user3924220
- 31
- 3
3
votes
1 answer
Create S/MIME certificates
I am trying to generate S/MIME certificate using the solution provided here:
https://serverfault.com/questions/103263/can-i-create-my-own-s-mime-certificate-for-email-encryption
Solution:
openssl genrsa -des3 -out smime.key 4096
openssl req -new…

gauravhalbe
- 392
- 2
- 8
- 19
3
votes
1 answer
C#, Unable to import .p7b certificate to windows store
I'm trying to import certificate (smime) with extension .p7b to windows store.
This is the current code
X509Certificate2 cert = new X509Certificate2(@"C:\test_public_cert.p7b");
X509Store store = new X509Store(StoreName.AddressBook,…

tong
- 259
- 5
- 23