Print Page | Close Window

File generation by digital signing

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3944
Printed Date: 29 Apr 24 at 5:35PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: File generation by digital signing
Posted By: takuya
Subject: File generation by digital signing
Date Posted: 06 Aug 21 at 9:32AM
Hello

When signing PDF at present, the file can be made following folder in quantities, and I'm examining what this is.
Every time I sign PDF, this file is made, so I'd like to eliminate whether it outputs in a different folder.
May I eliminate this file or move?



C:\Users\UserName\AppData\Roaming\Microsoft\Crypto\RSA\S-1-5-21-・・・



A program will be the following.
(It's being made by VisualStudio 2008 C++.)

――――――――――――――――――――――――――――――――――――――――――――――――――――

BOOL AddDigitalSignature(CString pdfPath)
{
if(ggv.pfxFileName.IsEmpty())
return TRUE;

DebenuPDFLibraryDLL0916 DPL((char*)(LPCTSTR)"DebenuPDFLibraryDLL0916.dll");


CString pdfBkPath = pdfPath + ".bak";
int resc = CopyFile(pdfPath, pdfBkPath, FALSE);
if(resc != 0) {
DebugLog(9, "Error at AS_CopyFile:%d", resc);
return FALSE;
}
Sleep(200);

CStringW strLicenseKey(LICENCEKEY_DEBENU_PDFLIB);
CStringW inputFileName(pdfBkPath);
CStringW openPassword;
CStringW signatureFieldName = L"Signature";
CStringW outputFileName(ggv.pdfModifyTemp + "SignedTemp.pdf");
CStringW pfxFileName(ggv.pdfModifyTemp + ggv.pfxFileName);
CStringW pfxPassword(ggv.pfxFilePwd);
CStringW reason(ggv.pfxSignReason);
CStringW location(ggv.pfxSignLocation);
CStringW contactInfo(ggv.pfxSignContact);

int res = DPL.UnlockKey(strLicenseKey);
if(res != 1)
{

DebugLog(9, "Error at UnlockKey:%d", res);
return FALSE;
}

res = DPL.SignFile(inputFileName, 
openPassword, 
signatureFieldName, 
outputFileName, 
pfxFileName, 
pfxPassword, 
reason, 
location, 
contactInfo);
if(res != 1) {
DebugLog(9, "Error at SignFile:%d", res);
return FALSE;
}
res = CopyFile((CString)outputFileName, pdfPath, FALSE);
if(res != 0) {
DebugLog(9, "Error at CopyFile:%d", res);
return FALSE;
}
return TRUE;
}




Replies:
Posted By: Ingo
Date Posted: 06 Aug 21 at 10:29AM
Hi Takuya :) 


this is a common issue.
You can google all about it with
appdata roaming microsoft crypto rsa s-1-5-21

You shouldn't bother about it ;-)


Cheers and welcome here,
Ingo



-------------
Cheers,
Ingo




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk