]> git.saurik.com Git - apple/security.git/blobdiff - sslViewer/sslEcdsa.cpp
Security-59306.101.1.tar.gz
[apple/security.git] / sslViewer / sslEcdsa.cpp
index 1ac49397a0752462236118a6232a59a29039abe4..b45ae859a0b8d4980c45c41e2f91fc88b3887331 100644 (file)
@@ -27,7 +27,7 @@
 #include <sys/param.h>
 
 #if NO_SERVER
 #include <sys/param.h>
 
 #if NO_SERVER
-#include <securityd/spi.h>
+#include "keychain/securityd/spi.h"
 #endif
 
 
 #endif
 
 
@@ -380,6 +380,8 @@ static int doSslPing(
         * Set up a SecureTransport session.
         * First the standard calls.
         */
         * Set up a SecureTransport session.
         * First the standard calls.
         */
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
        ortn = SSLNewContext(false, &ctx);
        if(ortn) {
                printSslErrStr("SSLNewContext", ortn);
        ortn = SSLNewContext(false, &ctx);
        if(ortn) {
                printSslErrStr("SSLNewContext", ortn);
@@ -436,43 +438,6 @@ static int doSslPing(
                }
        }
 
                }
        }
 
-#if 0
-       if(testParams->keychain) {
-               char kcPath[2000];
-               const char *lbd = getenv("LOCAL_BUILD_DIR");
-               if(lbd == NULL) {
-                       printf("WARNING: no LOCAL_BUILD_DIR env var faound\n");
-                       lbd = "";
-               }
-               snprintf(kcPath, 2000, "%s/%s", lbd, testParams->keychain);
-               SecKeychainRef kcRef = NULL;
-               CFArrayRef certArray = getSslCerts(kcPath,
-                       false,          // encryptOnly
-                       false,          // completeCertChain
-                       NULL,                   // anchorFile
-                       &kcRef);
-               if(kcRef) {
-                       /* Unlock it */
-                       ortn = SecKeychainUnlock(kcRef,
-                               strlen(testParams->kcPassword), testParams->kcPassword,
-                               true);
-                       if(ortn) {
-                               cssmPerror("SecKeychainUnlock", ortn);
-                               /* oh well */
-                       }
-                       CFRelease(kcRef);
-               }
-               if(certArray == NULL) {
-                       printf("***WARNING no keychain found at %s\n", kcPath);
-               }
-               ortn = SSLSetCertificate(ctx, certArray);
-               if(ortn) {
-                       printSslErrStr("SSLSetAllowAnyRoot", ortn);
-                       goto cleanup;
-               }
-               CFRelease(certArray);
-       }
-#endif
     do {
                ortn = SSLHandshake(ctx);
     } while (ortn == errSSLWouldBlock);
     do {
                ortn = SSLHandshake(ctx);
     } while (ortn == errSSLWouldBlock);
@@ -544,6 +509,8 @@ static int doSslPing(
 
     ortn = SSLClose(ctx);
 
 
     ortn = SSLClose(ctx);
 
+#pragma clang diagnostic pop
+
 cleanup:
        if(sock) {
                endpointShutdown(sock);
 cleanup:
        if(sock) {
                endpointShutdown(sock);