PROTON-781: Added SSLConfig to the Ruby reactive APIs.
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/e21dec95 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/e21dec95 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/e21dec95 Branch: refs/heads/PROTON-781-ruby-reactor-apis Commit: e21dec955a4637c33de618a23b58d2b8428b7928 Parents: 07ddaaf Author: Darryl L. Pierce <mcpie...@gmail.com> Authored: Thu Feb 26 11:28:04 2015 -0500 Committer: Darryl L. Pierce <mcpie...@gmail.com> Committed: Thu Jun 18 09:27:20 2015 -0400 ---------------------------------------------------------------------- proton-c/bindings/ruby/lib/qpid_proton.rb | 1 + .../bindings/ruby/lib/reactor/ssl_config.rb | 41 ++++++++++++++++++++ 2 files changed, 42 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e21dec95/proton-c/bindings/ruby/lib/qpid_proton.rb ---------------------------------------------------------------------- diff --git a/proton-c/bindings/ruby/lib/qpid_proton.rb b/proton-c/bindings/ruby/lib/qpid_proton.rb index f8703e7..d8783bc 100644 --- a/proton-c/bindings/ruby/lib/qpid_proton.rb +++ b/proton-c/bindings/ruby/lib/qpid_proton.rb @@ -96,6 +96,7 @@ require "handler/messaging_handler" require "reactor/task" require "reactor/acceptor" require "reactor/reactor" +require "reactor/ssl_config" module Qpid::Proton # @private http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e21dec95/proton-c/bindings/ruby/lib/reactor/ssl_config.rb ---------------------------------------------------------------------- diff --git a/proton-c/bindings/ruby/lib/reactor/ssl_config.rb b/proton-c/bindings/ruby/lib/reactor/ssl_config.rb new file mode 100644 index 0000000..56fec71 --- /dev/null +++ b/proton-c/bindings/ruby/lib/reactor/ssl_config.rb @@ -0,0 +1,41 @@ +#-- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +#++ + +module Qpid::Proton::Reactor + + class SSLConfig + + def initialize + @client = Qpid::Proton::SSLDomain.new(Qpid::Proton::SSLDomain::MODE_CLIENT) + @server = Qpid::Proton::SSLDomain.new(Qpid::Proton::SSLDomain::MODE_SERVER) + end + + def set_credentials(cert_file, key_file, password) + @client.set_credentials(cert_file, key_file, password) + @server.set_credentials(cert_file, key_file, password) + end + + def set_trusted_ca_db(certificate_db) + @client.set_trusted_ca_db(certificate_db) + @server.set_trusted_ca_db(certificate_db) + end + + end + +end --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org