I am getting SSL Error, while trying to communicate with the server through my iphone app - iphone

I am getting an error "An SSL error has occurred and a secure connection to the server cannot be made".
Same code is working fine while communicating with another server, i want to make sure whether the issue is due the certificate on server.

Its because of the server that you are hitting is HTTPS server. It requires an SSL check.

please check the url of the server you are communicating with , it must be using HTTPS , try using the service with HTTP.

Related

Not able to access AEM author using JcrUtils.getRepository with https

I am trying to access the repository from a standalone java application using JcrUtils.
**repository = JcrUtils.getRepository("http://localhost:4502/crx/server"); this works**
**repository = JcrUtils.getRepository("https://localhost:4502/crx/server"); this doesn't work**
Exception in thread "main" javax.jcr.RepositoryException: Unable to
access a repository with the following settings:
org.apache.jackrabbit.repository.uri: https://localhost:4502/crx/server The following
RepositoryFactory classes were consulted:
org.apache.jackrabbit.commons.JndiRepositoryFactory: declined
org.apache.jackrabbit.core.RepositoryFactoryImpl: declined
org.apache.jackrabbit.jcr2dav.Jcr2davRepositoryFactory: declined
org.apache.jackrabbit.jcr2spi.Jcr2spiRepositoryFactory: declined Perhaps the repository you are trying to access is not available at
the moment. at
org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:223)
at
org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:263)
at com.hero.jcr.util.CqHelper.getSession(CqHelper.java:20) at
com.hero.jcr.commandline.CheckConnection.getDamAssets(CheckConnection.java:36)
at
com.hero.jcr.commandline.CheckConnection.main(CheckConnection.java:29)
Thanks in advance
The problem can have different causes.
HTTPS configured and on which port
It looks like you're trying to access http and https in the same situation on the same port. Http and Https don't run on the same port in parallel.
Please use the SSL Wizard as hinted by ronnyfm to check if SSL is activated and on which port it is used: https://docs.adobe.com/content/help/en/experience-manager-65/administering/security/ssl-by-default.html
For instance the default port for https in AEM is 8443, so try https://localhost:8443 to access it, if you have configured it there.
Untrusted Certificate
Also connecting to https might not work if you use an untrusted certificate, which you need to add to the Java security keystore first. In my case I got the same "Unable to access" message, because the original exception regarding the certificate got silently swallowed in the JCR library I was using.
Wrong certificate
When you added the certificate to the keystore and it still doesn't work, check if the certificate was created for them same host you request. If you created it for bla.host, but try to access it via localhost, it also gives you the same exception, while the original message is silently swallowed.

Can ssl handshake be established only with client certification validation instead of server certificate validation?

From my browser I want to communicate to localhost application using ssl. Here browser(which acts as client) will submit the certificate instead of localhost application(which acts as server). Can Ssl be established in this scenario? So finally it boils down to problem statement can a ssl communication be established by server validating the client certificate and client not validating the server certificate.
The SSL/TLS implementation inside the browser do not support this scenario. A server certificate is always required by the browser with SSL/TLS in order to be sure that the browser is communicating with the expected server (as specified in the URL) and not some man in the middle. Apart from that it is not clear what you want to achieve with such a setup in the first place - maybe there is a better design for your unknown use case.

docusign php soap error could not connect to host in APIService.php usiing https

I am using docusign soap api using php. when I am using url https://demo.docusign.net/api/3.0/api.asmx it is working fine, Now I live API key and using https://docusign.net/api/3.0/api.asmx, it is not working, got error - could not connect to host in APIService.php. but if i use http://docusign.net/api/3.0/api.asmx (not https) then it is working fine. Can you please tell me why we getting error when using https?
You need the sub-domain of the production server. The HTTP to HTTPS redirect is masking your issue
ex:
https://na2.docusign.net/api/3.0/api.asmx

enable http-bind on openfire

I am trying to enable BOSH connection over Openfire so that i can create a XMPP client over a web. curretly i am testing it with the strophe.js.
the problem is when i try to fire following url in a browser i am getting
http://www.mydomain.com:7070/http-bind
following error
HTTP ERROR 400
Problem accessing /http-bind/. Reason:
Bad Request
Powered by Jetty://
here is my server setting , i saw few threads but they arent helpful
update
i have made a connection using strophe but i am getting following error in browser trance
its now working in my system.
i think your error encountered may actually be a configuration issue with the openfire.
It is designed to reply with HTTP 400 Bad Request if there is no element in the request. You can test this yourself by providing a element in your query.
Try the following URL in your browser:
http://www.servername:7070/http-bind/?<body rid="1"/>
In your update Strophe is sending OPTIONS HTTP requests which means that it is negotiating cross domain communication. Requests are painted red which means that this is failing for some reason. Probably misconfiguration.
There is a nice article about that here: http://metajack.im/2010/01/19/crossdomain-ajax-for-xmpp-http-binding-made-easy/
Otherwise, when Strophe does its regular BOSH communication it uses POST method.
Your setup is correct. The page the browser displays to you is also normal. Openfires BOSH component is not designed to work in a Browser with HTTP GET, only with BOSH clients like strophe. Try to connect with strophe.
You should use proxy to repost the request to the openfire server . Because, the js post cannot support cross domain.
Notes:
1.I use jsjac , but I think it's not important .
2.If you sure your config is right , please restart you openfire server . It's my experience .
If server is properly configured it should display
HTTP ERROR: 404
Problem accessing /http-bind/. Reason:
Not Found
Powered by Jetty://
The Bad Request was gone when I uninstall and reinstall Openfire as in
here.
Below works for me, i am pinging the openfire server after some interval so, clients remains alive...
i just append "/?<body rid='1'" with the server name and i don't have 400 bad request error.
XMPPconnection.sendIQ($iq({ to: XMPPserver+"/?<body rid='1'/>", from: CurrentUserJID, type: "get" }).c('ping', { xmlns: "urn:xmpp:ping" }));

making a request using AFXMLRequestOperation in AFNetworking

After changing server to ssl ( http --> https ), I'm getting failure block executed and generating the error such as
request timed out
I know AFXMLRequestOperation is subclass of AFHTTPRequestOperation which is a subclass of AFURLConnectionOperation for requests using the HTTP or HTTPS protocols. Therefore, I thought I could get some response back from server, not the above error .
Does anybody experience it before, please help. Any comments are welcomed.
Thanks
It's possible that the ssl certificate you're using on your server is self signed or is not signed by a suitable certificate authority. I would start by investigating that, and then take steps to force your app to connect to the server even though the certificate is abnormally signed.