Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

Just faced it and no ideas how to solve it. I got a task to encode with RSA the file using .PEM file ( This file begins with BEGIN CERTIFICATE and ends with END CERTIFICATE). I tried alotta ways using openssl command, but got no positive result.

Note: I have no public/private keys...

I think I need, firstly, extract the public key from certificate. Then I should to encrypt my file using public key from this certificate, right ?

That's how I got public key from my .PEM certificate file:

openssl x509 -inform pem -in certificate.pem -noout -pubkey >pubkey.pem
share|improve this question
The certificate contains public key, that's enough for encryption. First you need to figure out what format you need the output in. It can be PKCS#7/CMS encryption (which is done with certificates) or it can be some custom scheme. – Eugene Mayevski 'EldoS Corp Jun 5 at 18:36

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.