openssl移植到armBN_mod_inverse:no inverse

Openssl RSA编程代码在pc机上可以正常运行。
交叉编译到ARM 上会有错误,
错误信息error:0306E06C:bignum routines:BN_mod_inverse:no inverse。求大神指教。
``RSA *rsa = NULL;
BIO *bio = NULL;
int rsa_len = 0;
int num = 0;

if ((bio = BIO_new_mem_buf((void *)PubKeyAuth, -1)) == NULL)
{
    return RSA_ENCRYPT_ERROR;
}

if ((rsa = PEM_read_bio_RSA_PUBKEY(bio, NULL, NULL, NULL)) == NULL)
{
    return RSA_ENCRYPT_ERROR;
}

BIO_free_all(bio);
rsa_len = RSA_size(rsa);

num = RSA_public_encrypt(rsa_len, (unsigned char *)str, (unsigned char *)SendMessageBuff, rsa, RSA_PKCS1_PADDING ); 
if (num < 0)
{
    return RSA_ENCRYPT_ERROR;
}

RSA_free(rsa);

return num;`

在openssl编译选项中增加zlib成功了。应该是缺少zlib编译选项

应该是 编译选项中没有指定芯片架构,解决办法为在config文件中修改。