Re: PKCS#7

2003-03-26 Thread marek cervenka
> > > > i have a single file in PKCS#7 format
> > > > can i decrypt this file with openssl?
> > > > 
> > > > i try this
> > > > [EMAIL PROTECTED] cp]# openssl smime -decrypt -inform der -in pkcs7.enc -recip 
> > > > test.pem -inkey key.pem
> > > > Enter PEM pass phrase:
> > > > Error decrypting PKCS#7 structure
> > > > 3428:error:21070073:PKCS7 routines:PKCS7_dataDecode:no recipient matches 
> > > > certificate:pk7_doit.c:371:
> > > > 3428:error:21072077:PKCS7 routines:PKCS7_decrypt:decrypt error:pk7_smime.c:405:
> > > > 
> > > 
> > > You can if pass it a private key and certificate corresponding to one of
> > > the recipients of the message.
> > 
> > but this file is not email (i'm not creator of this file :( )
> > 
> > this file have PKCS structure (certificate + encrypted data)
> > can i decrypt this file without conversion to s/mime message?
> > 
> 
> Well even if it isn't email the original file will have been encrypted using a
> certificate's public key and the details of the certificate placed in the
> structure: specifically its issuer name and serial number. There may be more
> than one certificate used to allow multiple keys to decrypt the file.
> 
> So you need at least one key and certificate pair to decrypt it.

that is clear

i have one key and certificate (file is signed and encrypted for my pair)

but how can i do this?
any known software?

-- 
-
Marek Cervenka
Centrum Vypocetni Techniky
CVT - http://cvt.fpf.slu.cz
FPF SLU OPAVA - http://www.fpf.slu.cz
=



__
OpenSSL Project http://www.openssl.org
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]


Re: PKCS#7

2003-03-26 Thread marek cervenka
> > i have a single file in PKCS#7 format
> > can i decrypt this file with openssl?
> > 
> > i try this
> > [EMAIL PROTECTED] cp]# openssl smime -decrypt -inform der -in pkcs7.enc -recip 
> > test.pem -inkey key.pem
> > Enter PEM pass phrase:
> > Error decrypting PKCS#7 structure
> > 3428:error:21070073:PKCS7 routines:PKCS7_dataDecode:no recipient matches 
> > certificate:pk7_doit.c:371:
> > 3428:error:21072077:PKCS7 routines:PKCS7_decrypt:decrypt error:pk7_smime.c:405:
> > 
> 
> You can if pass it a private key and certificate corresponding to one of
> the recipients of the message.

but this file is not email (i'm not creator of this file :( )

this file have PKCS structure (certificate + encrypted data)
can i decrypt this file without conversion to s/mime message?

-BEGIN PKCS7-
MIAGCSqGSIb3DQEHA6CAMIIHRgIBADGCAlMwggElAgEAMIGPMIGGMQswCQYDVQQG
EwJDWjENMAsGA1UEChMEdGVzdDENMAsGA1UECxMEdGVzdDENMAsGA1UEBxMEdGVz
dDENMAsGA1UECBMEdGVzdDEPMA0GA1UEAxMGQ1JUIENQMRUwEwYJKoZIhvcNAQkB
FgZhQGIuY3oxEzARBgNVBBQTCjEyMzQ1Njc4OTACBD6BVHEwCwYJKoZIhvcNAQEB
---cut---
sSardZvWuTsqZfRhoa/bbAuB0giggMfDo03POJLg7CpcqcMZqBJ9i96sI/R2EJMd
cf71IyxKbpVLe0QUVjgUmH40SrEWWAVObaRtxjTysPM4KBOPA7oEyZkej1DwFFRk
Eqcgi4A6YZGPzX4ll18yMojyk+zKj+l1wwitd/sgDFWnbI1as5IrOq/BXl/zevTb
6/w6RHpK36cCAA==
-END PKCS7-


-- 
-
Marek Cervenka
Centrum Vypocetni Techniky
CVT - http://cvt.fpf.slu.cz
FPF SLU OPAVA - http://www.fpf.slu.cz
=


__
OpenSSL Project http://www.openssl.org
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]


PKCS#7

2003-03-26 Thread marek cervenka
hi,

i have a single file in PKCS#7 format
can i decrypt this file with openssl?

i try this
[EMAIL PROTECTED] cp]# openssl smime -decrypt -inform der -in pkcs7.enc -recip 
test.pem -inkey key.pem
Enter PEM pass phrase:
Error decrypting PKCS#7 structure
3428:error:21070073:PKCS7 routines:PKCS7_dataDecode:no recipient matches 
certificate:pk7_doit.c:371:
3428:error:21072077:PKCS7 routines:PKCS7_decrypt:decrypt error:pk7_smime.c:405:

thanks

-- 
-
Marek Cervenka
Centrum Vypocetni Techniky
CVT - http://cvt.fpf.slu.cz
FPF SLU OPAVA - http://www.fpf.slu.cz
=


__
OpenSSL Project http://www.openssl.org
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]