mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-10-17 10:59:36 +00:00
Add function to extract algorithm number from context.
This commit is contained in:
1 parent
3471f18130
commit
6759b99e28
2 files changed
+9
No files matched your search
@@ -45,5 +45,6 @@ struct VerifyAlgCtx
|
||||
int verifyalg_supported(int algo);
|
||||
VerifyAlgCtx* verifyalg_alloc(int algo);
|
||||
void verifyalg_free(VerifyAlgCtx *a);
|
||||
int verifyalg_algonum(VerifyAlgCtx *a);
|
||||
|
||||
#endif /* DNSSEC_CRYPTO_H */
|
||||
@@ -201,3 +201,11 @@ void verifyalg_free(VerifyAlgCtx *a)
|
||||
|
||||
pool_used &= ~(1 << pool_idx);
|
||||
}
|
||||
|
||||
int verifyalg_algonum(VerifyAlgCtx *a)
|
||||
{
|
||||
int num = a->vtbl - valgs;
|
||||
if (num < 0 || num >= countof(valgs))
|
||||
return -1;
|
||||
return num;
|
||||
}
|
||||
Reference in new issue
Block a user