That said... are you sure that your callback is not invoked for *each*
certificate in the chain? Recently, we had a problem in libsvn_ra_serf
because it only remembered problems with the server certificate, and
lost errors with the CA certificate. When we correctly accumulated
errors from all certificates, then we found problems with people's
systems not configured to trust the CA :-P
Given that problem, we must have been getting called more than once??
I can see how retrieving the whole chain makes sense, for more
sophisticated UIs to display. Should probably apply that patch, but
I'd like to know more about the callback and why ra_serf got multiple
calls, and you're not...
Cheers,
-g
> --
> You received this message because you are subscribed to the Google Groups "Serf Development List" group.
> To post to this group, send email to serf...@googlegroups.com.
> To unsubscribe from this group, send email to serf-dev+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/serf-dev?hl=en.
>
thanks for your fast answer.
On 17.02.2012 23:34, Greg Stein wrote:
> Hopefully, Paul or Justin can chime in here. They worked on the cert code.
>
> That said... are you sure that your callback is not invoked for *each*
> certificate in the chain?
No, I am not sure. Like in OpenOffice there is little documentation for
serf,
so I looked at its code and the documentation of openssl. The later because
during authentication openssl calls serf, which in turn calls the office.
The documentation of SSL_CTX_set_verify() states that its callback (which
is validate_server_certificate() in ssl_buckets.c) is called for every error
(ie certifcate can not be authenticated).
Only after I write my previous mail I discovered that the following sentence
states that the callback is also called when there is no error, just with
a different flag. So I checked validate_server_certificate() again to see
what would happen when it is called when there is no error. I do not see
how in that case serf would call back into the office (except for the
root certificate.)
But I do not know if that case can occur in reality and I certainly do not
know how to create such a certificate chain for testing.
> Recently, we had a problem in libsvn_ra_serf
> because it only remembered problems with the server certificate, and
> lost errors with the CA certificate. When we correctly accumulated
> errors from all certificates, then we found problems with people's
> systems not configured to trust the CA :-P
>
> Given that problem, we must have been getting called more than once??
>
> I can see how retrieving the whole chain makes sense, for more
> sophisticated UIs to display. Should probably apply that patch, but
> I'd like to know more about the callback and why ra_serf got multiple
> calls, and you're not...
Apart from what I said earlier, there is also a question of usability.
Serf already has access to the whole chain of certificates. Would
it not be a bit cumbersome if an application that uses serf has to
wait for all callbacks, collect the certificates, and reconstruct the chain?
Regards,
Andre
I'm going to evaluate the certificate chain API, and (assuming all
looks good) include that into an upcoming 1.1.0 release. Note the
version bump to 1.1, in order to add the new API. You'll eventually
want to make AOO require serf 1.1.x once I release that version.
Cheers,
-g