Commit 98f62979 authored by Mansour Ahmadi's avatar Mansour Ahmadi Committed by Nicola Tuveri
Browse files

Check return value of EVP_PKEY_new

parent 6f172154
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -269,6 +269,9 @@ int rsa_main(int argc, char **argv)
    } else if (outformat == FORMAT_MSBLOB || outformat == FORMAT_PVK) {
        EVP_PKEY *pk;
        pk = EVP_PKEY_new();
        if (pk == NULL)
            goto end;

        EVP_PKEY_set1_RSA(pk, rsa);
        if (outformat == FORMAT_PVK) {
            if (pubin) {