Giter Site home page Giter Site logo

qwyng / openssl_provider Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 15 KB

This Gem provides OpenSSL::Provider class with APIs to load providers

Home Page: https://rubygems.org/gems/openssl_provider

License: MIT License

Ruby 46.40% C 53.60%
gem ruby openssl

openssl_provider's Introduction

NOTICE

The functionality of this Gem has been merged into ruby/openssl
For further information, please visit ruby/openssl#635.

OpenSSL::Provider

The concept of provider was introduced with OpenSSL 3. https://www.openssl.org/docs/man3.0/man7/migration_guide.html

With OpenSSL 3, it is possible to specify the provider to be used by any application, either programmatically or through a configuration file. However, ruby/openssl 3.1.0 does not have an API to load providers without configuration file. This Gem provides OpenSSL::Provider class with APIs to load providers.

Installation

Install the gem and add to the application's Gemfile by executing:

$ bundle add openssl_provider

If bundler is not being used to manage dependencies, install the gem by executing:

$ gem install openssl_provider

Usage

require 'openssl_provider'

legacy = OpenSSL::Provider.load("legacy")

OpenSSL::Provider.providers
# => [#<OpenSSL::Provider name="default">, #<OpenSSL::Provider name="legacy">]

# default provider does not support RC4
# OpenSSL::Cipher.new("RC4")
# => OpenSSL::Cipher::CipherError: unsupported
cipher = OpenSSL::Cipher.new("RC4")

# do something with cipher...

OpenSSL::Provider.unload(legacy)

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/QWYNG/openssl_provider. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the OpensslProvider project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

openssl_provider's People

Contributors

qwyng avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.