0

I have the following information:

Server Host: <a domain name>
Server Port: <a port number>
Username: <my username>
Password: <my password>

How I can create a .pem file from the above, so I can use it with OpenSSL and Boost ASIO to create a TLS TCP connection to the server?

The BOOST example I am using is this one: http://www.boost.org/doc/libs/1_55_0/doc/html/boost_asio/example/cpp03/ssl/client.cpp

jww
  • 97,681
  • 90
  • 411
  • 885
MATH000
  • 1,043
  • 3
  • 13
  • 24
  • Please share your research. What problems have you encountered while trying to solve this yourself? – Tanner Sansbury Jul 01 '16 at 21:10
  • @Tanner Sansbury Hey, thanks for the comment! There is a website offering access to some data and the only way to access them is by making a TLS TCP connection to their server. They don't have an API. So, I am trying to read data from that website using C++. My issue is that I really have no idea how cryptography works... – MATH000 Jul 01 '16 at 21:13
  • @Tanner Sansbury My problem is: how to generate the .pem file? – MATH000 Jul 01 '16 at 21:16
  • 1
    Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. Also see [Where do I post questions about Dev Ops?](http://meta.stackexchange.com/q/134306). – jww Jul 01 '16 at 22:10
  • You should research mutual authentication methods in TLS. Two that come to mind because of the password (shared secret) are TLS-PSK and TLS-SRP. Or, use client certificates so the password is not used during the exchange. The password is still used to protect the private key; its just not put on the wire or used in the exchange. Also see [Mutual authentication when client gives you their public certificate](http://stackoverflow.com/a/37044697/608639). – jww Jul 01 '16 at 22:13
  • @jww Thanks a lot for the help! How I can find the private and public key? Is the website supposed to provide them? – MATH000 Jul 01 '16 at 22:15

0 Answers0