Table Of ContentInformation Guide 1
DocuSign Signature
Appliance
Signature APIs
Developer’s Guide
Version 8.2
221 Main Street, Suite 1000, San Francisco, CA 94105 Ι Tel. 866.219.4318 Ι www.docusign.com Ι © DocuSign, Inc.
Table of Contents
DocuSign SA Signature APIs Developer‟s Guide .................................................................................. i
DocuSign SA Overview ........................................................................................................................ i
Requirements for Data Authentication Systems ............................................................................ 1
Introduction to DocuSign SA ......................................................................................................... 1
Environments Supported by DocuSign SA ............................................................................... 2
Applications that Work with DocuSign SA ................................................................................ 3
DocuSign SA Products and Add-ons ........................................................................................ 4
DocuSign SA Signature APIs ................................................................................................... 4
DocuSign SA Guides ..................................................................................................................... 5
Intended Audience ........................................................................................................................ 5
Copyright ....................................................................................................................................... 5
SAPI Local ............................................................................................................................................ i
Introduction ................................................................................................................................... 1
SAPI Local Components and Capabilities ................................................................................ 1
Capabilities of Signing and Validating API ................................................................................ 2
Supported File Types ......................................................................................................... 2
Managing Fields Inside a Document................................................................................... 2
Managing Graphical Images ............................................................................................... 3
Managing User Certificates ................................................................................................ 3
Signing and Validating Signature Fields in a Document ..................................................... 3
Buffer Signature and Validation Operation ......................................................................... 4
User Signing Using a Web Application or an Application Server ......................................... 4
Advanced Digital Signatures .............................................................................................. 5
Using DocuSign SA in Common Criteria Mode ................................................................... 5
User Activation ............................................................................................................. 5
Protection of Data/Documents during Signing .............................................................. 6
PDF Signature Support ...................................................................................................... 6
Office 2010/2013/2016 Signature Support .......................................................................... 7
Word XP/2003 Signature Support ...................................................................................... 7
TIFF Signature Support ...................................................................................................... 8
InfoPath 2010/2013 Signature Support ............................................................................... 8
© DocuSign, Inc. i
XML Signature Support ...................................................................................................... 8
Capabilities of User Management API (SAPI-UM) .................................................................... 9
Typical SAPI Local Scenarios .................................................................................................. 9
Signing Forms using a Desktop Application........................................................................ 9
Verifying a Signature in a File ........................................................................................... 10
Signing a File using the Web Services Interface ............................................................... 10
Signing a File using the Web Services Interface without Passing the Whole File ............. 10
Signing Transaction Data ................................................................................................. 11
Verifying Transaction Data ............................................................................................... 11
Signing Long Raw Data .................................................................................................... 11
Verifying Long Raw Data .................................................................................................. 11
Central File Signing by Different Users ............................................................................. 12
Batch Signing of Files ....................................................................................................... 12
A Workflow Application for Signing a Document Multiple Times ....................................... 13
Introduction to the SAPICOM Interface .................................................................................. 13
Signature Local Signing/Verifying API ........................................................................................... 1
Using SAPICrypt ...................................................................................................................... 1
SAPI Session ........................................................................................................................... 2
SAPIInit .............................................................................................................................. 4
SAPIHandleAcquire ............................................................................................................ 5
SAPIConfigurationValueGet ............................................................................................... 6
SAPIConfigurationValueSet ............................................................................................... 8
SAPIContextRelease ........................................................................................................ 10
SAPIStructRelease ........................................................................................................... 11
SAPIHandleRelease ......................................................................................................... 12
SAPIFinalize ..................................................................................................................... 13
SAPIExtendedLastErrorGet .............................................................................................. 14
SAPILibInfoGet ................................................................................................................ 15
SAPILogonEx ................................................................................................................... 16
SAPILogon ....................................................................................................................... 19
SAPILogoff ....................................................................................................................... 20
SAPIUserActivate ............................................................................................................. 21
SAPICredentialChange .................................................................................................... 23
SAPIGetTokenID .............................................................................................................. 25
SAPISetTokenID .............................................................................................................. 26
ii © DocuSign, Inc.
SAPICAInfoGetInit ............................................................................................................ 27
SAPICAInfoGetCont ......................................................................................................... 29
SAPICACertInstall ............................................................................................................ 31
SAPITimeGet ................................................................................................................... 33
SAPIGetTokenInfo ........................................................................................................... 34
SAPI Local Signature Field .................................................................................................... 35
SAPICreateFileHandleByMem ......................................................................................... 37
SAPICreateFileHandleByName ........................................................................................ 39
SAPIGetFileMemData ...................................................................................................... 40
SAPIGetFileHandleType .................................................................................................. 41
SAPISignatureFieldEnumInitEx ........................................................................................ 42
SAPISignatureFieldEnumInit ............................................................................................ 44
SAPISignatureFieldEnumCont ......................................................................................... 45
SAPISignatureFieldInfoGet .............................................................................................. 47
SAPISignatureFieldCreateEx ........................................................................................... 49
SAPISignatureFieldCreate ............................................................................................... 52
SAPISignatureFieldLocatorEnumInit ................................................................................ 53
SAPISignatureFieldLocatorEnumCont .............................................................................. 56
SAPISignatureFieldSignEx ............................................................................................... 58
SAPISignatureFieldSign ................................................................................................... 61
SAPISignatureFieldCreateSignEx .................................................................................... 62
SAPISignatureFieldCreateSign ........................................................................................ 65
SAPISignatureFieldVerify ................................................................................................. 66
SAPIFileIsSignedEx ......................................................................................................... 68
SAPIFileIsSigned ............................................................................................................. 70
SAPISignatureFieldClear .................................................................................................. 71
SAPISignatureFieldRemove ............................................................................................. 73
SAPISignatureFieldDetailsGUIGet ................................................................................... 75
SAPISigningCeremonyGUI .............................................................................................. 76
SAPI Local Certificates .......................................................................................................... 78
SAPICertificatesEnumInit ................................................................................................. 80
SAPICertificatesEnumCont .............................................................................................. 82
SAPICertificateGetFieldByHandle .................................................................................... 84
SAPICertificateGetFieldByBlob ........................................................................................ 86
SAPIPKCS7BlobGetValue ............................................................................................... 88
© DocuSign, Inc. iii
SAPICertificateGUISelect ................................................................................................. 90
SAPICertificateSetDefault ................................................................................................ 92
SAPICertificateGetDefault ................................................................................................ 94
Graphical Image Objects ........................................................................................................ 96
Selecting and Retrieving Graphical Image Objects ........................................................... 96
Managing Graphical Image Objects ................................................................................. 97
SAPIGraphicSigImageEnumInit ........................................................................................ 98
SAPIGraphicSigImageEnumCont ................................................................................... 100
SAPIGraphicSigImageGUISelect ................................................................................... 102
SAPIGraphicSigImageSetDefaultEx ............................................................................... 105
SAPIGraphicSigImageSetDefault ................................................................................... 107
SAPIGraphicSigImageGetDefaultEx............................................................................... 108
SAPIGraphicSigImageGetDefault ................................................................................... 110
SAPIGraphicSigImageInfoGet ........................................................................................ 111
SAPIGraphicSigImageInfoCreate ................................................................................... 113
SAPIGraphicSigLogoInfoCreate ..................................................................................... 115
SAPIGraphicSigInitialsInfoCreate ................................................................................... 116
SAPIGraphicSigImageInfoDelete ................................................................................... 117
SAPIGraphicSigImageInfoUpdate .................................................................................. 119
SAPIGraphicSigLogoInfoUpdate .................................................................................... 121
SAPIGraphicSigInitialsInfoUpdate .................................................................................. 123
SAPI Local Buffer Signing .................................................................................................... 125
SAPIBufferSignEx .......................................................................................................... 126
SAPIBufferSign .............................................................................................................. 129
SAPIBufferSignInit .......................................................................................................... 130
SAPIBufferSignCont ....................................................................................................... 132
SAPIBufferSignEndEx .................................................................................................... 134
SAPIBufferSignEnd ........................................................................................................ 136
SAPISigningContextPKCS7BlobLenGet ......................................................................... 137
SAPI Local - Buffer Verify..................................................................................................... 138
SAPIBufferVerifySignature ............................................................................................. 139
SAPIBufferVerifySignatureInit ........................................................................................ 141
SAPIBufferVerifySignatureCont ...................................................................................... 143
SAPIBufferVerifySignatureEnd ....................................................................................... 145
SAPI Local - Enrollment ....................................................................................................... 147
iv © DocuSign, Inc.
SAPIKeyPairGenerate .................................................................................................... 148
SAPIImportCertificate ..................................................................................................... 150
SAPI Local - Obsolete Functions .......................................................................................... 152
SAPIGraphicSigImageGet .............................................................................................. 152
SAPIGraphicSigImageSet .............................................................................................. 152
Signature Local User Management API ......................................................................................... 1
Using SAPIUM ......................................................................................................................... 1
General SAPIUM functions ................................................................................................. 1
Functions for Managing a Single User ................................................................................ 2
Functions for Managing a Single Group ............................................................................. 2
Functions for Synchronizing DocuSign SA‟s Users Database with the Application‟s Users
Database ............................................................................................................................ 3
Functions for Enumerating All the Users Defined in DocuSign SA ...................................... 4
Functions for Enumerating All the Groups Defined in DocuSign SA ................................... 4
Functions for Setting Configuration .................................................................................... 4
SAPIUMInit......................................................................................................................... 5
SAPIUMHandleAcquire ...................................................................................................... 6
SAPIUMLogonEx ............................................................................................................... 7
SAPIUMLogon ................................................................................................................... 9
SAPIUMGetTokenID ........................................................................................................ 10
SAPIUMSetTokenID ......................................................................................................... 11
SAPIUMLogonBuiltIn ........................................................................................................ 12
SAPIUMLogoff ................................................................................................................. 13
SAPIUMHandleRelease ................................................................................................... 14
SAPIUMFinalize ............................................................................................................... 15
SAPIUMExtendedLastErrorGet ........................................................................................ 16
SAPIUMLibInfoGet ........................................................................................................... 17
SAPIUMUserAddEx1 ....................................................................................................... 18
SAPIUMUserAdd.............................................................................................................. 20
SAPIUMUserUpdate ........................................................................................................ 21
SAPIUMCredentialSet ...................................................................................................... 22
SAPIUMUserSetLogonState ............................................................................................ 24
SAPIUMUserDelete .......................................................................................................... 25
SAPIUMUsersSyncBegin ................................................................................................. 26
SAPIUMUserSync ............................................................................................................ 28
© DocuSign, Inc. v
SAPIUMUsersSyncEnd .................................................................................................... 30
SAPIUMUsersSyncStop ................................................................................................... 32
SAPIUMUsersCount ......................................................................................................... 34
SAPIUMUsersEnumInitEx ................................................................................................ 35
SAPIUMUsersEnumInit .................................................................................................... 37
SAPIUMUsersEnumCont ................................................................................................. 38
SAPIUMUsersEnumNumberOfUsersGet .......................................................................... 40
SAPIUMUserInfoGetEx .................................................................................................... 41
SAPIUMUserInfoGet ........................................................................................................ 44
SAPIUMCounterReset ..................................................................................................... 45
SAPIUMUserAssignGroup ............................................................................................... 46
SAPIUMUserGetByLoginName ........................................................................................ 47
SAPIUMUserTechIDGet ................................................................................................... 48
SAPIUMResetPasswordCounter ...................................................................................... 49
SAPIUMGroupGetByUserGUID ....................................................................................... 50
SAPIUMGroupAdd ........................................................................................................... 51
SAPIUMGroupUpdate ...................................................................................................... 52
SAPIUMGroupSetStatusByTechID ................................................................................... 53
SAPIUMGroupDelete ....................................................................................................... 54
SAPIUMGroupsEnumInit .................................................................................................. 55
SAPIUMGroupsEnumCont ............................................................................................... 57
SAPIUMGroupGetByTechID ............................................................................................ 59
SAPIUMGroupGetByName .............................................................................................. 60
SAPIUMGroupExtDataUpdate.......................................................................................... 61
SAPIUMGroupExtDataGet ............................................................................................... 63
SAPIUMSCPSet ............................................................................................................... 64
Signature Local COM Methods for Signing and Verifying ............................................................ 65
SAPICryptCOM Functions ........................................................................................................ 1
Init ...................................................................................................................................... 1
HandleAcquire .................................................................................................................... 1
ConfigurationValueGet ....................................................................................................... 1
ConfigurationValueSet ....................................................................................................... 1
ContextRelease .................................................................................................................. 1
HandleRelease ................................................................................................................... 2
Finalize ............................................................................................................................... 2
vi © DocuSign, Inc.