Enter PEM pass phrase just once

I have a loop that that run every 30 sec, connects to a SSL server (reactor.connectSSL()), send a message (self.transport.write(msg)) and then disconnect (self.transport.loseConnection()).

The issue is that it asks "Enter PEM pass phrase" each time the loop try to connect. Is it possible to enter it just once?

Answers


As suggested by Mikael, you can remove the pass phrase from the Key. Do note that this presents a serious security risk.

To remove the pass phrase from the Key, perform the following steps. Say you have a file called foo.pem with the following contents:

-----BEGIN ENCRYPTED PRIVATE KEY-----
...
-----END ENCRYPTED PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----

Execute the following command:

openssl rsa -in foo.pem -out foo_unencrypted.pem

You will be prompted for the pass phrase, and in return receive a file foo_unencrypted.pem that contains the following:

-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----

This file is missing the BEGIN CERTIFICATE ---- END CERTIFICATE section from above, so copy-paste it from foo.pem to the end of foo_unencrypted.pem:

-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----

If you use the file foo_unencrypted.pem, you will now no longer be prompted to "Enter PEM pass phrase".


Need Your Help

Auto Layout Constraints Issue in UITableView

ios uitableview autolayout ios-autolayout

With the help of Auto Layout I had implemented the views programmatically to handle the different design layouts for iPhone 4, 5 and 6. The program works good in all the views except UITableView. I...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.