{"record":{"id":"21e9c0d379989ec7","repo":"puppetlabs/puppet","slug":"error-registering-ssl-custom-oids-mapping-from-fil","errorCode":null,"errorMessage":"Error registering ssl custom OIDs mapping from file '%{custom_oid_file}': %{err}","messagePattern":"Error registering ssl custom OIDs mapping from file '%(.+?)': %(.+?)","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/puppet/ssl/oids.rb","lineNumber":163,"sourceCode":"  #\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.load_custom_oid_file(custom_oid_file, map_key = 'oid_mapping')\n    oid_defns = parse_custom_oid_file(custom_oid_file, map_key)\n    unless oid_defns.nil?\n      begin\n        oid_defns.each do |oid_defn|\n          OpenSSL::ASN1::ObjectId.register(*oid_defn)\n        end\n      rescue => err\n        raise ArgumentError, _(\"Error registering ssl custom OIDs mapping from file '%{custom_oid_file}': %{err}\") % { custom_oid_file: custom_oid_file, err: err }, err.backtrace\n      end\n    end\n  end\n\n  # Determine if the first OID contains the second OID\n  #\n  # @param first [String] The containing OID, in dotted form or as the short name\n  # @param second [String] The contained OID, in dotted form or as the short name\n  # @param exclusive [true, false] If an OID should not be considered as a subtree of itself\n  #\n  # @example Comparing two dotted OIDs\n  #   Puppet::SSL::Oids.subtree_of?('1.3.6.1', '1.3.6.1.4.1') #=> true\n  #   Puppet::SSL::Oids.subtree_of?('1.3.6.1', '1.3.6') #=> false\n  #\n  # @example Comparing an OID short name with a dotted OID\n  #   Puppet::SSL::Oids.subtree_of?('IANA', '1.3.6.1.4.1') #=> true\n  #   Puppet::SSL::Oids.subtree_of?('1.3.6.1', 'enterprises') #=> true\n  #","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/ssl/oids.rb#L145-L181","documentation":"Error \"Error registering ssl custom OIDs mapping from file '%{custom_oid_file}': %{err}\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/ssl/oids.rb:163 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"}