{"record":{"id":"6b06b0bfdce41719","repo":"puppetlabs/puppet","slug":"error-loading-ssl-custom-oids-mapping-file-from","errorCode":null,"errorMessage":"Error loading ssl custom OIDs mapping file from '%{custom_oid_file}': %{err}","messagePattern":"Error loading ssl custom OIDs mapping file from '%(.+?)': %(.+?)","errorType":"exception","errorClass":"Puppet::Error","httpStatus":null,"severity":"error","filePath":"lib/puppet/ssl/oids.rb","lineNumber":115,"sourceCode":"  # @param custom_oid_file [String] File to obtain custom OIDs mapping from\n  # @param map_key [String] Hash key in which custom OIDs mapping is stored\n  #\n  # @example Custom OID mapping file\n  # ---\n  # oid_mapping:\n  #  '1.3.6.1.4.1.34380.1.2.1.1':\n  #    shortname : 'myshortname'\n  #    longname  : 'Long name'\n  #  '1.3.6.1.4.1.34380.1.2.1.2':\n  #    shortname: 'myothershortname'\n  #    longname: 'Other Long name'\n  def self.parse_custom_oid_file(custom_oid_file, map_key = 'oid_mapping')\n    if File.exist?(custom_oid_file) && File.readable?(custom_oid_file)\n      mapping = nil\n      begin\n        mapping = Puppet::Util::Yaml.safe_load_file(custom_oid_file, [Symbol])\n      rescue => err\n        raise Puppet::Error, _(\"Error loading ssl custom OIDs mapping file from '%{custom_oid_file}': %{err}\") % { custom_oid_file: custom_oid_file, err: err }, err.backtrace\n      end\n\n      unless mapping.has_key?(map_key)\n        raise Puppet::Error, _(\"Error loading ssl custom OIDs mapping file from '%{custom_oid_file}': no such index '%{map_key}'\") % { custom_oid_file: custom_oid_file, map_key: map_key }\n      end\n\n      unless mapping[map_key].is_a?(Hash)\n        raise Puppet::Error, _(\"Error loading ssl custom OIDs mapping file from '%{custom_oid_file}': data under index '%{map_key}' must be a Hash\") % { custom_oid_file: custom_oid_file, map_key: map_key }\n      end\n\n      oid_defns = []\n      mapping[map_key].keys.each do |oid|\n        shortname, longname = mapping[map_key][oid].values_at(\"shortname\", \"longname\")\n        if shortname.nil? || longname.nil?\n          raise Puppet::Error, _(\"Error loading ssl custom OIDs mapping file from '%{custom_oid_file}': incomplete definition of oid '%{oid}'\") % { custom_oid_file: custom_oid_file, oid: oid }\n        end\n\n        oid_defns << [oid, shortname, longname]","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/ssl/oids.rb#L97-L133","documentation":"Error \"Error loading ssl custom OIDs mapping file from '%{custom_oid_file}': %{err}\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/ssl/oids.rb:115 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}