Note that there are some explanatory texts on larger screens.

plurals
  1. POCocoa, Stomp, ActiveMQ, iPhone, SSL, & AsyncSocket Help Needed
    primarykey
    data
    text
    <p>Well, maybe not with all 4 things, but here's my situation:</p> <p>I have an ActiveMQ backend (running on my desktop Mac). It's a stock Apache ActiveMQ server I have which I am basically using as an echo server to tail the logs and debug my client. The client is an iPhone project with a hacked up Stomp.framework implementation using AsyncSocket.</p> <p>I need to use AsyncSocket Cocoa library to talk to the Stomp server, which I more or less have working. I can send messages to queues, and read them back out, so I think I am good there.</p> <p>BUT, when I try to set everything up to use SSL (also a requirement) I get the following error description out of the NSError object I get back:</p> <pre><code>kCFStreamErrorDomainSSL error -9812. </code></pre> <p>I cannot for the life of me figure out what this error code is. Anyone have a clue?</p> <p>Here is how I setup the SSL stuff for AsyncSocket:</p> <p>EDIT: ADDED THE CORRECT CODE HERE. NOTE SELF-SIGNED CERTS.</p> <pre><code>//- (BOOL)onSocketWillConnect:(AsyncSocket *)sock { // Connecting to a secure server NSMutableDictionary * settings = [NSMutableDictionary dictionaryWithCapacity:2]; // Use the highest possible security [settings setObject:(NSString *)kCFStreamSocketSecurityLevelNegotiatedSSL forKey:(NSString *)kCFStreamSSLLevel]; // Allow self-signed certificates [settings setObject:[NSNumber numberWithBool:YES] forKey:(NSString *)kCFStreamSSLAllowsAnyRoot]; CFReadStreamSetProperty([sock getCFReadStream], kCFStreamPropertySSLSettings, (CFDictionaryRef)settings); CFWriteStreamSetProperty([sock getCFWriteStream], kCFStreamPropertySSLSettings, (CFDictionaryRef)settings); return YES; </code></pre> <p>}</p> <p>Anyone have any ideas? I <em>think</em> I'm setting the stream properties correctly. Maybe it's something to do with the ActiveMQ setup? I didn't do any configuration other than to enable the SSL over Stomp protocol in ActiveMQ. I don't have a certificate or anything like that. Maybe that is the problem?</p> <p>Any insight is appreciated!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload