Commit e705fcf1 authored by FdaSilvaYY's avatar FdaSilvaYY Committed by Matt Caswell
Browse files
parent 48722ff5
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -31,8 +31,8 @@ typedef struct {


static int pkey_dsa_init(EVP_PKEY_CTX *ctx)
static int pkey_dsa_init(EVP_PKEY_CTX *ctx)
{
{
    DSA_PKEY_CTX *dctx;
    DSA_PKEY_CTX *dctx = OPENSSL_malloc(sizeof(*dctx));
    dctx = OPENSSL_malloc(sizeof(*dctx));

    if (dctx == NULL)
    if (dctx == NULL)
        return 0;
        return 0;
    dctx->nbits = 1024;
    dctx->nbits = 1024;
@@ -50,6 +50,7 @@ static int pkey_dsa_init(EVP_PKEY_CTX *ctx)
static int pkey_dsa_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src)
static int pkey_dsa_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src)
{
{
    DSA_PKEY_CTX *dctx, *sctx;
    DSA_PKEY_CTX *dctx, *sctx;

    if (!pkey_dsa_init(dst))
    if (!pkey_dsa_init(dst))
        return 0;
        return 0;
    sctx = src->data;
    sctx = src->data;
@@ -116,6 +117,7 @@ static int pkey_dsa_verify(EVP_PKEY_CTX *ctx,
static int pkey_dsa_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
static int pkey_dsa_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
{
{
    DSA_PKEY_CTX *dctx = ctx->data;
    DSA_PKEY_CTX *dctx = ctx->data;

    switch (type) {
    switch (type) {
    case EVP_PKEY_CTRL_DSA_PARAMGEN_BITS:
    case EVP_PKEY_CTRL_DSA_PARAMGEN_BITS:
        if (p1 < 256)
        if (p1 < 256)
@@ -200,6 +202,7 @@ static int pkey_dsa_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
    DSA_PKEY_CTX *dctx = ctx->data;
    DSA_PKEY_CTX *dctx = ctx->data;
    BN_GENCB *pcb;
    BN_GENCB *pcb;
    int ret;
    int ret;

    if (ctx->pkey_gencb) {
    if (ctx->pkey_gencb) {
        pcb = BN_GENCB_new();
        pcb = BN_GENCB_new();
        if (pcb == NULL)
        if (pcb == NULL)
@@ -225,6 +228,7 @@ static int pkey_dsa_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
static int pkey_dsa_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
static int pkey_dsa_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
{
{
    DSA *dsa = NULL;
    DSA *dsa = NULL;

    if (ctx->pkey == NULL) {
    if (ctx->pkey == NULL) {
        DSAerr(DSA_F_PKEY_DSA_KEYGEN, DSA_R_NO_PARAMETERS_SET);
        DSAerr(DSA_F_PKEY_DSA_KEYGEN, DSA_R_NO_PARAMETERS_SET);
        return 0;
        return 0;
+1 −1

File changed.

Contains only whitespace changes.