- 10 Aug, 2011 3 commits
-
-
Lucas Carvalho authored
-
Lucas Carvalho authored
-
Lucas Carvalho authored
It must be able to return the default port for a given protocol. (i.e. http - 80, https - 443)
-
- 09 Aug, 2011 1 commit
-
-
Łukasz Nowak authored
-
- 03 Aug, 2011 2 commits
-
-
Łukasz Nowak authored
-
Łukasz Nowak authored
-
- 01 Aug, 2011 10 commits
-
-
Lucas Carvalho authored
We must be sure that people won't change this code, because we need to care about backward compatibilty.
-
Lucas Carvalho authored
MARKER is not required, it just polutes the code. And should not prevent a bad usage of the library.
-
Łukasz Nowak authored
There is no time yet for such changes in libnetworkcache.
-
Lucas Carvalho authored
Sorry, it should not be commited in the previous commit.
-
Lucas Carvalho authored
-
Lucas Carvalho authored
In this case, super does not beahvior as expected, so it is better to call the init method directly.
-
Lucas Carvalho authored
-
Lucas Carvalho authored
-
Lucas Carvalho authored
Actually, the NetworkcacheClient must be able to fetch the certificate files under a HTTPS server. So, these classes and methods are going to be used to setup the environment to test this feature.
-
Lucas Carvalho authored
Once the tests are growing up, I decided to organize it in a clean way. test_libnetworkcache - tests to NetworkcacheClient class test_signature - tests to signature script libnetworkcachemixin - an util module with all the code which is required to setup the test environment NOTE: THERE IS NO CODE CHANGE.
-
- 29 Jul, 2011 5 commits
-
-
Lucas Carvalho authored
This test must prove that when the signature_certificate_file_list has a path to the file system and urls, the file system path has high priority over the urls.
-
Lucas Carvalho authored
To download contents in a correct way, it must use the libnetworkcache.
-
Lucas Carvalho authored
This file must provide all the utils function, to avoid duplicating code.
-
Lucas Carvalho authored
This file must provide all the utils function, to avoid duplicating code.
-
Lucas Carvalho authored
This library aims to handle all the possibles way to do a GET to an http server. So, it must contains all the code related to HTTP calls to avoid to polute the NetworkcacheClient class with this kind of code. The NetworkcacheClient should use this library to download any kind of file which is necessary. Using this library NetworkcacheClient must be able to: - download a file under HTTP without authentication - download a file under HTTP with basic authentication - download a file under HTTPS CA (Certificate Authority) - download a file under HTTPS CA with basic authentication - download a file under HTTPS with Certification Authentication So currently, this library only provides a way to: - download a file under HTTPS CA (Certificate Authority) - download a file under HTTPS CA with basic authentication (work in progress)
-
- 27 Jul, 2011 1 commit
-
-
Łukasz Nowak authored
-
- 22 Jul, 2011 2 commits
-
-
Lucas Carvalho authored
-
Lucas Carvalho authored
-
- 21 Jul, 2011 9 commits
-
-
Lucas Carvalho authored
Well, _MARKER is used to backward compatibility and to raise an error which if the networkcache server is not consistenty. Without _MARKER there is not way to make these conditions.
-
Lucas Carvalho authored
A simple object of NetworkcacheClient class is already instantiated by setUp method.
-
Lucas Carvalho authored
Following the previous commit, _MARKER is not required anymore.
-
Lucas Carvalho authored
Well, before this change the signature_certificate_file_list worked only with filesystem paths. - i.e ['/home/user/public.pem'] Now it is possible to define urls as well. - i.e ['http://example.com/public.pem'] The url content will be downloaded to a temporary file before the verification and automatically removed after. The filesystem paths has higher priority than url, it is checked first. If it does not find any valid certificate, then it will try to download the certificates from the url provided.
-
Lucas Carvalho authored
This is the first version has only basic tests. The new test class aims to test the behavior of NetworkcacheClient class. And it is forbidden to change any behavior of NetworkcacheClient without writting/editing the tests. NOTE: still WIP...
-
Lucas Carvalho authored
Now the mixin class is able to create the files which are required to add the signature, it will be usefull for TestNetworkcacheClient.
-
Lucas Carvalho authored
Well, the LibNetworkCacheMixin has been created to avoid any kind of code duplication inside of this test suite. This mixin class is gonna be used by TestNetworkCacheClient. Some variables have been renamed for a better understanding, but the behavior of the code still the same.
-
Lucas Carvalho authored
-
Sebastien Robin authored
It is not recommanded to use httplib directly, we should better use urllib2, then this library will use httplib. This solve issues with libnetworkcache when we try to use it behind an http proxy.
-
- 20 Jul, 2011 3 commits
-
-
Lucas Carvalho authored
Actually, the user can configure the buildout.cfg and set multiples certificates files. It means that libnetworkcache must be able to check if the signature which comes from shadir is trustable or not, based on these certificates. A given signature can not appear twice in the same directory-key, if it happens a DiretoryNotFound error must be raised.
-
Lucas Carvalho authored
-
Lucas Carvalho authored
Renamed signature_public_file to signature_certificate_file, because the name is cleaner once the content of the file is a X509 certificate file. It is also known as Public Key Certificate. Renamed signature_private_file to signature_private_key_file, because the is is cleaner once the content of the file is a private RSA key.
-
- 19 Jul, 2011 2 commits
-
-
Lucas Carvalho authored
Actually, the slapos.libnetworkcache has new dependeincies because M2Cryto is required to handle the signatures inside NetworkcacheClient class and the argparse is required by signature.py script.
-
Lucas Carvalho authored
Now it is possible to create the signature files easily using the command generate-signature-key with the correct arguments. The command generate-signature-key works without any argument as well. To check the arguments you must run with the parameter --help/-h. It'll generate two file, one is a private key and the other is a X509 certificate file. Those files must be used by networkcache to play with signature. The private key is required to sign the message before uploading it to shadir. And the certification file is required to verify the signature.
-
- 18 Jul, 2011 2 commits
-
-
Lucas Carvalho authored
M2Crypto is required to create the signature string and verify if it is valid or not.
-
Lucas Carvalho authored
The signature private file is not required to verify the signature it is only used to create the signature string. The signature verification requires only the public file...
-