+
+ return default_RSA_meth;
+}
+
+const RSA_METHOD *RSA_get_method(const RSA *rsa)
+{
+ return ENGINE_get_RSA(rsa->engine);
+}
+
+#if 0
+RSA_METHOD *RSA_set_method(RSA *rsa, RSA_METHOD *meth)
+{
+ RSA_METHOD *mtmp;
+ mtmp = rsa->meth;
+ if (mtmp->finish) mtmp->finish(rsa);
+ rsa->meth = meth;
+ if (meth->init) meth->init(rsa);
+ return mtmp;
+}
+#else
+int RSA_set_method(RSA *rsa, ENGINE *engine)
+{
+ ENGINE *mtmp;
+ const RSA_METHOD *meth;
+ mtmp = rsa->engine;
+ meth = ENGINE_get_RSA(mtmp);
+ if (!ENGINE_init(engine))
+ return 0;
+ if (meth->finish) meth->finish(rsa);
+ rsa->engine = engine;
+ meth = ENGINE_get_RSA(engine);
+ if (meth->init) meth->init(rsa);
+ /* SHOULD ERROR CHECK THIS!!! */
+ ENGINE_finish(mtmp);
+ return 1;
+}
+#endif
+
+#if 0
+RSA *RSA_new_method(RSA_METHOD *meth)
+#else
+RSA *RSA_new_method(ENGINE *engine)
+#endif
+ {
+ const RSA_METHOD *meth;
+ RSA *ret;
+
+ ret=(RSA *)OPENSSL_malloc(sizeof(RSA));