Community articleGetSecurityEngineName function
Added by IBM contributorIBM on May 2, 2012
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

No abstract provided.


This function returns the name of the appropriate security engine for a given button or signature node. This is useful for determining which validation call you need to make to validate the signature.


   Function GetSecurityEngineName(
      theOperation As Long
      ) As String


Table 1. get security engine name parameters
theOperationLongThe operation you want the security engine for. Possible values are:
SEOPERATION_SIGN — the engine that is needed to sign the form.
SEOPERATION_VERIFY — the engine that is needed to verify the signature.
SEOPERATION_LISTIDENTITIES — the engine that is needed to generate a list of valid certificates for signing.


A string containing the name of the security engine on success, or throws an exception if an error occurs. The possible names are:
  • CryptoAPI
  • Netscape
  • ClickWrap
  • HMAC-ClickWrap
  • PenOp


The following function uses GetSecurityEngineName to determine which engine to use to verify the signature. It then calls the appropriate verification function. Note that the verification functions are not themselves API functions, but would use functions within the API such as VerifySignature and ValidateHMACWithSecret.
   Function CheckSignatureByType(SigNode)
      Dim EngineName, Status  ' String
      ' Get the name of the signature engine that can verify the signature
      EngineName = SigNode.GetSecurityEngineName(SEOPERATION_VERIFY)
      ' If the signature engine is HMAC, call ValidateHMACSig, otherwise call
      ' CheckSignature.
      If EngineName = "HMAC-ClickWrap" Then
         Status = ValidateHMACSig(SigNode)
         Status = CheckSignature(SigNode)
      End If
      ' Return the signature status
      CheckSignatureByType = Status
   End Function

Parent topic:
FormNodeP functions