Method: Keychain.open
- Defined in:
- lib/keychain.rb
.open(path) ⇒ Keychain::Keychain
Opens the keychain file at the specified path and adds it to the keychain search path ( SecKeychainOpen )
Will succeed even if the file doesn’t exists (however most operations on the keychain will then fail)
61 62 63 64 65 66 67 |
# File 'lib/keychain.rb', line 61 def open(path) raise ArgumentError unless path out_buffer = FFI::MemoryPointer.new(:pointer) status = Sec.SecKeychainOpen(path,out_buffer); Sec.check_osstatus(status) Keychain.new(out_buffer.read_pointer).release_on_gc end |