Hi Martin,
Martin Bartosch wrote:
I am currently working on a standalone Perl script that runs on the CA and issues all approved CSRs (see other posts about automatic issuance).
For cert issuance I have to instantiate the CA Token:
my $token_xml = getRequired( 'TokenConfiguration'); my $crypto_layer = new OpenCA::Crypto(CONFIG => $token_xml, GETTEXT => \&gettext, CACHE => $xml_cache, DEBUG => 0); [...] my $ca_token = $crypto_layer->getToken ('CA')
My problem is the XML Cache. OpenCA::Crypto requires it, but instantiating it seems to require starting the XML cache daemon.
I don't really want to start a cache daemon for the standalone script and I also suspect that this may cause problems with a concurrently running cache daemon that was started by the OpenCA server process.
So what is the recommended procedure for instantiating the CA token?
The XML cache is required by OpenCA::Crypto. We use this object to get all configuration informations. The only chance to work around this is to write a module with the interface of the XML cache :(
The best thing is if there is an already running OpenCA. If you use the initXMLcache like coded in functions/initServer then you can use the already running daemon. OpenCA::XML::Cache->startDaemon detects a running daemon. So there will be no problems. If you want to be sure simply use the running cache and never call startDaemon.
Today I have no better solution.
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 sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
OpenCA-Devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/openca-devel