ghidinelli / cfpayment

ColdFusion payment processing library makes plumbing e-commerce apps easy. Charging credit cards has never been easier. Inspired by Ruby's ActiveMerchant.
Other
90 stars 54 forks source link

the trustAnchors parameter must be non-empty #28

Closed JamoCA closed 8 years ago

JamoCA commented 8 years ago

In early Feb 2016, We updated to the latest Windows 2012 updates and CFPayment quit working (it's actually more of an Adobe bug). We use ColdFusion 10,0,17,295085 (Java 1.8.0_66) and the latest CFPayments + Stripe and started getting this error:

I/O Exception: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

getSuccess() is false. getStatusCode() returns "99" (This status indicates an exception we don't know how to handle (yet)), but getMessage() returns an empty string... no message. So the customer (and developer) don't have any idea regarding what happened.

My personal workaround for this is going to be to rewrite base.cfc to use CFX_HTTP5 so that it will continue to work regardless of the version of ColdFusion or third-party SSL Certificate used. Let me know if you are interested and I can provide you with the modified template.

ghidinelli commented 8 years ago

James - can you tell me specifically what problem you're running into? I'm on CF10 with Stripe and don't have any problems. AFAIK, cfpayment works on Railo and cfx_http5 would break that (not to mention Linux compatibility) so it probably won't work as a general solution.

JamoCA commented 8 years ago

The doHttpCall function was failing with the above posted error message. It worked, but then after installing a recent Windows patches (and not changing any CF settings or code), it started throwing the above error. We didn't encounter this issue on other CF10 servers. I modified the script to work with CFX_HTTP5 and it has been working well.

Even if this modification wouldn't be compatible w/Railo or Linux, it could benefit CF9 servers as some of the gateway providers move to TLS1.2 (which doesn't work w/CF9.).

JamoCA commented 8 years ago

I think Windows automatically updated JRE to 1.8.0_71 (or Sun did it). It looks like the JRE directory we had configured (jre1.8.0_66) was automatically removed during the new JRE version. We don't recall manually updating the JRE during the last week. (I did notice that some ciphers are disabled in .71.)

After updating the Java path to the new JRE (that we don't have any record of installing), the CFPayment API is working properly again.

ghidinelli commented 8 years ago

No JRE would definitely be a problem. ;) Glad to hear it's working again! We just updated to _72 a few days back and it's working well on CF10.