Last active
June 30, 2025 15:40
-
-
Save marcodebe/6138525 to your computer and use it in GitHub Desktop.
Example of remote sign using Aruba services. The example creates a signed PDF document.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from zeep import Client | |
import sys | |
import os | |
WSDL = 'https://arss.arubapec.it/ArubaSignService/ArubaSignService?wsdl' | |
document = sys.argv[1] | |
otp = sys.argv[2] | |
output = '.signed'.join(os.path.splitext(document)) | |
client = Client(WSDL) | |
factory = client.type_factory('ns0') | |
sign_request = factory.signRequestV2( | |
requiredmark=True, | |
transport='BYNARYNET', | |
binaryinput=open(document, 'rb').read(), | |
identity=factory.auth( | |
user='username', | |
userPWD=3141592653, | |
typeHSM='cosign', | |
typeOtpAuth='frAzienda', | |
otpPwd=otp | |
)) | |
response = client.service.pdfsignatureV2(SignRequestV2=sign_request) | |
outputfile = open(output, 'wb') | |
outputfile.write(response.binaryoutput) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Questa è l'unica cosa utile che si trova nel web riguardo Aruba. Grazie!