- RSA *to_return = RSA_generate_key(key_size, 65537, NULL_POINTER, NULL_POINTER);
- if (!to_return) {
+ RSA *to_return = RSA_new();
+ BIGNUM *e = BN_new();
+ BN_set_word(e, 65537);
+//hmmm: only one value of e?
+ int ret = RSA_generate_key_ex(to_return, key_size, e, NULL_POINTER);
+ if (!ret) {