View Full Version : lmcrypt not working

06-15-2006, 08:10 PM
I've inputted all of the necessary vendor keys and set the vendor name in lm_code.h and the makefile. But after I build the new lmcrypt.exe, it doesn't seem to be able to generate the proper signatures for the license files. It doesn't even seem to be able to detect errors in the format of license file (ie: putting letters in the version number doesn't trigger an error). Is there something that I am doing wrong? I don't have any trouble generating sigs with the demo lmcrypt.

I am using Visual Studio 8 to build.

06-16-2006, 09:34 AM
Are there any messages displayed? Have you changed the vendor name (from "demo") in the license files?

06-16-2006, 12:36 PM
The strange thing is that I can't get any error messages out of lmcrypt--even if I add an illegal string to the license file such as letters in the version number. It also seems to crash when I run it as a different user. Do I need to be an administrator to build it?

I've changed the vendor name in all licenses and configuration files. This includes any *.lic files along with the makefile and lm_code.h. Still can't seem to get any result with lm_crypt.

Is there anywhere else that needs to be changed?

06-16-2006, 01:31 PM
Which version of FLEXnet Licensing are you using? If you type lmcrypt -?, does the usage message appear? It's probably up to your development environment and other details whether admin. rights are required to build...

06-19-2006, 12:57 PM
Some further details: I am using version 11.1.1. I've been able to get Lmcrypt to read and write to different license files. However, trying to open and write to the same license file causes the program to crash. This is different from the functionality as described in the documentation and displayed in the demo.

I've looked at the source and there seems to be an issue with the function used to create and manipulate filenames: mktemp() on line 292 of lmcrypt.c . Is there some issue with the use of this function and Visual Studio 2005?

06-20-2006, 12:48 PM
Hmmm... It does seem that function is deprecated in VS 2005; as described here (http://msdn2.microsoft.com/en-us/library/ms235413.aspx), perhaps try replacing mktemp with _mktemp or _mktemp_s?

07-08-2006, 01:01 PM
We, too, are using 11.1.1. We have also had the problem with lmcrypt as described above.

Three things:
1) We got around the problem by typing "lmcrypt -i counted.lic -o x.lic", which doesn't require the use of mktemp().

2) I'm good enough with C to get this stuff compiled, but changing code is something else. Will there be an updated version of lmcrypt.c available that will replace mktemp() with _mktemp_s()? (Not as important, now that I have a workaround.)

3) When I do a build, I see several other C functions that MS has marked obsolete. Will we face the same problems with those in the future as we are with mktemp() now?