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

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.2   root       50: 
                     51: /* Extract private key corresponding to keyID or userid from keyfile */
1.1.1.3 ! root       52: int getsecretkey(int flags, char *keyfile, byte *keyID,
1.1.1.2   root       53:                                 byte *timestamp, char *passp, boolean *hkey, byte *userid,
                     54:                                 unitptr n, unitptr e, unitptr d, unitptr p, unitptr q,
                     55:                                 unitptr u);
                     56: 
                     57: /* Return true if ctb is one for a key in a keyring */
                     58: int is_key_ctb (byte ctb);
                     59: 
                     60: /* Read next key packet from file f, return its ctb in *pctb, and advance
                     61:  * the file pointer to point beyond the key packet.
                     62:  */
                     63: short nextkeypacket(FILE *f, byte *pctb);
                     64: 
                     65: /* Read the next key packet from file f, return info about it in the various
                     66:  * pointers.  Most pointers can be NULL without breaking it.
                     67:  */
                     68: short readkeypacket(FILE *f, boolean hidekey, byte *pctb,
                     69:        byte *timestamp, char *userid,
                     70:        unitptr n ,unitptr e, unitptr d, unitptr p, unitptr q, unitptr u,
                     71:        byte *sigkeyID, byte *keyctrl);
                     72: 
                     73: /* Starting at key_position in keyfile, scan for the userid packet which
                     74:  * matches C string userid.  Return the packet position and size.
                     75:  */
                     76: int getpubuserid(char *keyfile, long key_position, byte *userid,
                     77:        long *userid_position, int *userid_len, boolean exact_match);
                     78: 
                     79: int getpubusersig(char *keyfile, long user_position, byte *sigkeyID,
                     80:        long *sig_position, int *sig_len);
                     81: 
1.1.1.3 ! root       82: void getKeyHash( byte *hash, unitptr n, unitptr e );
        !            83: void printKeyHash( byteptr hash, boolean indent );
1.1.1.2   root       84: 
1.1.1.3 ! root       85: extern int is_compromised(FILE *f);
1.1.1.2   root       86: 
1.1.1.3 ! root       87: 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.