diff options
author | jbj <devnull@localhost> | 2003-04-25 19:45:10 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2003-04-25 19:45:10 +0000 |
commit | 6718ac9b84f8c3ddad6e5bb7b9716ee4cb894594 (patch) | |
tree | c6df7da5213d61682aaf3426482d2348f6852dea /rpmio | |
parent | f589bf944ec8038f716840f66ef5c064f0645661 (diff) | |
download | librpm-tizen-6718ac9b84f8c3ddad6e5bb7b9716ee4cb894594.tar.gz librpm-tizen-6718ac9b84f8c3ddad6e5bb7b9716ee4cb894594.tar.bz2 librpm-tizen-6718ac9b84f8c3ddad6e5bb7b9716ee4cb894594.zip |
beecrypt-3.0.0 merge: grand renaming, mp32number et al.
CVS patchset: 6778
CVS date: 2003/04/25 19:45:10
Diffstat (limited to 'rpmio')
-rw-r--r-- | rpmio/rpmio_internal.h | 16 | ||||
-rw-r--r-- | rpmio/rpmpgp.c | 42 | ||||
-rw-r--r-- | rpmio/tinv.c | 4 | ||||
-rw-r--r-- | rpmio/tkey.c | 32 |
4 files changed, 47 insertions, 47 deletions
diff --git a/rpmio/rpmio_internal.h b/rpmio/rpmio_internal.h index 6f5e886be..7ff30fdad 100644 --- a/rpmio/rpmio_internal.h +++ b/rpmio/rpmio_internal.h @@ -80,17 +80,17 @@ struct pgpDig_s { /* DSA parameters. */ mp32barrett p; mp32barrett q; - mp32number g; - mp32number y; - mp32number hm; - mp32number r; - mp32number s; + mpnumber g; + mpnumber y; + mpnumber hm; + mpnumber r; + mpnumber s; /* RSA parameters. */ rsapk rsa_pk; - mp32number m; - mp32number c; - mp32number rsahm; + mpnumber m; + mpnumber c; + mpnumber rsahm; }; /** \ingroup rpmio diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c index fbfa5b7d4..80ce1a85d 100644 --- a/rpmio/rpmpgp.c +++ b/rpmio/rpmpgp.c @@ -324,7 +324,7 @@ const char * pgpMpiHex(const byte *p) * @return 0 on success */ static int pgpHexSet(const char * pre, int lbits, - /*@out@*/ mp32number * mpn, const byte * p, const byte * pend) + /*@out@*/ mpnumber * mpn, const byte * p, const byte * pend) /*@globals fileSystem @*/ /*@modifies *mpn, fileSystem @*/ { @@ -348,7 +348,7 @@ fprintf(stderr, "*** mbits %u nbits %u nbytes %u t %p[%d] ix %u\n", mbits, nbits strcpy(t+ix, pgpMpiHex(p)); if (_debug) fprintf(stderr, "*** %s %s\n", pre, t); - mp32nsethex(mpn, t); + mpnsethex(mpn, t); t = _free(t); if (_debug && _print) fprintf(stderr, "\t %s ", pre), mp32println(stderr, mpn->size, mpn->data); @@ -481,7 +481,7 @@ static int pgpPrtSigParams(/*@unused@*/ pgpTag tag, byte pubkey_algo, byte sigty { switch (i) { case 0: /* m**d */ - mp32nsethex(&_dig->c, pgpMpiHex(p)); + mpnsethex(&_dig->c, pgpMpiHex(p)); if (_debug && _print) fprintf(stderr, "\t m**d = "), mp32println(stderr, _dig->c.size, _dig->c.data); /*@switchbreak@*/ break; @@ -708,7 +708,7 @@ if (_debug && _print) fprintf(stderr, "\t n = "), mp32println(stderr, _dig->rsa_pk.n.size, _dig->rsa_pk.n.modl); /*@switchbreak@*/ break; case 1: /* e */ - mp32nsethex(&_dig->rsa_pk.e, pgpMpiHex(p)); + mpnsethex(&_dig->rsa_pk.e, pgpMpiHex(p)); if (_debug && _print) fprintf(stderr, "\t e = "), mp32println(stderr, _dig->rsa_pk.e.size, _dig->rsa_pk.e.data); /*@switchbreak@*/ break; @@ -732,12 +732,12 @@ if (_debug && _print) fprintf(stderr, "\t q = "), mp32println(stderr, _dig->q.size, _dig->q.modl); /*@switchbreak@*/ break; case 2: /* g */ - mp32nsethex(&_dig->g, pgpMpiHex(p)); + mpnsethex(&_dig->g, pgpMpiHex(p)); if (_debug && _print) fprintf(stderr, "\t g = "), mp32println(stderr, _dig->g.size, _dig->g.data); /*@switchbreak@*/ break; case 3: /* y */ - mp32nsethex(&_dig->y, pgpMpiHex(p)); + mpnsethex(&_dig->y, pgpMpiHex(p)); if (_debug && _print) fprintf(stderr, "\t y = "), mp32println(stderr, _dig->y.size, _dig->y.data); /*@switchbreak@*/ break; @@ -1038,14 +1038,14 @@ void pgpCleanDig(pgpDig dig) dig->md5 = _free(dig->md5); dig->sha1 = _free(dig->sha1); - mp32nfree(&dig->hm); - mp32nfree(&dig->r); - mp32nfree(&dig->s); + mpnfree(&dig->hm); + mpnfree(&dig->r); + mpnfree(&dig->s); (void) rsapkFree(&dig->rsa_pk); - mp32nfree(&dig->m); - mp32nfree(&dig->c); - mp32nfree(&dig->rsahm); + mpnfree(&dig->m); + mpnfree(&dig->c); + mpnfree(&dig->rsahm); } /*@-nullstate@*/ return; @@ -1075,11 +1075,11 @@ pgpDig pgpFreeDig(/*@only@*/ /*@null@*/ pgpDig dig) mp32bfree(&dig->p); mp32bfree(&dig->q); - mp32nfree(&dig->g); - mp32nfree(&dig->y); - mp32nfree(&dig->hm); - mp32nfree(&dig->r); - mp32nfree(&dig->s); + mpnfree(&dig->g); + mpnfree(&dig->y); + mpnfree(&dig->hm); + mpnfree(&dig->r); + mpnfree(&dig->s); #ifdef NOTYET /*@-branchstate@*/ @@ -1096,10 +1096,10 @@ pgpDig pgpFreeDig(/*@only@*/ /*@null@*/ pgpDig dig) dig->md5ctx = NULL; mp32bfree(&dig->rsa_pk.n); - mp32nfree(&dig->rsa_pk.e); - mp32nfree(&dig->m); - mp32nfree(&dig->c); - mp32nfree(&dig->hm); + mpnfree(&dig->rsa_pk.e); + mpnfree(&dig->m); + mpnfree(&dig->c); + mpnfree(&dig->hm); dig = _free(dig); } diff --git a/rpmio/tinv.c b/rpmio/tinv.c index 9ecf43fc2..bc7a1e224 100644 --- a/rpmio/tinv.c +++ b/rpmio/tinv.c @@ -467,7 +467,7 @@ main(int argc, const char * argv[]) { poptContext optCon = poptGetContext(argv[0], argc, argv, optionsTable, 0); mp32barrett q; - mp32number s; + mpnumber s; uint32 qsize; uint32* qtemp; uint32* qwksp; @@ -490,7 +490,7 @@ main(int argc, const char * argv[]) if (dsa_s[i] == NULL) break; fprintf(stderr, "================================================== %d\n", i); fprintf(stderr, " s: %s\n", dsa_s[i]); - mp32nzero(&s); mp32nsethex(&s, dsa_s[i]); + mpnzero(&s); mpnsethex(&s, dsa_s[i]); fprintf(stderr, "-------------------------------------------------- %d\n", i); rc = Xmp32binv_w(&q, s.size, s.data, qtemp, qwksp); diff --git a/rpmio/tkey.c b/rpmio/tkey.c index 12abc58b7..66c582a20 100644 --- a/rpmio/tkey.c +++ b/rpmio/tkey.c @@ -110,11 +110,11 @@ main (int argc, char *argv[]) mp32bzero(&dig->p); mp32bsethex(&dig->p, fips_p); mp32bzero(&dig->q); mp32bsethex(&dig->q, fips_q); - mp32nzero(&dig->g); mp32nsethex(&dig->g, fips_g); - mp32nzero(&dig->y); mp32nsethex(&dig->y, fips_y); - mp32nzero(&dig->r); mp32nsethex(&dig->r, fips_r); - mp32nzero(&dig->s); mp32nsethex(&dig->s, fips_s); - mp32nzero(&dig->hm);mp32nsethex(&dig->hm, fips_hm); + mpnzero(&dig->g); mpnsethex(&dig->g, fips_g); + mpnzero(&dig->y); mpnsethex(&dig->y, fips_y); + mpnzero(&dig->r); mpnsethex(&dig->r, fips_r); + mpnzero(&dig->s); mpnsethex(&dig->s, fips_s); + mpnzero(&dig->hm); mpnsethex(&dig->hm, fips_hm); rc = dsavrfy(&dig->p, &dig->q, &dig->g, &dig->hm, &dig->y, &dig->r, &dig->s); @@ -123,12 +123,12 @@ fprintf(stderr, "=============================== DSA FIPS-186-1: rc %d\n", rc); mp32bfree(&dig->p); mp32bfree(&dig->q); - mp32nfree(&dig->g); - mp32nfree(&dig->y); + mpnfree(&dig->g); + mpnfree(&dig->y); - mp32nfree(&dig->hm); - mp32nfree(&dig->r); - mp32nfree(&dig->s); + mpnfree(&dig->hm); + mpnfree(&dig->r); + mpnfree(&dig->s); fprintf(stderr, "=============================== GPG Secret Key\n"); if ((rc = doit(jbjSecretDSA, dig, printing)) != 0) @@ -152,7 +152,7 @@ fprintf(stderr, "=============================== GPG Signature of \"abc\"\n"); rpmDigestUpdate(ctx, dsig->hash, dsig->hashlen); rpmDigestFinal(ctx, (void **)&digest, &digestlen, 1); - mp32nzero(&dig->hm);mp32nsethex(&dig->hm, digest); + mpnzero(&dig->hm); mpnsethex(&dig->hm, digest); fprintf(stderr, "\n hm = [ 160]: %s\n\n", digest); @@ -169,12 +169,12 @@ fprintf(stderr, "=============================== DSA verify: rc %d\n", rc); mp32bfree(&dig->p); mp32bfree(&dig->q); - mp32nfree(&dig->g); - mp32nfree(&dig->y); + mpnfree(&dig->g); + mpnfree(&dig->y); - mp32nfree(&dig->hm); - mp32nfree(&dig->r); - mp32nfree(&dig->s); + mpnfree(&dig->hm); + mpnfree(&dig->r); + mpnfree(&dig->s); dig = pgpFreeDig(dig); |