Loading TOC...

pki:template-set-key-type

pki:template-set-key-type(
   $template as element(pki:template),
   $key-type as xs:string
) as element(pki:template)

Summary

This function changes the key type for the specified certificate template and returns the XML containing the change. Use pki:insert-template to save the change to the Security database.

Parameters
template The certificate template for which to change the key type.
key-type The new key type for the certificate template. The key type must be "rsa" and entered in lower case.

Example

  (: execute this against the security database :)
  xquery version "1.0-ml"; 
  import module namespace pki = "http://marklogic.com/xdmp/pki" 
       at "/MarkLogic/pki.xqy";;

  let $tid := pki:get-template-ids()[1]     
  return
     pki:template-set-key-type(pki:get-template($tid), "rsa")

  (: Returns the XML for the certificate template with the new key type. :)
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.