Beispiel #1
0
/**
 * crypt_smime_application_handler - Wrapper for CryptModuleSpecs::application_handler()
 *
 * Implements ::handler_t
 */
int crypt_smime_application_handler(struct Body *m, struct State *s)
{
  if (CRYPT_MOD_CALL_CHECK(SMIME, application_handler))
    return CRYPT_MOD_CALL(SMIME, application_handler)(m, s);

  return -1;
}
Beispiel #2
0
/* fixme: Needs documentation. */
BODY *crypt_smime_sign_message (BODY *a)
{
  if (CRYPT_MOD_CALL_CHECK (SMIME, sign_message))
    return (CRYPT_MOD_CALL (SMIME, sign_message)) (a);

  return NULL;
}
Beispiel #3
0
/* fixme: needs documentation */
int crypt_smime_verify_one (BODY *sigbdy, STATE *s, const char *tempf)
{
  if (CRYPT_MOD_CALL_CHECK (SMIME, verify_one))
    return (CRYPT_MOD_CALL (SMIME, verify_one)) (sigbdy, s, tempf);

  return -1;
}
Beispiel #4
0
/* Decrypt am S/MIME message. */
int crypt_smime_decrypt_mime (FILE *a, FILE **b, BODY *c, BODY **d)
{
  if (CRYPT_MOD_CALL_CHECK (SMIME, decrypt_mime))
    return (CRYPT_MOD_CALL (SMIME, decrypt_mime)) (a, b, c, d);

  return -1;
}
Beispiel #5
0
/* Check that the sender matches. */
int crypt_smime_verify_sender(HEADER *h)
{
  if (CRYPT_MOD_CALL_CHECK (SMIME, smime_verify_sender))
    return (CRYPT_MOD_CALL (SMIME, smime_verify_sender)) (h);

  return 1;
}
Beispiel #6
0
/* Create a new body with a PGP signed message from A. */
BODY *crypt_pgp_sign_message (BODY *a)
{
  if (CRYPT_MOD_CALL_CHECK (PGP, sign_message))
    return (CRYPT_MOD_CALL (PGP, sign_message)) (a);

  return NULL;
}
Beispiel #7
0
int crypt_pgp_send_menu (HEADER *msg, int *redraw)
{
  if (CRYPT_MOD_CALL_CHECK (PGP, send_menu))
    return (CRYPT_MOD_CALL (PGP, send_menu)) (msg, redraw);

  return 0;
}
Beispiel #8
0
/**
 * crypt_smime_send_menu - Wrapper for CryptModuleSpecs::send_menu()
 */
int crypt_smime_send_menu(struct Email *msg)
{
  if (CRYPT_MOD_CALL_CHECK(SMIME, send_menu))
    return CRYPT_MOD_CALL(SMIME, send_menu)(msg);

  return 0;
}
Beispiel #9
0
/* This routine attempts to find the keyids of the recipients of a
   message.  It returns NULL if any of the keys can not be found.  */
char *crypt_pgp_findkeys (ADDRESS *to, ADDRESS *cc, ADDRESS *bcc)
{
    if (CRYPT_MOD_CALL_CHECK (PGP, findkeys))
        return (CRYPT_MOD_CALL (PGP, findkeys)) (to, cc, bcc);

    return NULL;
}
Beispiel #10
0
/**
 * crypt_smime_build_smime_entity - Wrapper for CryptModuleSpecs::smime_build_smime_entity()
 */
struct Body *crypt_smime_build_smime_entity(struct Body *a, char *certlist)
{
  if (CRYPT_MOD_CALL_CHECK(SMIME, smime_build_smime_entity))
    return CRYPT_MOD_CALL(SMIME, smime_build_smime_entity)(a, certlist);

  return NULL;
}
Beispiel #11
0
/**
 * crypt_smime_verify_one - Wrapper for CryptModuleSpecs::verify_one()
 */
