]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_cryptkit/lib/ckutilities.c
Security-59306.61.1.tar.gz
[apple/security.git] / OSX / libsecurity_cryptkit / lib / ckutilities.c
index bbbe252bb6c818a55018e23349468c87d795b55f..6a40a06fda5eca67972b513b340dfe426dd3bad9 100644 (file)
@@ -86,9 +86,6 @@ static const frtnItem frtnStrings[] = {
  */
 void initCryptKit(void)
 {
-       #if             GIANTS_VIA_STACK
-       curveParamsInitGiants();
-       #endif
 }
 
 /*
@@ -96,9 +93,6 @@ void initCryptKit(void)
  */
 void terminateCryptKit(void)
 {
-       #if             GIANTS_VIA_STACK
-       freeGiantStacks();
-       #endif
 }
 
 /*
@@ -154,7 +148,7 @@ void printGiant(const giant x)
 
        printf("sign=%d cap=%d n[]=", x->sign, x->capacity);
        for(i=0; i<abs(x->sign); i++) {
-               printf("%u:", x->n[i]);
+               printf("%lu:", (unsigned long)x->n[i]);
        }
        printf("\n");
 }
@@ -165,7 +159,7 @@ void printGiantHex(const giant x)
 
        printf("sign=%d cap=%d n[]=", x->sign, x->capacity);
        for(i=0; i<abs(x->sign); i++) {
-               printf("%x:", x->n[i]);
+               printf("%lx:", (unsigned long)x->n[i]);
        }
        printf("\n");
 }
@@ -181,7 +175,7 @@ void printGiantExp(const giant x)
 
        printf("sign=%d cap=%d n[]=", x->sign, x->capacity);
        for(i=0; i<size; i++) {
-               printf("%u ", x->n[i]);
+               printf("%lu ", (unsigned long)x->n[i]);
                if(i > 0) {
                        printf("* w^%d ", i);
                }
@@ -265,41 +259,6 @@ void printCurveParams(const curveParams *p) {}
 
 #endif /* FEE_DEBUG */
 
-#if    defined(NeXT) && !defined(WIN32)
-
-void getpassword(const char *prompt, char *pbuf)
-{
-        struct sgttyb ttyb;
-        int flags;
-        register char *p;
-        register int c;
-        FILE *fi;
-        void (*sig)(int);
-
-        if ((fi = fdopen(open("/dev/tty", 2, 0), "r")) == NULL)
-                fi = stdin;
-        else
-                setbuf(fi, (char *)NULL);
-        sig = signal(SIGINT, SIG_IGN);
-        ioctl(fileno(fi), TIOCGETP, &ttyb);
-        flags = ttyb.sg_flags;
-        ttyb.sg_flags &= ~ECHO;
-        ioctl(fileno(fi), TIOCSETP, &ttyb);
-        fprintf(stderr, "%s", prompt); fflush(stderr);
-        for (p=pbuf; (c = getc(fi))!='\n' && c!=EOF;) {
-                if (p < &pbuf[PHRASELEN-1])
-                        *p++ = c;
-        }
-        *p = '\0';
-        fprintf(stderr, "\n"); fflush(stderr);
-        ttyb.sg_flags = flags;
-        ioctl(fileno(fi), TIOCSETP, &ttyb);
-        (void)signal(SIGINT, sig);
-        if (fi != stdin)
-                fclose(fi);
-}
-#endif // NeXT
-
 /*
  * serialize, deserialize giants's n[] to/from byte stream.
  * First byte of byte stream is the MS byte of the resulting giant,