Sha256: b3e7ec117c18ac421235ff64947ca460331d6cec65553c4c1e69f4699f914fe9

Contents?: true

Size: 805 Bytes

Versions: 51

Compression:

Stored size: 805 Bytes

Contents

# Copyright (c) 2012 National ICT Australia Limited (NICTA).
# This software may be used and distributed solely under the terms of the MIT license (License).
# You should find a copy of the License in LICENSE.TXT or at http://opensource.org/licenses/MIT.
# By downloading or using this software you accept the terms and the liability disclaimer in the License.

require 'test_helper'

describe OmfCommon::Auth::SSHPubKeyConvert do
  it "must import ssh pub key format to ruby rsa instance" do
    private_folder = "#{File.dirname(__FILE__)}/../../fixture"

    pub_key = OpenSSL::PKey::RSA.new(File.read("#{private_folder}/omf_test.pub.pem"))

    ssh_pub_key = File.read("#{private_folder}/omf_test.pub")

    OmfCommon::Auth::SSHPubKeyConvert.convert(ssh_pub_key).to_s.must_equal pub_key.to_s
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
omf_common-6.2.3 test/omf_common/auth/ssh_pub_key_convert_spec.rb
omf_common-6.2.2 test/omf_common/auth/ssh_pub_key_convert_spec.rb
omf_common-6.2.1 test/omf_common/auth/ssh_pub_key_convert_spec.rb
omf_common-6.2.0 test/omf_common/auth/ssh_pub_key_convert_spec.rb
omf_common-6.2.0.pre.2 test/omf_common/auth/ssh_pub_key_convert_spec.rb
omf_common-6.2.0.pre.1 test/omf_common/auth/ssh_pub_key_convert_spec.rb
omf_common-6.1.14.pre.2 test/omf_common/auth/ssh_pub_key_convert_spec.rb
omf_common-6.1.14.pre.1 test/omf_common/auth/ssh_pub_key_convert_spec.rb
omf_common-6.1.12 test/omf_common/auth/ssh_pub_key_convert_spec.rb
omf_common-6.1.11 test/omf_common/auth/ssh_pub_key_convert_spec.rb
omf_common-6.1.10 test/omf_common/auth/ssh_pub_key_convert_spec.rb
omf_common-6.1.9 test/omf_common/auth/ssh_pub_key_convert_spec.rb
omf_common-6.1.9.pre.4 test/omf_common/auth/ssh_pub_key_convert_spec.rb
omf_common-6.1.9.pre.3 test/omf_common/auth/ssh_pub_key_convert_spec.rb
omf_common-6.1.9.pre.2 test/omf_common/auth/ssh_pub_key_convert_spec.rb
omf_common-6.1.8 test/omf_common/auth/ssh_pub_key_convert_spec.rb
omf_common-6.1.7 test/omf_common/auth/ssh_pub_key_convert_spec.rb
omf_common-6.1.6 test/omf_common/auth/ssh_pub_key_convert_spec.rb
omf_common-6.1.6.pre.2 test/omf_common/auth/ssh_pub_key_convert_spec.rb
omf_common-6.1.6.pre.1 test/omf_common/auth/ssh_pub_key_convert_spec.rb