mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
AppleM1: Update openssl to v1.1.1l
This commit is contained in:
parent
1fe12b8e8c
commit
b787656eea
990 changed files with 13406 additions and 18710 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
|
@ -9,10 +9,10 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include "internal/cryptlib.h"
|
||||
#include "internal/bn_int.h"
|
||||
#include "crypto/bn.h"
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/sha.h>
|
||||
#include "dsa_locl.h"
|
||||
#include "dsa_local.h"
|
||||
#include <openssl/asn1.h>
|
||||
|
||||
static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
|
||||
|
@ -72,6 +72,10 @@ static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
|
|||
reason = DSA_R_MISSING_PARAMETERS;
|
||||
goto err;
|
||||
}
|
||||
if (dsa->priv_key == NULL) {
|
||||
reason = DSA_R_MISSING_PRIVATE_KEY;
|
||||
goto err;
|
||||
}
|
||||
|
||||
ret = DSA_SIG_new();
|
||||
if (ret == NULL)
|
||||
|
@ -190,6 +194,16 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Reject obviously invalid parameters */
|
||||
if (BN_is_zero(dsa->p) || BN_is_zero(dsa->q) || BN_is_zero(dsa->g)) {
|
||||
DSAerr(DSA_F_DSA_SIGN_SETUP, DSA_R_INVALID_PARAMETERS);
|
||||
return 0;
|
||||
}
|
||||
if (dsa->priv_key == NULL) {
|
||||
DSAerr(DSA_F_DSA_SIGN_SETUP, DSA_R_MISSING_PRIVATE_KEY);
|
||||
return 0;
|
||||
}
|
||||
|
||||
k = BN_new();
|
||||
l = BN_new();
|
||||
if (k == NULL || l == NULL)
|
||||
|
@ -242,7 +256,7 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in,
|
|||
* one bit longer than the modulus.
|
||||
*
|
||||
* There are some concerns about the efficacy of doing this. More
|
||||
* specificly refer to the discussion starting with:
|
||||
* specifically refer to the discussion starting with:
|
||||
* https://github.com/openssl/openssl/pull/7486#discussion_r228323705
|
||||
* The fix is to rework BN so these gymnastics aren't required.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue