Import gcrypt public-key cryptography and implement signature checking.
This commit is contained in:
parent
535714bdcf
commit
5e3b8dcbb5
238 changed files with 40500 additions and 417 deletions
|
@ -87,6 +87,10 @@ static struct digest_table_entry
|
|||
#if USE_TIGER
|
||||
{ &_gcry_digest_spec_tiger,
|
||||
&dummy_extra_spec, GCRY_MD_TIGER },
|
||||
{ &_gcry_digest_spec_tiger1,
|
||||
&dummy_extra_spec, GCRY_MD_TIGER1 },
|
||||
{ &_gcry_digest_spec_tiger2,
|
||||
&dummy_extra_spec, GCRY_MD_TIGER2 },
|
||||
#endif
|
||||
#if USE_WHIRLPOOL
|
||||
{ &_gcry_digest_spec_whirlpool,
|
||||
|
@ -101,7 +105,7 @@ static gcry_module_t digests_registered;
|
|||
/* This is the lock protecting DIGESTS_REGISTERED. */
|
||||
static ath_mutex_t digests_registered_lock = ATH_MUTEX_INITIALIZER;
|
||||
|
||||
/* Flag to check wether the default ciphers have already been
|
||||
/* Flag to check whether the default ciphers have already been
|
||||
registered. */
|
||||
static int default_digests_registered;
|
||||
|
||||
|
@ -948,10 +952,13 @@ md_read( gcry_md_hd_t a, int algo )
|
|||
|
||||
if (! algo)
|
||||
{
|
||||
/* return the first algorithm */
|
||||
if (r && r->next)
|
||||
log_debug ("more than one algorithm in md_read(0)\n");
|
||||
return r->digest->read( &r->context.c );
|
||||
/* Return the first algorithm */
|
||||
if (r)
|
||||
{
|
||||
if (r->next)
|
||||
log_debug ("more than one algorithm in md_read(0)\n");
|
||||
return r->digest->read (&r->context.c);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1135,7 +1142,7 @@ md_asn_oid (int algorithm, size_t *asnlen, size_t *mdlen)
|
|||
* Note: Because this function is in most cases used to return an
|
||||
* integer value, we can make it easier for the caller to just look at
|
||||
* the return value. The caller will in all cases consult the value
|
||||
* and thereby detecting whether a error occured or not (i.e. while checking
|
||||
* and thereby detecting whether a error occurred or not (i.e. while checking
|
||||
* the block size)
|
||||
*/
|
||||
gcry_error_t
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue