Skip to content

Commit bb6a7e1

Browse files
committed
if dsa_int_validate_* fails return consistently CRYPT_INVALID_PACKET
1 parent a990a82 commit bb6a7e1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/pk/dsa/dsa_set.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ int dsa_set_pqg(const unsigned char *p, unsigned long plen,
4848
/* do only a quick validation, without primality testing */
4949
if ((err = dsa_int_validate_pqg(key, &stat)) != CRYPT_OK) { goto LBL_ERR; }
5050
if (stat == 0) {
51-
err = CRYPT_INVALID_ARG;
51+
err = CRYPT_INVALID_PACKET;
5252
goto LBL_ERR;
5353
}
5454

@@ -94,7 +94,7 @@ int dsa_set_key(const unsigned char *in, unsigned long inlen, int type, dsa_key
9494

9595
if ((err = dsa_int_validate_xy(key, &stat)) != CRYPT_OK) { goto LBL_ERR; }
9696
if (stat == 0) {
97-
err = CRYPT_INVALID_ARG;
97+
err = CRYPT_INVALID_PACKET;
9898
goto LBL_ERR;
9999
}
100100

0 commit comments

Comments
 (0)