Annotation of pgp/src/keymgmt.h, revision 1.1.1.4

1.1.1.2   root        1: /* keymgmt.h - headers for keymgmt.c 
                      2: */
                      3: 
                      4: /*     Return printable public key fragment. */
                      5: char *keyIDstring(byte *keyID);
                      6: char *key2IDstring(unitptr n);
                      7: 
                      8: /* Do an RSA key pair generation, and write them out to the keyring files. */
                      9: int dokeygen(char *numstr, char *numstr2);
                     10: 
                     11: /* Edit the userid and/or pass phrase for an RSA key pair, and put them        back
                     12:    into the ring files */
                     13: int dokeyedit(char *mcguffin, char *ringfile);
                     14: 
                     15: /* Copy the first entry in key ring that has mcguffin string in userid and
                     16:    put it into keyfile */
                     17: int extract_from_keyring (char *mcguffin, char *keyfile, char *ringfile,
                     18:                                                  boolean transflag);
                     19: 
                     20: /* Lists all entries in keyring that have mcguffin string in userid */
                     21: int view_keyring(char *mcguffin, char *ringfile, boolean show_signatures, boolean show_hashes);
                     22: 
                     23: /* Signature-check all entries in keyring that have mcguffin string in userid */
1.1.1.3   root       24: int dokeycheck(char *mcguffin, char *ringfile, int options);
                     25: /* options: */
                     26: #define        CHECK_ALL       0       /* Check all signatures */
                     27: #define CHECK_NEW      1       /* Only check new signatures */
1.1.1.2   root       28: 
                     29: /* Allow user to remove signatures from keys in keyring that have mcguffin */
                     30: int remove_sigs(char *mcguffin, char *ringfile);
                     31: 
                     32: /* Remove the first entry in key ring that has mcguffin string in userid */
                     33: int remove_from_keyring(byte *keyID, char *mcguffin, char *ringfile, boolean secring_too);
                     34: 
                     35: /* Extract key fragment from modulus n */
                     36: void extract_keyID(byteptr keyID, unitptr n);
                     37: 
                     38: /* Write message prefix keyID to a file */
                     39: void writekeyID(unitptr n, FILE *f);
                     40: 
                     41: /* Extract public key corresponding to keyID or userid from keyfile */
1.1.1.3   root       42: int getpublickey(int flags, char *keyfile,
1.1.1.2   root       43:                                 long *file_position, int *pktlen, byte *keyID,
                     44:                                 byte *timestamp, byte *userid, unitptr n, unitptr e);
1.1.1.3   root       45: /* flags: */
                     46: #define        GPK_GIVEUP      1
                     47: #define        GPK_SHOW        2
                     48: #define        GPK_NORVK       4
                     49: #define        GPK_DISABLED    8
1.1.1.4 ! root       50: /* Flag used in getsecretkey() only - should it be GSK_? */
        !            51: /* Prevents use of existing password list. */
        !            52: #define GPK_ASKPASS    16
1.1.1.2   root       53: 
                     54: /* Extract private key corresponding to keyID or userid from keyfile */
1.1.1.4 ! root       55: int getsecretkey(int flags, char *keyfile, byte *keyID, byte *timestamp,
        !            56:                        byte *hpass, boolean *hkey, byte *userid,
        !            57:                        unitptr n, unitptr e, unitptr d, unitptr p, unitptr q,
        !            58:                        unitptr u);
1.1.1.2   root       59: 
                     60: /* Return true if ctb is one for a key in a keyring */
                     61: int is_key_ctb (byte ctb);
                     62: 
                     63: /* Read next key packet from file f, return its ctb in *pctb, and advance
                     64:  * the file pointer to point beyond the key packet.
                     65:  */
                     66: short nextkeypacket(FILE *f, byte *pctb);
                     67: 
                     68: /* Read the next key packet from file f, return info about it in the various
                     69:  * pointers.  Most pointers can be NULL without breaking it.
                     70:  */
                     71: short readkeypacket(FILE *f, boolean hidekey, byte *pctb,
                     72:        byte *timestamp, char *userid,
                     73:        unitptr n ,unitptr e, unitptr d, unitptr p, unitptr q, unitptr u,
                     74:        byte *sigkeyID, byte *keyctrl);
                     75: 
                     76: /* Starting at key_position in keyfile, scan for the userid packet which
                     77:  * matches C string userid.  Return the packet position and size.
                     78:  */
                     79: int getpubuserid(char *keyfile, long key_position, byte *userid,
                     80:        long *userid_position, int *userid_len, boolean exact_match);
                     81: 
                     82: int getpubusersig(char *keyfile, long user_position, byte *sigkeyID,
                     83:        long *sig_position, int *sig_len);
                     84: 
1.1.1.3   root       85: void getKeyHash( byte *hash, unitptr n, unitptr e );
                     86: void printKeyHash( byteptr hash, boolean indent );
1.1.1.2   root       87: 
1.1.1.3   root       88: extern int is_compromised(FILE *f);
1.1.1.2   root       89: 
1.1.1.3   root       90: int disable_key(char *, char *);

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.