NSURLRequest HTTPS problems - iphone - iphone

I am creating an NSURLMutableRequest and setting HTTP methods and content-types and such. All was working fine until my last compile. I now get this in the Console, but the app doesn't crash:
CODE:
Internal error.
Exception from other package:
javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
and then the program continues. Code can be posted if you need it. The URL I am contacting is:
https://apps.quickbooks.com/j/AppGateway
This is VERISIGN not some Joe Blow make-your-own SSL cert.
Thanks guys!

Should have researched. QBOE XML processor is down.

Related

APNS Handshake Failure from Scala

I'm trying to send a push notification to apple device (iphone) using Scala, and Notnoop APNS, but when i ran this code:
import com.notnoop.apns._
val service = APNS.newService().withCert("certfile.p12", "passphrase").withAppleDestination(true).build()
service.start()
val payload = APNS.newPayload().alertBody("nomnomnom").sound("default")
service.push("deviceToken", payload.build())
service.stop()
i always stuck on this, ssl handshake error:
Thread-20, handling exception: javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
based on this question, i may have invalid certificate, but I'm sure this certificate works, because using this PHP sample, i can send a push notification correctly.
Any idea where's my process gone wrong?

javax.xml.ws.soap.SOAPFaultException: Could not send Message - at JaxWsClientProxy.invoke - caused by HTTP response code: 401 for URL

I moved a working code from dev to test and encountered the following error(s) in test:
javax.xml.ws.soap.SOAPFaultException: Could not send Message.
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:143)
......
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:472)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:302)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:123)
at $Proxy739.copyIntoItems(Unknown Source)
Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: http://<sharepointportal>/_vti_bin/Copy.asmx
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2046)
Environment specs:
Java 1.6
Tomcat 6
Eclipse Helios
Maven2
CXF 2.2.3
As a background work, tried to explore about the error in similar category
bad URL (ruled out as i am using same URL in dev and test. and the url, userid, password are all accessible from both the machines),
connection timeout( error is not 404 or it doesnt specify connection timed out... it says 401 response code for url)
Checked if all the jars and same versions are included in the test environment.
Can someone shed some light to understand and resolve the error?
please let me know if any more details are to be included.
401 is an authentication error.
Authentication fails either at the destination URL http:///_vti_bin/Copy.asmx (3 slashes ?) or on a forward proxy on the way.
Are you connecting to _vti_bin via a proxy in test ?

iPhone Enterprise App Distribution - Internet Connection Required?

I am trying to distribute my Enterprise Application using the method described in the Apple documentation listed here: http://developer.apple.com/library/ios/#featuredarticles/FA_Wireless_Enterprise_App_Distribution/Introduction/Introduction.html
I am hitting the specially crafted itms-services URL, and it prompts me to install my application. If I say yes, the application icon appears and it says "Loading..." and it never finishes. I can hit my ipa file from the plist if I just bring up Safari and manually navigate to the URL. I checked the device log and saw the following errors:
Oct 8 16:28:08 unknown imagent[23] : [Warning] Async loading of bag failed: Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo=0x1ed337c0 {NSErrorFailingURLStringKey=http://init.ess.apple.com/WebObjects/VCInit.woa/wa/getBag?ix=1, NSErrorFailingURLKey=http://init.ess.apple.com/WebObjects/VCInit.woa/wa/getBag?ix=1, NSLocalizedDescription=The request timed out., NSUnderlyingError=0x1ed32a00 "The request timed out."}
Oct 8 16:28:08 unknown imagent[23] : [Warning] Bag loading failed! Error (NSURLErrorDomain:-1001): The request timed out. http://init.ess.apple.com/WebObjects/VCInit.woa/wa/getBag?ix=1
I'm not sure if it's related, but my iOS device is on a closed network with no Internet connectivity. Does anyone have any experience with this and know if the iOS device's inability to reach this URL could be what is making my app install hang in the "Loading..." stage?
Thanks for any help you can provide.
Yes, your device needs to have access to the internet. iOS reaches out to Apple to verify that your developer certificate and profile are valid.

Web Services and X509

I am getting following error in my web service when using x509 Certificate to authenticate the client.
X509Certificate2 Clnt = new X509Certificate2 (HttpContext.Current.Request.ClientCertificate.Certificate);
The error is
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Security.Cryptography.CryptographicException: m_safeCertContext is an invalid handle.
at System.Security.Cryptography.X509Certificates.X509Certificate.get_Issuer()
at Service.HelloWorld() in c:\MyWorkSpace\SecuredWS\App_Code\Service.cs:line 40
--- End of inner exception stack trace
Can any one put some light on it as why i am getting m_safeCertContext as null.
Regars
Finally, We solved this issue. If anyone interested to know i can put resolution here.

How do I enable more handshake ciphers in CFStream?

When running the method:
CFReadStreamSetProperty(theReadStream, kCFStreamPropertySSLSettings (CFDictionaryRef)tlsPacket->tlsSettings);
To secure the connection of a CFReadStream, my iphone client returns the error:
Error Domain=kCFStreamErrorDomainSSL Code=-9824 "Operation could not be completed. (kCFStreamErrorDomainSSL error -9824.)"
and the server sends the error:
ERROR [STDERR] javax.net.ssl.SSLHandshakeException: no cipher suites in common
Is there any way to allow CFReadStream to use additional ciphers during the handshake process?
For anyone else who runs into this problem:
It turns out that the problem was on the server side. If you run into this issue yourself I would urge you to check that the handshake on the server side is working properly.