I have an application (which I'm testing), in which I create some services. These services are accessible via libraries i.e java and python apis. In order to authenticate the api calls, the application does gives me pkcs file.

I want to change the expiration date of the pkcs file, only for testing purposes.

I followed the steps that are defined over here, and found my certificate expiration date is Dec 2014, I just want to change that to say Jan 13 and see how my application behaves.

How should I do this in openssl?

Thanks in advance

  • I guess you can also do this the other way, and change your system date.
    – domen
    Nov 17 '14 at 11:28

The expirationDate is part of your (signed) certificate, thus if you change it you invalidate the certificate. The proper way to test this case is to issue another certificate with the desired expirationDate from the CA that issued your certificate.

Alternatively (if you have the code to the application) just skip over the signature verification. Please do tell which crypto library your app uses ofr further information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.