As with RSA, which was modified recently, this change makes it possible to

override key-generation implementations by placing handlers in the methods
for DSA and DH. Also, parameter generation for DSA and DH is possible by
another new handler for each method.
This commit is contained in:
Geoff Thorpe
2003-01-15 02:01:55 +00:00
parent 08cb96bba2
commit 0e4aa0d2d2
15 changed files with 77 additions and 7 deletions

View File

@@ -64,7 +64,16 @@
#include <openssl/dsa.h>
#include <openssl/rand.h>
static int dsa_builtin_keygen(DSA *dsa);
int DSA_generate_key(DSA *dsa)
{
if(dsa->meth->dsa_keygen)
return dsa->meth->dsa_keygen(dsa);
return dsa_builtin_keygen(dsa);
}
static int dsa_builtin_keygen(DSA *dsa)
{
int ok=0;
BN_CTX *ctx=NULL;