Downloading SSL certificates is usually done using the OpenSSL libraries. So install these libraries and add the path and library names to the
LIBS
variable in your Qt project file.
You need than to create a socket, connect to the server, and call the required OpenSSL library functions. With Qt, you can use the
QTcpSocket[
^] class and use the member function
socketDescriptor[
^] to get the descriptor to be passed to the SSL functions. See
http://www.zedwood.com/article/cpp-libssl-get-peer-certificate[
^] on how to fetch the certificate.
How the certificate can be stored in your USB token programmatically should be documented by the manufacturer of the token.