Summary: | Allow customers to specify a serial number | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Ken Sharp <ken.sharp> |
Component: | Client API | Assignee: | Ray Johnston <ray.johnston> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | ||
Priority: | P4 | ||
Version: | master | ||
Hardware: | All | ||
OS: | All | ||
Customer: | Word Size: | --- |
Description
Ken Sharp
2011-10-18 16:24:03 UTC
I had thought this was requested by a customer, but no customer ID is in the bug. Ken, please notify the original submitter. As of commit 7b2b1f7 I have added a gp_serialnumber as a platform specific function. The default for most platforms returns the same "magic" serial number as defined with GS_SERIALNUMBER as a C #define or the default "42" (see base.gscdefs.c) The Windows implementation returns a 32-bit value derived from the Registry key "HKEY_LOCAL_MACHINE\Software\Microsoft\MSLicensing\HardwareID\ClientHWID". The algorithm used to derive the serialnumber value is secret (just kidding, see the source -- really just arbitrary). I am NOT at all sure that this is unique across Windows systems, or even supported. If there are any errors from the registry query, we just return the GS_SERIALNUMBER (42). Other ways of implementing this would be to write a key in the registry or in a file that would be used for the DRM. If anyone wants to tackle getting something working for Mac OS/X or linux or other systems, please feel free. We'd welcome the contribution. (In reply to comment #1) > I had thought this was requested by a customer, but no customer ID is in > the bug. Ken, please notify the original submitter. The customer only requested information, but we thought it was useful enough to add more generally so I didn't put a customer ID. The customer was #661 and I've sent them an email to let them know. |