- string keypath=data_path + "key.pem";\r
- BIO* in=BIO_new(BIO_s_file_internal());\r
- if (in && BIO_read_filename(in,keypath.c_str())>0) {\r
- EVP_PKEY* pkey=PEM_read_bio_PrivateKey(in, NULL, NULL, NULL);\r
- if (pkey) {\r
- m_key=new OpenSSLCryptoKeyRSA(pkey);\r
- EVP_PKEY_free(pkey);\r
- }\r
- }\r
- if (in) BIO_free(in);\r
- TS_ASSERT(m_key!=NULL);\r