|
From: <php...@li...> - 2009-12-07 09:01:46
|
Thanks Jost,
This solution seem to work.
But I still got a lot of problems for the rest of the script like
[java-code]
Certificate[] chain = ks.getCertificateChain(alias);
if (chain.length >= 2) {
String url = PdfPKCS7.getOCSPURL((X509Certificate)chain[0]);
if (url != null && url.length() > 0)
ocsp = new OcspClientBouncyCastle((X509Certificate)chain[0], (X509Certificate)chain[1], url).getEncoded();
}
How to create an Array of object when you don't know the size...
I can't use :
$Certificate = new JavaClass("java.security.cert.Certificate");
$Array = new JavaClass("java.lang.reflect.Array");
$chain = $Array->newInstance($Certificate, 10);
Otherwise, do you know someone who can help me to traduce this script (http://itextpdf.sourceforge.net/howtosign.html -> How to sign with a timestamp and OCSP in Java)
Best regards
> Date: Thu, 3 Dec 2009 19:31:36 +0100
> To: php...@li...
> From: php...@li...
> Subject: Re: [Php-java-bridge-users] messageDigest and byte manipulation(2)
>
> Hi,
>
> > while (($n = $data->read($byteArray)) > 0) {
> > I always got a : Maximum execution time of 60 seconds exceeded in ...
>
>
> Yes, this is the correct behaviour. The above statement evaluates to an
> endless loop.
>
> $data->read(...) returns a java Integer object. Any object evaluates to
> true, according to the PHP type conversion rules.
>
>
> What you probably want is:
>
> while (($n = java_values($data->read($byteArray))) > 0) {
> ...
>
> Please see our API documentation at
> http://php-java-bridge.sourceforge.net/pjb/docs/php-api/JavaBridge/_JavaProxy.inc.html#functionjava_valuesand
> JAVA_PREFER_VALUES
> http://php-java-bridge.sourceforge.net/pjb/docs/php-api/JavaBridge/_Options.inc.htmlfor
> details.
>
>
> Regards,
> Jost Boekemeier
> ------------------------------------------------------------------------------
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing.
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
_________________________________________________________________
Messenger à partir de votre boîte de réception ! Découvrez la foule d'atouts de Hotmail.
http://www.microsoft.com/switzerland/windows/fr/windowslive/hotmail_bl1/hotmail_bl1.aspx
|