How to find out what OSStatus -9809 means!?

Discussion in 'iOS Programming' started by chrono1081, May 4, 2015.

  1. chrono1081, May 4, 2015
    Last edited: May 4, 2015

    chrono1081 macrumors 604

    chrono1081

    Joined:
    Jan 26, 2008
    Location:
    Isla Nublar
    #1
    Hi guys,

    I've been searching over an hour and cannot find anywhere online (and yes I checked StackOverflow) or in the Xcode docs what OSStatus -9809 means and I'm ready to rip my hair out.

    Does anyone have any idea how to find this or what it means?

    I'm trying to use this example: https://developer.apple.com/library/ios/documentation/Security/Conceptual/CertKeyTrustProgGuide/iPhone_Tasks/iPhone_Tasks.html#//apple_ref/doc/uid/TP40001358-CH208-SW9

    For encrypting and decrypting data and run into this error on decrypt and can't figure out what it means to try and fix it.

    This line of code is what causes the error to return:

     
  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    That error is in Security/SecureTransport.h but its meaning seems not very informative.

    errSSLCrypto = -9809, /* underlying cryptographic error */
     
  3. subsonix macrumors 68040

    Joined:
    Feb 2, 2008
    #3
    Apple should provide a strerror like function for the OSStatus codes. :)
     
  4. chrono1081 thread starter macrumors 604

    chrono1081

    Joined:
    Jan 26, 2008
    Location:
    Isla Nublar
    #4
    Thanks guys! It gave me enough info to get started searching.

    I can't tell you how much I hate trying to figure out RSA Encryption :mad:

    PhoneyDeveloper can I ask how you discovered where that error message was so I know how to find them in the future?
     
  5. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #5
    Usually I just search in Frameworks in my project in Xcode. That gave no results however.

    You mentioned encryption and I guessed this comes from Security.framework. I opened Security.h in Xcode. In the breadcrumb at the top of the editor window I saw Security.framework and could choose each of the header files one by one and I searched in each one till I found the match.

    Probably if I had Security.framework in my project it would have found the result.

    Almost all the errors are in a header somewhere. Because Xcode hides all the headers inside its own package they're not available from a spotlight search.
     

    Attached Files:

  6. chrono1081 thread starter macrumors 604

    chrono1081

    Joined:
    Jan 26, 2008
    Location:
    Isla Nublar
    #6
    Thanks! That's why I couldn't find it originally I was only including the #include <Security/Security.h> header but after adding it to my project then I was able to find the error through searching.
     

Share This Page