Do not repeat the size of certdata
This commit is contained in:
committed by
Michael Scherer
parent
1a525f7ed7
commit
ff67119447
@@ -557,7 +557,7 @@ static bool import_cert(ykpiv_state *state, enum enum_key_format cert_format,
|
||||
int object = get_object_id(slot);
|
||||
ykpiv_rc res;
|
||||
|
||||
if(4 + cert_len + 5 > 3072) { /* 4 is prefix size, 5 is postfix size */
|
||||
if(4 + cert_len + 5 > sizeof(certdata)) { /* 4 is prefix size, 5 is postfix size */
|
||||
fprintf(stderr, "Certificate is to large to fit in buffer.\n");
|
||||
goto import_cert_out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user