|
@@ -88,15 +88,13 @@ static QCryptoAkCipherRSAKey *qcrypto_builtin_rsa_public_key_parse(
|
|
goto error;
|
|
goto error;
|
|
}
|
|
}
|
|
if (seq_length != 0) {
|
|
if (seq_length != 0) {
|
|
|
|
+ error_setg(errp, "Invalid RSA public key");
|
|
goto error;
|
|
goto error;
|
|
}
|
|
}
|
|
|
|
|
|
return rsa;
|
|
return rsa;
|
|
|
|
|
|
error:
|
|
error:
|
|
- if (errp && !*errp) {
|
|
|
|
- error_setg(errp, "Invalid RSA public key");
|
|
|
|
- }
|
|
|
|
qcrypto_akcipher_rsakey_free(rsa);
|
|
qcrypto_akcipher_rsakey_free(rsa);
|
|
return NULL;
|
|
return NULL;
|
|
}
|
|
}
|
|
@@ -169,15 +167,13 @@ static QCryptoAkCipherRSAKey *qcrypto_builtin_rsa_private_key_parse(
|
|
return rsa;
|
|
return rsa;
|
|
}
|
|
}
|
|
if (seq_length != 0) {
|
|
if (seq_length != 0) {
|
|
|
|
+ error_setg(errp, "Invalid RSA private key");
|
|
goto error;
|
|
goto error;
|
|
}
|
|
}
|
|
|
|
|
|
return rsa;
|
|
return rsa;
|
|
|
|
|
|
error:
|
|
error:
|
|
- if (errp && !*errp) {
|
|
|
|
- error_setg(errp, "Invalid RSA private key");
|
|
|
|
- }
|
|
|
|
qcrypto_akcipher_rsakey_free(rsa);
|
|
qcrypto_akcipher_rsakey_free(rsa);
|
|
return NULL;
|
|
return NULL;
|
|
}
|
|
}
|