Hi Oli, Oliver Welter wrote:
I am working on the crr-batch and have following problem:In first step (create_crr) I create a crr in the database like the web-frontend does:-----BEGIN HEADER----- TYPE = CRR SERIAL = 384 -----END HEADER----- SUBMIT_DATE = Tue Aug 16 13:24:52 2005 UTC REVOKE_REASON = ......Now when I approve the crr in the next step, all I want to do is to add another line (Approval Date) to the lower portion of the body (outside header). How can I do this ??The code for the webfrontend does something stupid here - it regenerated the whole request object from scratch including the new lines but I dont want to do so in batch (might hit the performacen and is imho not necessary)...I found a "addHeaderAttribute" function in the REQ.pm, but it seems that there is no counterpart for the body. Cann I access the body directly by some variable ? ( I use getBody to fetch the data which seems to work)
We rebuild the complete object because OpenCA::REQ is not prepared to change the body - because the body is usually ASN.1 crypto stuff. Only the CRR has a human readable body. My personal idea for HEAD was to rewrite the CRR stuff and put all things in the HEADER because there is no crypto stuff for body and we can handle the complete data via OpenCA::Header.
We cannot do this for openca_0_9_2 so we have to rebuild the object completely. The easiest way is the following:
my $plain = $obj->getItem(); $plain =~ s/[\r\n]*$//s; $plain .= "\r\n$name=$value\r\n"; $obj = OpenCA::REQ->new (... Michael -- _______________________________________________________________ Michael Bell Humboldt-Universitaet zu Berlin Tel.: +49 (0)30-2093 2482 ZE Computer- und Medienservice Fax: +49 (0)30-2093 2704 Unter den Linden 6 [EMAIL PROTECTED] D-10099 Berlin _______________________________________________________________
smime.p7s
Description: S/MIME Cryptographic Signature