early-access version 2698
This commit is contained in:
44
externals/libressl/crypto/dsa/dsa_lib.c
vendored
44
externals/libressl/crypto/dsa/dsa_lib.c
vendored
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: dsa_lib.c,v 1.29 2018/04/14 07:09:21 tb Exp $ */
|
||||
/* $OpenBSD: dsa_lib.c,v 1.34 2022/01/14 08:29:06 tb Exp $ */
|
||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -74,6 +74,9 @@
|
||||
#include <openssl/engine.h>
|
||||
#endif
|
||||
|
||||
#include "dh_local.h"
|
||||
#include "dsa_locl.h"
|
||||
|
||||
static const DSA_METHOD *default_DSA_method = NULL;
|
||||
|
||||
void
|
||||
@@ -151,7 +154,6 @@ DSA_new_method(ENGINE *engine)
|
||||
|
||||
ret->pad = 0;
|
||||
ret->version = 0;
|
||||
ret->write_params = 1;
|
||||
ret->p = NULL;
|
||||
ret->q = NULL;
|
||||
ret->g = NULL;
|
||||
@@ -174,7 +176,7 @@ DSA_new_method(ENGINE *engine)
|
||||
free(ret);
|
||||
ret = NULL;
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -361,6 +363,36 @@ DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key)
|
||||
return 1;
|
||||
}
|
||||
|
||||
const BIGNUM *
|
||||
DSA_get0_p(const DSA *d)
|
||||
{
|
||||
return d->p;
|
||||
}
|
||||
|
||||
const BIGNUM *
|
||||
DSA_get0_q(const DSA *d)
|
||||
{
|
||||
return d->q;
|
||||
}
|
||||
|
||||
const BIGNUM *
|
||||
DSA_get0_g(const DSA *d)
|
||||
{
|
||||
return d->g;
|
||||
}
|
||||
|
||||
const BIGNUM *
|
||||
DSA_get0_pub_key(const DSA *d)
|
||||
{
|
||||
return d->pub_key;
|
||||
}
|
||||
|
||||
const BIGNUM *
|
||||
DSA_get0_priv_key(const DSA *d)
|
||||
{
|
||||
return d->priv_key;
|
||||
}
|
||||
|
||||
void
|
||||
DSA_clear_flags(DSA *d, int flags)
|
||||
{
|
||||
@@ -384,3 +416,9 @@ DSA_get0_engine(DSA *d)
|
||||
{
|
||||
return d->engine;
|
||||
}
|
||||
|
||||
int
|
||||
DSA_bits(const DSA *dsa)
|
||||
{
|
||||
return BN_num_bits(dsa->p);
|
||||
}
|
||||
|
Reference in New Issue
Block a user