int crypt_smime_verify_one(struct Body *sigbdy, struct State *s, const char *tempf)
{
  if (CRYPT_MOD_CALL_CHECK(SMIME, verify_one))
    return CRYPT_MOD_CALL(SMIME, verify_one)(sigbdy, s, tempf);

  return -1;
}
Beispiel #12
0
/**
 * crypt_smime_sign_message - Wrapper for CryptModuleSpecs::sign_message()
 */
struct Body *crypt_smime_sign_message(struct Body *a)
{
  if (CRYPT_MOD_CALL_CHECK(SMIME, sign_message))
    return CRYPT_MOD_CALL(SMIME, sign_message)(a);

  return NULL;
}
Beispiel #13
0
/**
 * crypt_smime_find_keys - Wrapper for CryptModuleSpecs::find_keys()
 */
char *crypt_smime_find_keys(struct Address *addrlist, bool oppenc_mode)
{
  if (CRYPT_MOD_CALL_CHECK(SMIME, find_keys))
    return CRYPT_MOD_CALL(SMIME, find_keys)(addrlist, oppenc_mode);

  return NULL;
}
Beispiel #14
0
/**
 * crypt_smime_verify_sender - Wrapper for CryptModuleSpecs::smime_verify_sender()
 */
int crypt_smime_verify_sender(struct Email *e)
{
  if (CRYPT_MOD_CALL_CHECK(SMIME, smime_verify_sender))
    return CRYPT_MOD_CALL(SMIME, smime_verify_sender)(e);

  return 1;
}
Beispiel #15
0
/* Generate a PGP public key attachment. */
BODY *crypt_pgp_make_key_attachment (char *tempf)
{
  if (CRYPT_MOD_CALL_CHECK (PGP, pgp_make_key_attachment))
    return (CRYPT_MOD_CALL (PGP, pgp_make_key_attachment)) (tempf);

  return NULL;
}
Beispiel #16
0
/* This routine attempts to find the keyids of the recipients of a
   message.  It returns NULL if any of the keys can not be found.  */
char *crypt_smime_findkeys (ADDRESS *to, ADDRESS *cc, ADDRESS *bcc)
{
    if (CRYPT_MOD_CALL_CHECK (SMIME, findkeys))
        return (CRYPT_MOD_CALL (SMIME, findkeys)) (to, cc, bcc);

    return NULL;
}
Beispiel #17
0
/* This routine attempts to find the keyids of the recipients of a
   message.  It returns NULL if any of the keys can not be found.
   If oppenc_mode is true, only keys that can be determined without
   prompting will be used.  */
char *crypt_pgp_findkeys (ADDRESS *adrlist, int oppenc_mode)
{
  if (CRYPT_MOD_CALL_CHECK (PGP, findkeys))
    return (CRYPT_MOD_CALL (PGP, findkeys)) (adrlist, oppenc_mode);

  return NULL;
}
Beispiel #18
0
int crypt_pgp_valid_passphrase (void)
{
  if (CRYPT_MOD_CALL_CHECK (PGP, valid_passphrase))
    return (CRYPT_MOD_CALL (PGP, valid_passphrase)) ();

  return 0;
}
Beispiel #19
0
/* Warning: A is no longer freed in this routine, you need to free it
   later.  This is necessary for $fcc_attach. */
