Hi Alexei,

I tried this but it isnt working....
I dont know why - I tried to verify the generated and Base64 convertet signature with openssl directly but this failed. Actually I dont know if the problem is with the signature oder the Base64 encoding - so I will try.

Do you know what must go into the "signature" field for OPenCA ? Only the Base64 coded Signature, any "Begin/End" Markers ??

Oliver


Alexei Chetroi wrote:
On Tue, Dec 16, 2003 at 06:21:16PM +0100, Oliver Welter wrote:

From: Oliver Welter <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [Openca-Users] Signing Request mozilla/secclab
Reply-To: [EMAIL PROTECTED]
Date: Tue, 16 Dec 2003 18:21:16 +0100

Hi Folks,

as there are request for signing the request with mozilla, and I need this feature too, I want to do the development on this.

Target: Rewrite FormSigning Code to support secclab.mozilla.org

1) Is there anybody out there who has done some work on this
2) who can tell me what excatly openca wants to receive as a "signed request?"


 There's file signForm.js in htdocs/ca/scripts/C. There's alsa an
example at
ftp://mozdev.secsup.org/pub/software/mozdev/secclab/common/SignString.html
I think we must adapt:

function SignString(textField,signatureField){
  var sObject;
  var result;
  try {
      sObject = new CLABSignString();
  } catch(ex) {
    alert("CLABSignString is not defined");
    return false;
  }
  if (sObject == undefined) alert('hole');
  var status = {value:0};
  var len = {value:0};
  try {
    result =
sObject.signString(window,textField.value,textField.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;
  }
  signatureField.value = String2Base64(result); //String2Hex(result);
  return true;
}

 To OpenCA's:
function signFormN(theForm, theWindow) {
        var signedText;

        signedText = theWindow.crypto.signText(theForm.text.value,
"ask");

        if ( signedText.length < 100 ) {
                alert( "Sign is needed to proceed!" );
                return false;
        }

        theForm.signature.value = signedText;
}


-- Diese Nachricht wurde digital unterschrieben oliwel's public key: http://www.oliwel.de/oliwel.crt Basiszertifikat: http://www.ldv.ei.tum.de/page72

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



Reply via email to