diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/dsa/dsa_ossl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/libcrypto/dsa/dsa_ossl.c b/src/lib/libcrypto/dsa/dsa_ossl.c index 9545cff5f8..2f7268839e 100644 --- a/src/lib/libcrypto/dsa/dsa_ossl.c +++ b/src/lib/libcrypto/dsa/dsa_ossl.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dsa_ossl.c,v 1.35 2018/06/14 17:15:41 jsing Exp $ */ | 1 | /* $OpenBSD: dsa_ossl.c,v 1.36 2018/06/14 18:03:59 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -118,8 +118,9 @@ dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) | |||
118 | goto err; | 118 | goto err; |
119 | 119 | ||
120 | /* | 120 | /* |
121 | * If the digest length is greater than the size of q use the | 121 | * If the digest length is greater than N (the bit length of q), the |
122 | * BN_num_bits(dsa->q) leftmost bits of the digest, see FIPS 186-3, 4.2. | 122 | * leftmost N bits of the digest shall be used, see FIPS 186-3, 4.2. |
123 | * In this case the digest length is given in bytes. | ||
123 | */ | 124 | */ |
124 | if (dlen > BN_num_bytes(dsa->q)) | 125 | if (dlen > BN_num_bytes(dsa->q)) |
125 | dlen = BN_num_bytes(dsa->q); | 126 | dlen = BN_num_bytes(dsa->q); |