As far as i understand, key is loaded each time string is signed. Wouldn't it be better to load key only once, when Service is created?
P.S. Seems that <code>#include &lt;openssl/applink.c></code> line should be in files, that use openssl functions, at least under windows, so if you are going to separate signing and key loading it might be a good idea to implement load function in this file.