an adapted version of signFormN in signForm.js could look like this (0.9.2):
function signFormN(theForm, theWindow) {
var signedText;var sObject;
var result;
try {
sObject = new CLABSignString();
if (sObject == undefined) alert('SecCLAB Plugin failed.');
var status = {value:0};
var len = {value:0};
try {
result = sObject.signString(window,theForm.text.value,theForm.text.value.length,status,len);
if (status.value != sObject.STATUS_OK) {
alert("Aborted by user or no valid user certificate");
return false;
}
} catch(ex) {
alert("Aborted by user or no valid user certificate");
return false;
}
signedText = String2Base64(result); //String2Hex(result);
} catch(ex) {
signedText = theWindow.crypto.signText(theForm.text.value, "ask");
}
if ( signedText.length < 100 ) {
alert( "Sign is needed to proceed!" );
return false;
}theForm.signature.value = signedText; }
Be warned, I have no SecCLAB plugin and I don't tested this code. It is only an idea to help the guys which have not so much OpenCA experience like me :)
Perhaps there should be some error detection for crypto too.
Best regards
Michael -- ------------------------------------------------------------------- Michael Bell Email: [EMAIL PROTECTED] ZE Computer- und Medienservice Tel.: +49 (0)30-2093 2482 (Computing Centre) Fax: +49 (0)30-2093 2704 Humboldt-University of Berlin Unter den Linden 6 10099 Berlin Email (private): [EMAIL PROTECTED] Germany http://www.openca.org
------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Openca-Users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/openca-users
