Fixed chain certs verification. It wasn't working before without having the intermediate certs in the store. Now we are able to verify a cert chain provided by the peer.
Refactored the way the rspecs are being generated. Introduced a new option 'can_be_referred' which allows xml elements to be referred instead of duplicated.