X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/5c19dc3ae3bd8e40a9c028b0deddd50ff337692c..7e6b461318c8a779d91381531435a68ee4e8b6ed:/OSX/libsecurity_cryptkit/lib/ckutilities.c diff --git a/OSX/libsecurity_cryptkit/lib/ckutilities.c b/OSX/libsecurity_cryptkit/lib/ckutilities.c index bbbe252b..6a40a06f 100644 --- a/OSX/libsecurity_cryptkit/lib/ckutilities.c +++ b/OSX/libsecurity_cryptkit/lib/ckutilities.c @@ -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; isign); 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; isign); 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; in[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,