BODY *crypt_pgp_encrypt_message (BODY *a, char *keylist, int sign)
{
  if (CRYPT_MOD_CALL_CHECK (PGP, pgp_encrypt_message))
    return (CRYPT_MOD_CALL (PGP, pgp_encrypt_message)) (a, keylist, sign);

  return NULL;
}
Beispiel #20
0
/* Decrypt a PGP/MIME message. */
int crypt_pgp_decrypt_mime (FILE *a, FILE **b, BODY *c, BODY **d)
{
  if (CRYPT_MOD_CALL_CHECK (PGP, decrypt_mime))
    return (CRYPT_MOD_CALL (PGP, decrypt_mime)) (a, b, c, d);

  return -1;
}
Beispiel #21
0
int crypt_smime_valid_passphrase (void)
{
  if (CRYPT_MOD_CALL_CHECK (SMIME, valid_passphrase))
    return (CRYPT_MOD_CALL (SMIME, valid_passphrase)) ();

  return 0;
}
Beispiel #22
0
/* MIME handler for the application/pgp content-type. */
int crypt_pgp_application_pgp_handler (BODY *m, STATE *s)
{
  if (CRYPT_MOD_CALL_CHECK (PGP, application_handler))
    return (CRYPT_MOD_CALL (PGP, application_handler)) (m, s);
  
  return -1;
}
Beispiel #23
0
/* MIME handler for the application/smime content-type. */
int crypt_smime_application_smime_handler (BODY *m, STATE *s)
{
  if (CRYPT_MOD_CALL_CHECK (SMIME, application_handler))
    return (CRYPT_MOD_CALL (SMIME, application_handler)) (m, s);
  
  return -1;
}
Beispiel #24
0
/* MIME handler for an PGP/MIME encrypted message. */
int crypt_pgp_encrypted_handler (BODY *a, STATE *s)
{
  if (CRYPT_MOD_CALL_CHECK (PGP, encrypted_handler))
    return (CRYPT_MOD_CALL (PGP, encrypted_handler)) (a, s);
  
  return -1;
}
Beispiel #25
0
/* This routine attempts to find the keyids of the recipients of a
   message.  It returns NULL if any of the keys can not be found.
   If oppenc_mode is true, only keys that can be determined without
   prompting will be used.  */
char *crypt_smime_findkeys (ADDRESS *adrlist, int oppenc_mode)
{
  if (CRYPT_MOD_CALL_CHECK (SMIME, findkeys))
    return (CRYPT_MOD_CALL (SMIME, findkeys)) (adrlist, oppenc_mode);

  return NULL;
}
Beispiel #26
0
/* Check for a traditional PGP message in body B. */
int crypt_pgp_check_traditional (FILE *fp, BODY *b, int tagged_only)
{
  if (CRYPT_MOD_CALL_CHECK (PGP, pgp_check_traditional))
    return (CRYPT_MOD_CALL (PGP, pgp_check_traditional)) (fp, b, tagged_only);

  return 0;
}
Beispiel #27
0
/* fixme: needs documentation. */
BODY *crypt_smime_build_smime_entity (BODY *a, char *certlist)
{
  if (CRYPT_MOD_CALL_CHECK (SMIME, smime_build_smime_entity))
    return (CRYPT_MOD_CALL (SMIME, smime_build_smime_entity)) (a, certlist);

  return NULL;
}
Beispiel #28
0
/* fixme: needs documentation. */
BODY *crypt_pgp_traditional_encryptsign (BODY *a, int flags, char *keylist)
{
  if (CRYPT_MOD_CALL_CHECK (PGP, pgp_traditional_encryptsign))
    return (CRYPT_MOD_CALL (PGP, pgp_traditional_encryptsign)) (a, flags, keylist);

  return NULL;
}
Beispiel #29
0
int crypt_smime_send_menu (HEADER *msg, int *redraw)
{
  if (CRYPT_MOD_CALL_CHECK (SMIME, send_menu))
    return (CRYPT_MOD_CALL (SMIME, send_menu)) (msg, redraw);

  return 0;
}
Beispiel #30
0
/**
 * crypt_smime_decrypt_mime - Wrapper for CryptModuleSpecs::decrypt_mime()
 */
int crypt_smime_decrypt_mime(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **cur)
{
  if (CRYPT_MOD_CALL_CHECK(SMIME, decrypt_mime))
    return CRYPT_MOD_CALL(SMIME, decrypt_mime)(fp_in, fp_out, b, cur);

  return -1;
}