Problem solved. The issue was coming from the way OCSP signing certificate ASN.1 data wass written in OCSP response. I corrected it and now X509Chain is building the chain and checking revocation properly.