Hi all,
I would like to use opkg through a HTTPS connection. I added --enable-ssl-curl and I added some options in the opkg.conf :
src/gz snapshots https://monip.local/snapshot
dest root /
dest ram /tmp
lists_dir ext /var/lib/opkg/
arch all 100
arch armv7 200
option ssl_ca_path /etc/ssl/certs
option ssl_key_type ENG
Is there any documentation on the subject BTW ?
Camille Moncelier
+33 (0)6 33 37 88 82 / cam...@moncelier.fr
Hi all,
I would like to use opkg through a HTTPS connection. I added --enable-ssl-curl and I added some options in the opkg.conf :
src/gz snapshots https://monip.local/snapshot
dest root /
dest ram /tmp
lists_dir ext /var/lib/opkg/
arch all 100
arch armv7 200
option ssl_ca_path /etc/ssl/certsoption ssl_key_type ENGAre you sure about this line ? This is intended to be used with a pkcs11 engine (Usually a smartcard or a token)If you're not using a smartcard then you opkg.conf file should *look* like this:option ssl_ca_path/etc/ssl/certsoption ssl_cert/etc/opkg/monclient.crtoption ssl_cert_type PEMoption ssl_key/etc/opkg/monclient.keyoption ssl_key_type PEM
With a smartcard you can try something like this:option ssl_ca_path/etc/ssl/certs
option ssl_cert slot_0option ssl_cert_type ENGoption ssl_engine pkcs11option ssl_key slot_0option ssl_key_type ENGAssuming you are using a pkcs11 token with the correct openssl engine configured in openssl.cnf.Is there any documentation on the subject BTW ?
Not really, these options are directly fed to libcurl, you could try libcurl documentation: http://curl.haxx.se/libcurl/c/curl_easy_setopt.html under the section "SSL and SECURITY OPTIONS"
Thanks for this very fast answer :).
I am not using a smartcard, and I did modify my opkg.conf this way in order to make it work :
option ssl_ca_file/etc/ssl/certs/ca.crt
option ssl_key /etc/ssl/certs/monclient.key
option ssl_cert /etc/ssl/certs/monclient.crt
option ssl_dont_verify_peer
The last line is mandatory because if I don't have it, I get a "SSL peer certificate or SSH remote key was not OK." message.
2013/10/1 Jean-Michel Hautbois <jhau...@gmail.com>
The last line is mandatory because if I don't have it, I get a "SSL peer certificate or SSH remote key was not OK." message.I am not using a smartcard, and I did modify my opkg.conf this way in order to make it work :Hi Camille,Thanks for this very fast answer :).
option ssl_ca_file/etc/ssl/certs/ca.crt
option ssl_key /etc/ssl/certs/monclient.key
option ssl_cert /etc/ssl/certs/monclient.crt
option ssl_dont_verify_peerDo you have the full linked list of certificates until the root CA in/etc/ssl/certs/ca.crt ?If you can (re)compile opkg you can try to add: curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); in opkg_curl_init inside opkg_download.c to see where it fails (just an idea)
I only have the root CA in the file ca.crt.When you say the full linked list, what do you mean ? server.crt+ca.crt ?
If you can (re)compile opkg you can try to add: curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); in opkg_curl_init inside opkg_download.c to see where it fails (just an idea)I will do that ASAP. Do you have a good pointer to a tutorial on how to create a SSL server certificate, how to create a SSL client certificate and the CA which will make it work ? I am using easy-rsa (from openvpn project) and its pkitool but maybe do I miss something... ?
JM--
You received this message because you are subscribed to the Google Groups "opkg-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opkg-devel+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
2013/10/1 Jean-Michel Hautbois <jhau...@gmail.com>
I only have the root CA in the file ca.crt.When you say the full linked list, what do you mean ? server.crt+ca.crt ?If server.crt is signed only by the CA it should be OK. It was just in case you had intermediate CA.
If you can (re)compile opkg you can try to add: curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); in opkg_curl_init inside opkg_download.c to see where it fails (just an idea)I will do that ASAP. Do you have a good pointer to a tutorial on how to create a SSL server certificate, how to create a SSL client certificate and the CA which will make it work ? I am using easy-rsa (from openvpn project) and its pkitool but maybe do I miss something... ?easy-rsa should do the trick. Just make sure you specified the correct servername (hostname) when you generated the server certificate.
If the server is accepting the client certificate, you are on the right tracks.You can also use curl (the command line tool) to see if you're files are ok and curl is accepting the server's certificate.