select the signature algorithm - dummy in gpgme.c
This commit is contained in:
parent
da2cd9aa44
commit
44edbc7d41
@ -313,6 +313,38 @@ gpgme_get_include_certs (GpgmeCtx ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gpgme_set_signature_algorithm
|
||||||
|
* @ctx: the context
|
||||||
|
* @algorithm: the algorithm to be used for signing a S/MIME
|
||||||
|
* message. The default is 1 (SHA1); this is currently the only
|
||||||
|
* supported algorithm.
|
||||||
|
**/
|
||||||
|
void
|
||||||
|
gpgme_set_signature_algorithm( GpgmeCtx ctx, int algorithm )
|
||||||
|
{
|
||||||
|
/* PENDING(g10) Implement this */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gpgme_get_signature_algorithm:
|
||||||
|
* @ctx: the context
|
||||||
|
*
|
||||||
|
* Get the signature algorithm used for signing S/MIME messages
|
||||||
|
*
|
||||||
|
* Return value: the signature algorithm where 1 means SHA1
|
||||||
|
**/
|
||||||
|
int
|
||||||
|
gpgme_get_signature_algorithm (GpgmeCtx ctx)
|
||||||
|
{
|
||||||
|
/* PENDING(g10) Implement this */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gpgme_set_keylist_mode:
|
* gpgme_set_keylist_mode:
|
||||||
* @ctx: the context
|
* @ctx: the context
|
||||||
|
@ -235,6 +235,12 @@ void gpgme_set_include_certs (GpgmeCtx ctx, int nr_of_certs);
|
|||||||
/* Return the number of certs to include in an S/MIME message. */
|
/* Return the number of certs to include in an S/MIME message. */
|
||||||
int gpgme_get_include_certs (GpgmeCtx ctx);
|
int gpgme_get_include_certs (GpgmeCtx ctx);
|
||||||
|
|
||||||
|
/* Sets the algorithm to be used for signatures. */
|
||||||
|
void gpgme_set_signature_algorithm( GpgmeCtx ctx, int signAlgo );
|
||||||
|
|
||||||
|
/* Return the algorithm to be used for signatures. */
|
||||||
|
int gpgme_get_signature_algorithm( GpgmeCtx ctx );
|
||||||
|
|
||||||
/* Set keylist mode in CTX to MODE. */
|
/* Set keylist mode in CTX to MODE. */
|
||||||
GpgmeError gpgme_set_keylist_mode (GpgmeCtx ctx, int mode);
|
GpgmeError gpgme_set_keylist_mode (GpgmeCtx ctx, int mode);
|
||||||
|
|
||||||
|
@ -795,6 +795,8 @@ bool signMessage( const char* cleartext,
|
|||||||
}
|
}
|
||||||
gpgme_set_include_certs (ctx, sendCerts);
|
gpgme_set_include_certs (ctx, sendCerts);
|
||||||
|
|
||||||
|
gpgme_set_signature_algorithm( ctx, config.signatureAlgorithm );
|
||||||
|
|
||||||
gpgme_data_new_from_mem (&data, cleartext,
|
gpgme_data_new_from_mem (&data, cleartext,
|
||||||
1+strlen( cleartext ), 1 );
|
1+strlen( cleartext ), 1 );
|
||||||
gpgme_data_new ( &sig );
|
gpgme_data_new ( &sig );
|
||||||
|
Loading…
Reference in New Issue
Block a user