[ActiveLock-Development] CVS: activelock2/src ActiveLock.cls,1.10,1.11 Globals.cls,1.10,1.11
Brought to you by:
ialkan
From: Thanh H. T. <th...@us...> - 2003-08-02 08:07:28
|
Update of /cvsroot/activelock/activelock2/src In directory sc8-pr-cvs1:/tmp/cvs-serv8298 Modified Files: ActiveLock.cls Globals.cls Log Message: Ignore expiration date if license type is "permanent". Index: ActiveLock.cls =================================================================== RCS file: /cvsroot/activelock/activelock2/src/ActiveLock.cls,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- ActiveLock.cls 1 Aug 2003 06:13:27 -0000 1.10 +++ ActiveLock.cls 2 Aug 2003 08:07:23 -0000 1.11 @@ -66,6 +66,8 @@ ' 07.28.03 - th2tran - Using RSA signature for license key. ' 07.28.03 - wizzardme2000 - Implemented lockComp, lockHD, and lockWindows ' 07.31.03 - th2tran - Perform checksum on ALCrypto.dll on Init() +' - ValidateKey() to bypass checking expiry +' if there's no expiration date. ' /////////////////////////////////////////////////////////////////////// ' / MODULE CODE BEGINS BELOW THIS LINE / ' /////////////////////////////////////////////////////////////////////// @@ -118,7 +120,7 @@ If mKeyStore Is Nothing Then Err.Raise ActiveLockErrCodeConstants.alerrKeyStoreInvalid, "IActiveLock_Acquire", "Key Store Provider hasn't been initialized yet." End If - + Dim Lic As ProductLicense Set Lic = mKeyStore.Retrieve(mSoftwareName) If Lic Is Nothing Then @@ -162,7 +164,10 @@ If rc <> 0 Then Err.Raise ActiveLockErrCodeConstants.alerrLicenseInvalid, "ActiveLock2", "License invalid." End If + ' Check if license has not expired + ' but don't do it if there's no expiration date + If Lic.Expiration = "" Then Exit Sub Dim dtExp As Date dtExp = CDate(Lic.Expiration) If Now > dtExp Then @@ -282,11 +287,6 @@ UpdateLastUsed Lic mKeyStore.Store Lic End Sub - -Private Function Hash(strHashThis As String) As String - Hash = modMD5.Hash(strHashThis) ' Default type -End Function - Private Function RandomNumber() As String ' Generates a random number Index: Globals.cls =================================================================== RCS file: /cvsroot/activelock/activelock2/src/Globals.cls,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Globals.cls 1 Aug 2003 06:13:27 -0000 1.10 +++ Globals.cls 2 Aug 2003 08:07:23 -0000 1.11 @@ -64,6 +64,8 @@ ' a list of error code constants raised by ActiveLock. ' 07.28.03 - wizzardme2000 - Implemented lockComp, lockHD, and lockWindows ' 07.31.03 - th2tran - Added alerrFileTampered +' - CreateProductLicense() to ignore Expiration date +' for Permanent license type ' ' /////////////////////////////////////////////////////////////////////// ' / MODULE CODE BEGINS BELOW THIS LINE / @@ -114,6 +116,7 @@ '' ' Instantiates a new ProductLicense object. +' If LicType is "Permanent", then Expiration date parameter will be ignored. ' Public Function CreateProductLicense(name As String, _ Code As String, _ @@ -134,7 +137,11 @@ .LicenseClass = GetClassString(LicClass) .LicenseType = GetLicTypeString(LicType) .Licensee = Licensee - .Expiration = Expiration + + ' ignore exipration date if license type is "permanent" + If LicType <> allicPermanent Then + .Expiration = Expiration + End If If Not IsMissing(LicKey) Then .LicenseKey = LicKey End If |