# File lib/rubygems/security.rb, line 727 def self.add_trusted_cert(cert, opt = {}) opt = OPT.merge(opt) # get destination path path = Gem::Security::Policy.trusted_cert_path(cert, opt) # verify trust directory (can't write to nowhere, you know) verify_trust_dir(opt[:trust_dir], opt[:perms][:trust_dir]) # write cert to output file File.open(path, 'wb') do |file| file.chmod(opt[:perms][:trusted_cert]) file.write(cert.to_pem) end # return nil nil end