Using secure tranport for making ssl connection with server using iPhone
HI all,
I need to estabilish a secured connection using tcp with sslv3 to the server. I tried using
[inputStream setProperty:NSStreamSocketSecurityLevelKey forKey:NSStreamSocketSecurityLevelSSLv3];
[outputStream setProperty:NSStreamSocketSecurityLevelKey forKey:NSStreamSocketSecurityLevelSSLv3];
I have explained the problem in detail in the following link
http://www.iphonedevsdk.com/forum/iphone-sdk-development/25721-creating-ssl-conn ection-using-sockets.html
But it makes only a tcp connection wth the server and the server sends the "Connection Reset by peer " error.
So I have planned to use Secure Tranport. But i didnt find a suitable sample code in the internet. I found a sample in apple 's docs. But thats too confusing. Any sample code available for making tcp with ssl connection with the server ????
Regards,
Mohammed Sadiq.
You must select if you use certificates for the SSL.
If you are not, here is an example
// server is the ip address for the server and hostport the port to use
CFReadStreamRef readStream = NULL;
CFWriteStreamRef writeStream = NULL;
CFStreamCreatePairWithSocketToHost(kCFAllocatorDefault, (CFStringRef ) server, hostport, &readStream, &writeStream);
if (readStream && writeStream) {
CFReadStreamSetProperty(readStream, kCFStreamPropertyShouldCloseNativeSocket , kCFBooleanTrue);
CFWriteStreamSetProperty(writeStream, kCFStreamPropertyShouldCloseNativeSocket, kCFBooleanTrue);
iStream = (NSInputStream *)readStream;
[iStream retain];
[iStream setDelegate:self];
oStream = (NSOutputStream *)writeStream;
[oStream retain];
[oStream setDelegate:self];
if (Iwill_use_ssltoday == true)
int res1 = [iStream setProperty:NSStreamSocketSecurityLevelNegotiatedSSL forKey:NSStreamSocketSecurityLevelKey];
int res2 = [oStream setProperty:NSStreamSocketSecurityLevelNegotiatedSSL forKey:NSStreamSocketSecurityLevelKey];
NSLog(@"SEC TEST %d %d",res1,res2);
NSDictionary *settings = [[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithBool:YES], kCFStreamSSLAllowsExpiredCertificates,
[NSNumber numberWithBool:YES], kCFStreamSSLAllowsAnyRoot,
[NSNumber numberWithBool:NO], kCFStreamSSLValidatesCertificateChain,
kCFNull,kCFStreamSSLPeerName,
// kCFStreamSocketSecurityLevelTLSv1, kCFStreamSSLLevel,
nil];
CFReadStreamSetProperty((CFReadStreamRef)iStream, kCFStreamPropertySSLSettings, (CFTypeRef)settings);
CFWriteStreamSetProperty((CFWriteStreamRef)oStream, kCFStreamPropertySSLSettings, (CFTypeRef)settings);
[iStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
[iStream open];
[oStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
[oStream open];
if (readStream)
CFRelease(readStream);
if (writeStream)
CFRelease(writeStream);
Similar Messages
-
ERROR http: 5: Unable to initialize ssl connection with server, aborting co
HI EXPERTS,
one of my database give me below error when i start its dbconsole. and after failure it give me meassge
TZ set to Asia/Karachi
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://test:5500/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control ..............................................................
........ failed.
Logs are generated in directory /u01/oracle/product/10.2/cnichol_cpuplt/sysman/log
and in trace file name "emdctl.trc" below error is logged.
ERROR http: 5: Unable to initialize ssl connection with server, aborting connection attempt
ERROR ssl: nzos_Handshake failed, ret=29024
and trace file named "emagent.trc" give below error
2010-10-04 19:12:25 Thread-88238992 ERROR http: 11: Unable to initialize ssl connection with server, aborting connection attempt
2010-10-04 19:12:25 Thread-88238992 ERROR pingManager: nmepm_pingReposURL: Cannot connect to https://test:5500/em/upload/: retStatus=-1
2010-10-04 19:12:38 Thread-88238992 ERROR upload: Error in uploadXMLFiles. Trying again in 300.00 seconds.
dbconosle URL is
https://test:5500/em/console/aboutApplication
Operating system is Redhat linux AS 5.3
what is the possible cause of this failure any one can guide me.
thanx in Advance
regards,
Edited by: AMIABU on Oct 4, 2010 7:28 AMoracle@bcm-laptop:~$ emctl
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
Oracle Enterprise Manager 10g Database Control commands:
emctl start | stop dbconsole
emctl status | secure | setpasswd dbconsole
emctl config dbconsole -heap_size <size_value> -max_perm_size <size_value>
emctl status agent
emctl status agent -secure [-omsurl <http://<oms-hostname>:<oms-unsecure-port>/em/*>]
emctl getversion
emctl reload | upload | clearstate | getversion agent
emctl reload agent dynamicproperties [<Target_name>:<Target_Type>]....
emctl config agent <options>
emctl config agent updateTZ
emctl config agent getTZ
emctl resetTZ agent
emctl config agent credentials [<Target_name>[:<Target_Type>]]
emctl gensudoprops
emctl clearsudoprops
Blackout Usage :
emctl start blackout <Blackoutname> [-nodeLevel] [<Target_name>[:<Target_Type>]].... [-d <Duration>]
emctl stop blackout <Blackoutname>
emctl status blackout [<Target_name>[:<Target_Type>]]....
The following are valid options for blackouts
<Target_name:Target_type> defaults to local node target if not specified.
If -nodeLevel is specified after <Blackoutname>,the blackout will be applied to all targets and any target list that follows will be ignored.
Duration is specified in [days] hh:mm
emctl getemhome
emctl ilint
Em Key Commands Usage :
emctl config emkey -emkeyfile <emkey.ora path> [-force] [-sysman_pwd <sysman password>]
emctl config emkey -emkey [-emkeyfile <emkey.ora path>] [-force] [-sysman_pwd <sysman password>]
emctl config emkey -repos [-emkeyfile <emkey.ora path>] [-force] [-sysman_pwd <sysman password>]
emctl config emkey -remove_from_repos [-sysman_pwd <sysman password>]
emctl config emkey -copy_to_repos [-sysman_pwd <sysman password>]
emctl status emkey [-sysman_pwd <sysman password>]
Secure DBConsole Usage :
emctl secure dbconsole -sysman_pwd <sysman password> [-passwd_file <abs file loc>]
[-host <slb hostname>] [-sid <service name>] [-reset] [-secure_port <secure_port>]
[-root_dc <root_dc>] [-root_country <root_country>] [-root_state <root_state>] [-root_loc <root_loc>]
[-root_org <root_org>] [-root_unit <root_unit>] [-root_email <root_email>]
[-wallet <wallet loc>] [-wallet_pwd <wallet pwd>] [-trust_certs_loc <certs loc>]
emctl secure status dbconsole
Register Targettype Usage :
emctl register oms targettype [-o <Output filename>] <XML filename> <rep user> <rep passwd> <rep host> <rep port> <rep sid> OR
emctl register oms targettype [-o <Output filename>] <XML filename> <rep user> <rep passwd> <rep connect descriptor> -
Errror during SSL connection with LDAP using JNDI APIs
Hello,
I have established a client and server certificates cert.arm for LDAP server and client. On client i have created a client.kdb file and on server server.kdb file both containing cert.arm. whwn i give a request
C:\Program Files\IBM\LDAP\bin>ldapsearch -b "o=ibm,c=us" -h 9.182.174.71 -p 636 -D cn=roo
-w root1 -Z -K "C:\Program Files\ibm\ldap\etc\client.kdb" -P client -s sub cn=s* cn sn
it gave me proper results
but using a JNDI API where i specify
Hashtable env = new Hashtable(11);
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
// Specify LDAPS URL
env.put(Context.PROVIDER_URL, "ldap://"+"9.182.174.71:636");
// Authenticate as S. User and password "mysecret"
env.put(Context.SECURITY_PROTOCOL, "ssl");
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, "cn=root1");
env.put(Context.SECURITY_CREDENTIALS, "root1");
DirContext ctx = new InitialDirContext(env);
SearchControls constraintssc=new SearchControls();
constraintssc.setSearchScope(SearchControls.SUBTREE_SCOPE);
// performing the search
NamingEnumeration results=ctx.search("o=ibm,c=us","cn=s*",constraintssc);
////etc.........
Its gives me an exception saying that
javax.naming.CommunicationException: simple bind failed: 9.182.174.71:636. Root
exception is javax.net.ssl.SSLHandshakeException: Couldn't find trusted certificate
Could any body help me out on this
Thank YouYou are attempting to authenticate via an SSL connection to port 636.
The message 'couldn't find trusted certificate' means that your client doesn't trust the certificate it has received from the LDAP server.
In order to establish that trust, you must export a certificate file from the LDAP server, then use Java's keytool.exe to create a keystore file using that certificate. Then your client code must reference that keystore file that you've created.
So essentially, you have to provide your program the LDAP server's credentials. "If the server's certificate looks like this, then you can trust it."
After your program trusts the certificate it receives from the server at runtime, your connection will authenticate. -
Hi,
I just want to know,
What version of SQL Server support ssl connection with TLS. 1.2 (SHA-256 HASH).
if support already,
how can i setting.
plz. help me!!!The following blog states that SQL Server "leverages the SChannel layer (the SSL/TLS layer provided
by Windows) for facilitating encryption. Furthermore, SQL Server will completely rely upon SChannel to determine the best encryption cipher suite to use." meaning that the version of SQL Server you are running has no bearing on which
encryption method is used to encrypt connections between SQL Server and clients.
http://blogs.msdn.com/b/sql_protocols/archive/2007/06/30/ssl-cipher-suites-used-with-sql-server.aspx
So the question then becomes which versions of Windows Server support TLS 1.2. The following article indicates that Windows Server 2008 R2 and beyond support TLS 1.2.
http://blogs.msdn.com/b/kaushal/archive/2011/10/02/support-for-ssl-tls-protocols-on-windows.aspx
So if you are running SQL Server on Windows Server 2008 R2 or later you should be able to enable TLS 1.2 and install a TLS 1.2 certificate. By following the instructions in the following article you should then be able to enable TLS 1.2 encryption
for connections between SQL Server and your clients:
http://support.microsoft.com/kb/316898
I hope that helps. -
Is there a way to turn the wireless capabilities off on an AirPort Express? I have an AirPort Extreme as my main router and use the express to just extend it. I only really want to you use the express for hard ethernet connections. For whatever reason when I have my express extend my wifi at home the download speed from just the express is absolutely terrible, drops to about 1.5 mb compared to when it's on the extremes part of the network the speed goes up to 50-75mb. These terrible download speed really only affects the iPhones as my MacBook Pro usually gets the good speed no matter where it is. I don't believe there is anything wrong with my phone because if I am in the part of the house that uses just the extreme the download speeds on the iphone goes up to 50-75mb. As a note I have an AirPort Extreme on the top floor of my house (second floor) that's where my modem is located. On the first floor that's where one airport express is located. I also have another airport express in the basement that is accessed by my landlord. Any thoughts on how to fix this would be helpful.
Is there a way to turn the wireless capabilities off on an AirPort Express? I have an AirPort Extreme as my main router and use the express to just extend it. I only really want to you use the express for hard ethernet connections.
It appears that your networking goals with the AirPort Express is to use it as a wireless Ethernet bridge instead of using it to extend the wireless range of your AirPort Extreme. The latter requires that the Express Wi-Fi radios be enabled.
If you intended to use the Express as a wireless bridge, you just need to reconfigure it to "Join a wireless" network instead of "Extend a wireless network."
For whatever reason when I have my express extend my wifi at home the download speed from just the express is absolutely terrible, drops to about 1.5 mb compared to when it's on the extremes part of the network the speed goes up to 50-75mb.
In an extended network, the placement of the extending base station is critical as it can only extend the wireless network at the bandwidth at which it receives it.
Please check out the following AirPort User Tip for details on optimal base station placement. -
I can no longer connect with others using FaceTime after the mandatory update
I updated my iPad software and now when I try to connect with someone using FaceTime I can never fully connect.
Can anyone help me or seen this issue?Unable to make or receive FaceTime calls after April 16, 2014
http://support.apple.com/kb/TS5419
Using FaceTime http://support.apple.com/kb/ht4319
Troubleshooting FaceTime http://support.apple.com/kb/TS3367
The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
http://tinyurl.com/a7odey8
Troubleshooting FaceTime and iMessage activation
http://support.apple.com/kb/TS4268
iOS: FaceTime is 'Unable to verify email because it is in use'
http://support.apple.com/kb/TS3510
Using FaceTime and iMessage behind a firewall
http://support.apple.com/kb/HT4245
iOS: About Messages
http://support.apple.com/kb/HT3529
Set up iMessage
http://www.apple.com/ca/ios/messages/
iOS and OS X: Link your phone number and Apple ID for use with FaceTime and iMessage
http://support.apple.com/kb/HT5538
How to Set Up & Use iMessage on iPhone, iPad, & iPod touch with iOS
http://osxdaily.com/2011/10/18/set-up-imessage-on-iphone-ipad-ipod-touch-with-io s-5/
Set Up Alert Sounds
http://www.quepublishing.com/articles/article.aspx?p=1873027&seqNum=3
Extra FaceTime IDs
http://tinyurl.com/k683gr4
Troubleshooting Messages
http://support.apple.com/kb/TS2755
Troubleshooting iMessage Issues: Some Useful Tips You Should Try
http://www.igeeksblog.com/troubleshooting-imessage-issues/
Setting Up Multiple iOS Devices for iMessage and Facetime
http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
FaceTime and iMessage not accepting Apple ID password
http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
Fix Can’t Sign Into FaceTime or iMessage iOS 7
http://ipadtutr.com/fix-login-facetime-imessage-ios-7/
FaceTime, Game Center, Messages: Troubleshooting sign in issues
http://support.apple.com/kb/TS3970
Unable to use FaceTime and iMessage with my apple ID
https://discussions.apple.com/thread/4649373?tstart=90
iOS 7 allows you to block phone numbers or e-mail addresses from contacting you via the Phone, FaceTime, or Messages
http://howto.cnet.com/8301-11310_39-57602643-285/you-can-block-people-from-conta cting-you-on-ios-7/
How to Block Someone on FaceTime
http://www.ehow.com/how_10033185_block-someone-facetime.html
My Facetime Doesn't Ring
https://discussions.apple.com/message/19087457#19087457
How to watch FaceTime calls on the big screen with Apple TV
http://www.imore.com/daily-tip-ios-5-airplay-mirroring-facetime
Send an iMessage as a Text Message Instead with a Quick Tap & Hold
http://osxdaily.com/2012/11/18/send-imessage-as-text-message/
To send messages to non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
How to Send SMS from iPad
http://www.iskysoft.com/apple-ipad/send-sms-from-ipad.html
How to Receive SMS Messages on an iPad
http://yourbusiness.azcentral.com/receive-sms-messages-ipad-16776.html
Apps for Texting http://appadvice.com/appguides/show/apps-for-texting
You can check the status of the FaceTime/iMessage servers at this link.
http://www.apple.com/support/systemstatus/
Cheers, Tom -
My ipod touch 4th generation's audio jack is no longer making a connection with my headphones, i dont think my ipod is under warranty and therefor would i be able to pay apple to fix my ipod.
If not under warranty,
Apple will exchange your iPod for a refurbished one for $199 for 64 GB 4G and $99 for the other 4Gs. They do not fix yours.
Apple - iPod Repair price
A third-party place like the following will replace the jack for less less. Google for more.
iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens
Replace the jack yourself if you are up to it
iPod Touch Repair – iFixit -
I purchased a new Windows 8 PC and I use Outlook 2010 for my calendar. With my old Windows 7 PC and Outlook 2010, my calendar would sync with my Iphone 5, but with the new Windows 8 PC and Outlook 2010, it does not, and I can't figure out how to snyc them. The emails from Outlook 2010 sync, but the calendar does not. Help! Thanks.
Easy solution for restoring lost calendar informaiton, thank goodness. On your iPhone, go to settings, then to iCloud. If your Calendar selection is turned off, turn it on. Your info should restore. If your Calendar selection is turned on, then turn it off. Choose to save calendars when asked. After it shuts the Calendar off, turn it back on. Your info should be restored.
Thank you to Apple support for walking me through this. Shame on you Apple for not just telling people about this easy fix rather than making us go through all of this pain and worry.
- JT -
I have a ipad 2 and it does not connect with safari using 3G
I have a ipad 2 and it does not connect with safari using 3G
Sorry to hear you are having issues, but there are 2 ways you can print from that device.
The first one is to simply email photos or documents to your printers email address by attaching them to a new message.
The other option is to download the HP ePrint Home and Biz app from Google Play. The app is free and should allow you to print pictures and documents to the printer with ease. I have added a link below on how to get started with this app.
http://h10025.www1.hp.com/ewfrf/wc/document?docname=c01616126&lc=en&cc=us&dlc=en&product=3857218
Jon-W
I work on behalf of HP
Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
Click the KUDOS STAR on the left to say “Thanks” for helping! -
Problem when making new connection with user "sys"
Hi, I'm having trouble on making new connection with user sys against local 10g installation, the password is correct and I've tried making new connection with other
users which is fine.
when I click "test" or "connect", the error msg is strange like this:
"ORA-01017: invalid username/password; logon denied"
can anybody help.
Thx.Have you used the "Role" drop-down to "SYSDBA"? - if not, you get the ORA-01017 error.
-
Do we need to create two zones for Two HBA for a host connected with SAN ?
Hi,While creating Zone , Do we need to create two zones for Two HBA for a host connected with SAN ? Or a zone is enough for
a host which having Two HBAs...We have two 9124s for our SAN fabric...
As I found like one zone below, I little bit confused that , if a host having two HBA connected with SAN, should I expect two zones for every Host?
from the zone set, I gave the command show zoneset
zone name SQLSVR-X-NNN_CX4 vsan 1
pwwn 50:06:NN:NN:NN:NN:NN:NN
pwwn 50:06:NN:NN:NN:NN:NN:NN
pwwn 10:00:NN:NN:NN:NN:NN:NN
But I found only one zone for the server's HBA2:by the same time in the fabric I found switches A & B showing the WWNs of those HBAs on its
connected N port...Its not only for this server alone, but for all hosts..Can you help me to clarify on this please..that should we need to create one zone for
one HBA?if u have two independent fabrics between hosts and storage, i think the below confs are recommended.
Scenario 1: 2 HBAs single port each ( redundancy across HBA / Storage port )
HBA1 - port 0 ---------> Fabric A ----------> Storage port ( FAx/CLx )
HBA2 - port 0 ---------> Fabirc B ----------> Storage port ( FAy/CLy )
Scenario 2: 2 HBAs of dual port each
HBA1 - port 0 -------> Fabric A ---------> Storage port ( FAx/CLx )
HBA2 - port0 ---------> Fabric A ---------> Storage port ( FAs/CLs )
HBA1 - port 1 --------> Fabric A --------> Storage port ( FAy/CLy )
HBA2 - port 1 ---------> Fabric B --------> Storage port ( FAt/CLt )
the zone which is in your output is VSAN 1. if its a production VSAN, Cisco doesn't recomends to use VSAN 1 ( default vsan ) for production. -
Hi helpers I have very old MacBook Mac OS X 10.5.8 please could you tell me what operating system I should get to be able fully use my laptop as i cant use it properly anymore and doesnt connect with my Iphones etc thanks
Josejanko,
You don't supply much info other than your machine is old, so here is some info for you to check thru.
Before doing anything you should have a back up, preferably 2, in the event something goes wrong.
You would have to start by upgrading to Snow Leopard, you would need to buy the disk for about $20 here http://store.apple.com/us/product/MC573Z/A/mac-os-x-106-snow-leopard
Check the the requirements to see if your machine meets them.
You would then need to run the 10.6.8 v1.1 combo update to get it to 10.6.8 Mac OS X 10.6.8 Update Combo v1.1
You can then access the APP STORE and possibly upgrade to to further OSX.
You may have applications that will not be compatible with any thing past Snow Leopard, you can check those here Upgrading to 10.7 and above, don't forget Rosetta!
http://roaringapps.com/apps
Office 2008 will not work with anything newer than Snow Leopard for an wxample
You may be able to upgrade to Lion or MT Lion or Yosemite, depending on your machine, from the APP STORE.
OS X Lion - Technical Specifications Lion
http://store.apple.com/us/product/D6377Z/A/os-x-mountain-lion Mountain Lion
http://www.apple.com/osx/how-to-upgrade/ Yosemite
Hope this helps you -
ITunes cannot establish secure connection with server
Why am I not able to establish secure connection with server?
Hi,
We support IMAP (yahoo/gmail/hotmail), I apologize for the inconvenience.
Best regards,
Michelle -
Can I connect with Database using Session Bean
Hi,
I am new to EJB. I have small doubt.
can I connect with Database using Session Bean.
Regards,
Murali.Double post of http://forum.java.sun.com/thread.jspa?threadID=687239&tstart=0
-
Can I use a USB for 2nd generation shuffle with a 3rd generation shuffle
Can I use a USB for 2nd generation shuffle with a 3rd generation shuffle?
Seems to be a good fit, but my computer doesn't seem to recognise it.GreenApple5315 wrote:
Can you use a 3rd gen charger with a 2nd gen Shuffle?
By "3rd gen charger" are you referring to the USB cable with the
4 ring audio connector on the other end?
If so, the answer is again NO...
Maybe you are looking for
-
Importing clips from iMovie project (they keep ending up in the trash)
I have never tried to import other clips from another iMovie project before and I just tried it yesterday. This is what I did: -I went into the other project and clicked on each individual clip from that project that I wanted (one at a time). -I copi
-
Multiple processes accessing a replicated database
Hi I am after some help with multiple processes and replicated databases. I have a primary and secondary database replicated across a pair of servers and this seems to be working well. I'm trying to run another process on one of the machines that ope
-
Running QuickTime files with no QuickTime player installed
I export keynote files into QuickTime format, but most of my audience might not have QuickTime installed. Is it possible that I somehow create a file that can automatically play that file without having the actual QuickTime player installed? So the p
-
How to create and remove package in Jdev project
hi, I created a package for all my utils, then I import that package into my project, manually by inserting import myutils.*, somehow the other package can see it, then I tried importing this same package by the wizard tool, I have a conflict message
-
Hi All Can anyone tell me if we can find out from a tcode which are the tables it is accessing. For example if we take SU01 as an example. Can we find out which are the tables this t code is reading / updating. Thanks