Sus::Fixtures::OpenSSL
Provides a convenient fixture for setting up client and server SSL sockets.
Installation
$ bundle add sus-fixtures-openssl
Usage
include Sus::Fixtures::OpenSSL::HostCertificatesContext
it 'can create a secure connection' do
# Use `server_context` to create a server socket:
server_socket = OpenSSL::SSL::SSLSocket.new(socket, server_context)
# Use `client_context` to create a client socket:
client_socket = OpenSSL::SSL::SSLSocket.new(socket, client_context)
end
Contributing
We welcome contributions to this project.
- Fork it.
- Create your feature branch (
git checkout -b my-new-feature
). - Commit your changes (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin my-new-feature
). - Create new Pull Request.
Developer Certificate of Origin
This project uses the Developer Certificate of Origin. All contributors to this project must agree to this document to have their contributions accepted.
Contributor Covenant
This project is governed by Contributor Covenant. All contributors and participants agree to abide by its terms.