<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>Respected Mr. Levitte,</p>
<p>I have created the symlink to <span>/usr/lib/x86_64-linux-gnu/openssl-1.0.0/engines/librsa_engine.so. During encryption and decryption it mentions that "<span>engine "rsa-engine 1" set", but it doesnot use the function in the struct and also doesnot output
 the printf. Furthermore, I also tried the method you recomended but still no result.<br>
</span></span></p>
<p><span><span><br>
</span></span></p>
<p><span><span>Best Regards.</span></span></p>
<p><span><span>Khurram</span></span><br>
</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> openssl-users <openssl-users-bounces@openssl.org> on behalf of Richard Levitte <levitte@openssl.org><br>
<b>Sent:</b> Monday, February 13, 2017 11:15 AM<br>
<b>To:</b> openssl-users@openssl.org<br>
<b>Subject:</b> Re: [openssl-users] RSA engine is not using the functions mentioned in struct</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">In message <KL1PR01MB1334EA721A8064B36C7062F3DC590@KL1PR01MB1334.apcprd01.prod.exchangelabs.com> on Mon, 13 Feb 2017 10:57:27 +0000, khurram ashraf <khurramashraf_786@hotmail.com> said:<br>
<br>
khurramashraf_786> Here the engine loads but when i try to encrypt a text file by using<br>
khurramashraf_786> following command<br>
khurramashraf_786> <br>
khurramashraf_786> openssl pkeyutl -encrypt -in message.txt -pubin -inkey pubkey-B.pem -engine rsa_engine -out cipher.bin<br>
khurramashraf_786> openssl pkeyutl -decrypt -in cipher.bin -inkey privkey-B.pem -engine rsa_engine -out rec.txt<br>
khurramashraf_786> <br>
khurramashraf_786> It seems that it is not using the functions which I defined in the<br>
khurramashraf_786> struct_rsa. It is also not giving the output from the printf in the<br>
khurramashraf_786> function.<br>
<br>
You need to tell it where to find the engine as well.  libcrypto looks<br>
in the standard system places (typically /usr/lib or so) and the path<br>
given by the environment variable OPENSSL_ENGINES.  Try these lines<br>
and see if that makes a difference:<br>
<br>
OPENSSL_ENGINES=.<br>
export OPENSSL_ENGINES<br>
openssl pkeyutl -encrypt -in message.txt -pubin -inkey pubkey-B.pem -engine rsa_engine -out cipher.bin<br>
openssl pkeyutl -decrypt -in cipher.bin -inkey privkey-B.pem -engine rsa_engine -out rec.txt<br>
<br>
Cheers,<br>
Richard<br>
<br>
-- <br>
Richard Levitte         levitte@openssl.org<br>
OpenSSL Project         <a href="http://www.openssl.org/~levitte/" id="LPlnk49709" previewremoved="true">
http://www.openssl.org/~levitte/</a><br>
-- <br>
openssl-users mailing list<br>
To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" id="LPlnk361647" previewremoved="true">
https://mta.openssl.org/mailman/listinfo/openssl-users</a>
<div id="LPBorder_GT_14869865502570.6190609914229598" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_14869865502530.026025372760637766" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);" cellspacing="0">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td id="TextCell_14869865502530.06413185055591486" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;" colspan="2">
<div id="LPRemovePreviewContainer_14869865502540.7440673962919859"></div>
<div id="LPTitle_14869865502540.7280126164959476" style="top: 0px; color: rgb(0, 120, 215); font-weight: 400; font-size: 21px; font-family: "wf_segoe-ui_light","Segoe UI Light","Segoe WP Light","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_14869865502540.20764366313663407" style="text-decoration: none;" href="https://mta.openssl.org/mailman/listinfo/openssl-users" target="_blank">openssl-users Info Page</a></div>
<div id="LPMetadata_14869865502550.9988806102511754" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: 400; font-family: "wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; font-size: 14px; line-height: 14px;">
mta.openssl.org</div>
<div id="LPDescription_14869865502560.4887308977108735" style="display: block; color: rgb(102, 102, 102); font-weight: 400; font-family: "wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
This mailing list is for discussion among those using the OpenSSL software. To see the collection of prior postings to the list, visit the openssl-users Archives</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
</div>
</span></font></div>
</div>
</body>
</html>