code: def build_keyjar(key_conf, kid_template="", keyjar=None, owner=''):
      
  
      if keyjar is None:
          keyjar = KeyJar()
  
      tot_kb = build_key_bundle(key_conf, kid_template)
  
      keyjar.add_kb(owner, tot_kb)
  
      return keyjar
docs: Builds a :py:class:`oidcmsg.key_jar.KeyJar` instance or adds keys to
      an existing KeyJar based on a key specification.
  
      An example of such a specification::
      
          keys = [
              {"type": "RSA", "key": "cp_keys/key.pem", "use": ["enc", "sig"]},
              {"type": "EC", "crv": "P-256", "use": ["sig"], "kid": "ec.1"},
              {"type": "EC", "crv": "P-256", "use": ["enc"], "kid": "ec.2"}
          ]
  
      Keys in this specification are:
  
      type
          The type of key. Presently only 'rsa' and 'ec' supported.
  
      key
          A name of a file where a key can be found. Only works with PEM encoded
          RSA keys
  
      use
          What the key should be used for
  
      crv
          The elliptic curve that should be used. Only applies to elliptic curve
          keys :-)
  
      kid
          Key ID, can only be used with one usage type is specified. If there
          are more the one usage type specified 'kid' will just be ignored.
  
      :param key_conf: The key configuration
      :param kid_template: A template by which to build the key IDs. If no
          kid_template is given then the built-in function add_kid() will be used.
      :param keyjar: If an KeyJar instance the new keys are added to this key jar.
      :param owner: The default owner of the keys in the key jar.
      :return: A KeyJar instance