Boost logo

Boost Users :

Subject: [Boost-users] BOOST::ASIO load key.pem with passphrase
From: Alvaro Leiva (alvaroflmiranda_at_[hidden])
Date: 2012-12-20 22:29:46


Currently I'm working with this:

...
    ctx.use_certificate_chain_file("./C/cert.pem");
    ctx.use_private_key_file("./C/key.pem", boost::asio::ssl::context::pem);
    ctx.load_verify_file("./C/ca.pem");...

So far everything works perfect, but what I really need to do is load the
same key.pem but with a passphrase, Looking at asio docs found
ssl::context::set_password_callback<http://www.boost.org/doc/libs/1_52_0/doc/html/boost_asio/reference/ssl__context/set_password_callback.html>
wich
according to the info calls
SSL_CTX_set_default_passwd_cb<http://www.openssl.org/docs/ssl/SSL_CTX_set_default_passwd_cb.html>
and
allows to handle encrypted PEM files, please remember that I'm much more
familiarized with high level languages like python, so c++ is not my forte

any help is appreciated, Thank you !

-- 
Alvaro Leiva


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net