activelock-development Mailing List for ActiveLock (Page 19)
Brought to you by:
ialkan
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(52) |
Aug
(170) |
Sep
(34) |
Oct
(62) |
Nov
(46) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(7) |
Feb
(2) |
Mar
|
Apr
(17) |
May
(14) |
Jun
(31) |
Jul
(59) |
Aug
(18) |
Sep
(3) |
Oct
|
Nov
|
Dec
(5) |
2005 |
Jan
|
Feb
(10) |
Mar
(3) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Thanh H. T. <th...@us...> - 2003-08-04 01:09:22
|
Update of /cvsroot/activelock/activelock2/doc In directory sc8-pr-cvs1:/tmp/cvs-serv21975 Added Files: ReleaseNotes.htm Log Message: Release Notes - First Draft for Alpha 1 --- NEW FILE: ReleaseNotes.htm --- <html> <body> <title>ActiveLock 2.0 Alpha 1 Release Notes</title> <h1> ActiveLock 2.0 Alpha 1 Release Notes</h1> <p>2003-08-03: Current release is version 2.0.alpha.1</p> <p>ActiveLock has gone through a major architectural change and rewrite in version 2 with the goal of achieving better security.</p> <h2>Features in Alpha 1</h2> <ul> <li>Facility allowing the user program to perform a checksum on ActiveLock prior to using it. This helps detect whether ActiveLock has been tampered.</li> <li>Trial and Time expiry licenses are now supported</li> <li>Support for different types of license stores. In Alpha 1, license file storage is implemented. Future releases will support Windows Registry has a storage mechanism.</li> </ul> <h2>Design Changes</h2> <ul> <li>For better security and flexibility, ActiveLock is now an ActiveX DLL instead of an OCX.</li> <li>RSA public key encryption is now being used to encrypt license key and other sensitive information.</li> <li>New API has been developed. See API documentation for details. </ul> <h2>Bug Fixes</h2> <p>Please refer to API documentation for details.</p> <h2>Work in Progress</h2> <ul> <li>Concurrent licensing</li> <li>Site licensing</li> </ul> <h2>ToDo List</h2> <p>Please refer to API documentation for details.</p> <h2>History of ActiveLock</h2> <h3>Version 1.x (1998-2002)</h3> <p>TBD</p> <h3>Version 2.0</h3> <table> <tr> <td><b>Date</b></td> <td><b>Comment</b></td> </tr> <tr> <td>2003/05/01</td> <td>New development group is formed to develop ActiveLock Version 2. Discussions on features and implementations are discussed</td> </tr> <tr> <td>2003/06/01</td> <td>Development begins</td> </tr> <tr> <td>2003/08/04</td> <td>ActiveLock 2.0 Alpha 1 is released</td> </tr> </table> <h2>Bug Fixes</h2> <p>Please refer to API documentation for details.</p> </body> </html> |
From: Thanh H. T. <th...@us...> - 2003-08-04 01:06:49
|
Update of /cvsroot/activelock/activelock2/doc In directory sc8-pr-cvs1:/tmp/cvs-serv21570/doc Log Message: Directory /cvsroot/activelock/activelock2/doc added to the repository |
From: Thanh H. T. <th...@sy...> - 2003-08-03 09:30:42
|
Oops! Missing icons. ----- Original Message ----- From: "Thanh Hai Tran" <th...@sy...> To: <act...@li...> Sent: Sunday, August 03, 2003 5:13 AM Subject: API docs > Mike: Here's my first crack at API docs, autogen'ed by VBDox. Let me know > what you think. > Rest of the team: FYI. > Notice that I'm only generating the main interface and public classes. > Thanh. > |
From: Thanh H. T. <th...@us...> - 2003-08-03 09:26:24
|
Update of /cvsroot/activelock/activelock2/test In directory sc8-pr-cvs1:/tmp/cvs-serv13660 Modified Files: ALTestApp.vbp frmMain.frm Log Message: Updated code comments. Index: ALTestApp.vbp =================================================================== RCS file: /cvsroot/activelock/activelock2/test/ALTestApp.vbp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ALTestApp.vbp 1 Aug 2003 23:43:31 -0000 1.5 +++ ALTestApp.vbp 3 Aug 2003 09:26:21 -0000 1.6 @@ -1,5 +1,5 @@ Type=Exe -Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\..\WINNT\system32\STDOLE2.TLB#OLE Automation +Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#stdole2.tlb#OLE Automation Reference=*\G{AAED8AB4-AC83-4C51-93EE-64664DB96265}#7.0#0#..\src\ActiveLock2.dll#ActiveLock2 Object={BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0; TABCTL32.OCX Form=frmMain.frm Index: frmMain.frm =================================================================== RCS file: /cvsroot/activelock/activelock2/test/frmMain.frm,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- frmMain.frm 2 Aug 2003 07:18:17 -0000 1.7 +++ frmMain.frm 3 Aug 2003 09:26:21 -0000 1.8 @@ -66,15 +66,15 @@ TabCaption(1) = "Registration" TabPicture(1) = "frmMain.frx":001C Tab(1).ControlEnabled= 0 'False - Tab(1).Control(0)= "fraRegStatus" - Tab(1).Control(1)= "fraReg" + Tab(1).Control(0)= "fraReg" + Tab(1).Control(1)= "fraRegStatus" Tab(1).ControlCount= 2 TabCaption(2) = "Sample App" TabPicture(2) = "frmMain.frx":0038 Tab(2).ControlEnabled= 0 'False - Tab(2).Control(0)= "Frame1" + Tab(2).Control(0)= "fraTicker" Tab(2).Control(1)= "fraViewport" - Tab(2).Control(2)= "fraTicker" + Tab(2).Control(2)= "Frame1" Tab(2).ControlCount= 3 Begin VB.TextBox txtChecksum BackColor = &H80000011& @@ -301,17 +301,17 @@ Left = 0 Top = 0 Width = 7850 - _extentx = 13838 - _extenty = 661 - tickerscaleheight= 21 - tickerscalewidth= 519 - tickerfontbold = -1 'True - tickerfontsize = 11.25 - tickerflash = 0 'False - tickerplaysound = 0 'False - tickerscrollx = 123 - balloontipicon = 0 - balloontiptext = "No Messages" + _ExtentX = 13838 + _ExtentY = 661 + TickerScaleHeight= 21 + TickerScaleWidth= 519 + TickerFontBold = -1 'True + TickerFontSize = 11.25 + TickerFlash = 0 'False + TickerPlaySound = 0 'False + TickerScrollX = 518 + BalloonTipIcon = 0 + BalloonTipText = "No Messages" End End Begin VB.Frame fraTicker @@ -625,27 +625,78 @@ Private WithEvents ActiveLockEventSink As ActiveLockEventNotifier Attribute ActiveLockEventSink.VB_VarHelpID = -1 + ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -' Key Validation Functionalities +' ActiveLock Initialization ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +Private Sub Form_Load() + FunctionalitiesEnabled = False ' Disable functionalities by default + ' Initialize AL + Set MyActiveLock = ActiveLock2.NewInstance() + ' Verify AL's authenticity + ' VerifyActiveLockdll requires a public-creatable object to be passed in so that it can + ' determine the Type Library DLL on which to perform the checksum. + ' So can't use MyActiveLock object to authenticate since it is not a public creatable object. + ' So we'll use ActiveLock2.Globals, which is just as good because they are in the same DLL. + txtChecksum = modMain.VerifyActiveLockdll(New ActiveLock2.Globals) + + ' Initialize the keystore. We use a File keystore in this case. + MyActiveLock.KeyStoreType = alsFile + MyActiveLock.KeyStorePath = App.Path & "\al.lic" + ' Obtain the EventNotifier so that we can receive notifications from AL. + Set ActiveLockEventSink = MyActiveLock.EventNotifier + + ' Initialize other application settings + With atViewPort1 + .BalloonTipEnabled = chkEnable + .BalloonTipText = .TickerText + .TickerBlackout = chkBlackout + .TickerFlash = chkFlash + .TickerPlaySound = chkSound + .TickerScroll = chkScroll + End With + txtName = App.EXEName + txtVersion = App.Major & "." & App.Minor & "." & App.Revision + cboSpeed = cboSpeed.List(2) + txtSoftwareCodePriv = modMain.PRIV_KEY + txtSoftwareCodePub = modMain.PUB_KEY + + 'These MUST to be set BEFORE you generate the reg code + 'or the app will fail to register properly on the next run + 'I am going to add lots of comments here so that people + ' will find it because it messed me up for hours. + ' + '****************************************************************** + '* Don't Forget This!!!!!!!! * + '****************************************************************** + + cmbLicType = "Permanent" + cmbLicClass = "Class 4 - Lock To Hard Drive Serial" + + ' Check registration status + On Error GoTo NotRegistered + MyActiveLock.Acquire + txtRegStatus = "Registered" + txtUsedDays = MyActiveLock.UsedDays + txtExpiration = MyActiveLock.ExpirationDate + FunctionalitiesEnabled = True + Exit Sub +NotRegistered: + MsgBox Err.Number & ": " & Err.Description + txtRegStatus = "Not Registered" +End Sub -'Private Sub ActiveLockEventSink_ValidateKey(ByVal strLic As String, Result As Variant) -' ' Decrypt LicenseKey using our private key -' strKey = modMain.Decrypt(strKey) -'Debug.Print "ActiveLockEventSink_Validate key: " & vbCrLf & strKey -' Dim strKey2$ -'' Dim arrBytes() As Byte -'' arrBytes = StrConv(strKey, vbFromUnicode) -' strKey2 = TrimNulls(strKey) ' trim nulls -' ' Compare for a match against Lic.ToString() -' ' If matched return YES; otherwise return NO -' If strLic = strKey2 Then -' Result = modActiveLock.MAGICNUMBER_YES -' Else -' Result = modActiveLock.MAGICNUMBER_NO -' End If -'End Sub + +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +' Key Validation Functionalities +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +'' +' ActiveLock raises this event typically when it needs a value to be encrypted. +' We can use any kind of encryption we'd like here, as long as it's deterministic. +' i.e. there's a one-to-one correspondence between unencrypted value and encrypted value. +' NOTE: BlowFish is NOT an example of deterministic encryption so you can't use it here. Private Sub ActiveLockEventSink_ValidateValue(ByVal Value As String, Result As String) Result = modMain.Encrypt(Value) End Sub @@ -849,58 +900,6 @@ atViewPort1.BalloonTipText = atViewPort1.TickerText atViewPort1.BalloonTipIcon = InfoIcon atViewPort1.BalloonTipTitle = "ActiveTicker Says:" -End Sub - -Private Sub Form_Load() - FunctionalitiesEnabled = False ' Disable functionalities by default - ' Initialize AL - Set MyActiveLock = ActiveLock2.NewInstance() - ' Verify AL's authenticity - txtChecksum = modMain.VerifyActiveLockdll(New ActiveLock2.Globals) - - MyActiveLock.KeyStoreType = alsFile - MyActiveLock.KeyStorePath = App.Path & "\al.lic" - - Set ActiveLockEventSink = MyActiveLock.EventNotifier - - ' Initialize other application settings - With atViewPort1 - .BalloonTipEnabled = chkEnable - .BalloonTipText = .TickerText - .TickerBlackout = chkBlackout - .TickerFlash = chkFlash - .TickerPlaySound = chkSound - .TickerScroll = chkScroll - End With - txtName = App.EXEName - txtVersion = App.Major & "." & App.Minor & "." & App.Revision - cboSpeed = cboSpeed.List(2) - txtSoftwareCodePriv = modMain.PRIV_KEY - txtSoftwareCodePub = modMain.PUB_KEY - - 'These MUST to be set BEFORE you generate the reg code - 'or the app will fail to register properly on the next run - 'I am going to add lots of comments here so that people - ' will find it because it messed me up for hours. - ' - '****************************************************************** - '* Don't Forget This!!!!!!!! * - '****************************************************************** - - cmbLicType = "Permanent" - cmbLicClass = "Class 4 - Lock To Hard Drive Serial" - - ' Check registration status - On Error GoTo NotRegistered - MyActiveLock.Acquire - txtRegStatus = "Registered" - txtUsedDays = MyActiveLock.UsedDays - txtExpiration = MyActiveLock.ExpirationDate - FunctionalitiesEnabled = True - Exit Sub -NotRegistered: - MsgBox Err.Number & ": " & Err.Description - txtRegStatus = "Not Registered" End Sub Private Property Let FunctionalitiesEnabled(flag As Boolean) |
From: Thanh H. T. <th...@sy...> - 2003-08-03 09:13:33
|
Mike: Here's my first crack at API docs, autogen'ed by VBDox. Let me know what you think. Rest of the team: FYI. Notice that I'm only generating the main interface and public classes. Thanh. |
From: Thanh H. T. <th...@us...> - 2003-08-03 09:01:09
|
Update of /cvsroot/activelock/activelock2/src In directory sc8-pr-cvs1:/tmp/cvs-serv10625 Modified Files: ActiveLockEventNotifier.cls Globals.cls IActiveLock.cls IKeyStoreProvider.cls ProductLicense.cls Log Message: Minor change: Use HTML code ' in place of ' in comment. Index: ActiveLockEventNotifier.cls =================================================================== RCS file: /cvsroot/activelock/activelock2/src/ActiveLockEventNotifier.cls,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ActiveLockEventNotifier.cls 3 Aug 2003 08:38:11 -0000 1.4 +++ ActiveLockEventNotifier.cls 3 Aug 2003 09:01:04 -0000 1.5 @@ -43,11 +43,10 @@ '* '' -' This class handles COM event notifications to the interested observers. +' This class handles ActiveLock COM event notifications to the interested observers. ' It is simply a wrapper containing pubic events. These events should -' really belong in IActiveLock, but since VB doesn't support inheritance -' of events, meaning ActiveLock class can't raise IActiveLock events, we -' have to do it this way. +' really belong in IActiveLock, but since VB doesn't support inheritance +' of events, we have to do it this way. ' ' @author th...@us... ' @version 2.0.0 @@ -62,10 +61,12 @@ ' /////////////////////////////////////////////////////////////////////// ' / MODULE CHANGE LOG / ' /////////////////////////////////////////////////////////////////////// -' +' @history +' <pre> ' 07.20.03 - th2tran - Created -' -' +' 08.03.03 - th2tran - VBDox'ed this interface. +' </pre> + ' /////////////////////////////////////////////////////////////////////// ' / MODULE CODE BEGINS BELOW THIS LINE / ' /////////////////////////////////////////////////////////////////////// Index: Globals.cls =================================================================== RCS file: /cvsroot/activelock/activelock2/src/Globals.cls,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Globals.cls 3 Aug 2003 08:38:11 -0000 1.12 +++ Globals.cls 3 Aug 2003 09:01:04 -0000 1.13 @@ -71,7 +71,7 @@ ' 07.31.03 - th2tran - Added alerrFileTampered ' - CreateProductLicense() to ignore Expiration date ' for Permanent license type -' 08.03.03 - th2tran - VBDox'ed this class. +' 08.03.03 - th2tran - VBDox'ed this class. ' </pre> ' /////////////////////////////////////////////////////////////////////// ' / MODULE CODE BEGINS BELOW THIS LINE / @@ -131,7 +131,7 @@ ' @param RegisteredDate Date on which the product is registered ' @param Hash1 Hash-1 code ' -Public Function CreateProductLicense(Name As String, _ +Public Function CreateProductLicense(name As String, _ Code As String, _ Ver As String, _ LicClass As ActiveLock2.ALLockTypes, _ @@ -144,7 +144,7 @@ ) As ProductLicense Dim NewLic As New ProductLicense With NewLic - .ProductName = Name + .ProductName = name .ProductKey = Code .ProductVer = Ver .LicenseClass = GetClassString(LicClass) @@ -231,15 +231,15 @@ ' @param strData Data to be signed ' @return Signature string. ' -Public Function RSASign(strPub As String, strPriv As String, strData As String) As String +Public Function RSASign(strPub As String, strPriv As String, strdata As String) As String Dim Key As RSAKey ' create the key from the key blobs modActiveLock.rsa_createkey strPub, Len(strPub), strPriv, Len(strPriv), Key ' sign the data using the created key Dim sLen& - rsa_sign Key, strData, Len(strData), vbNullString, sLen + rsa_sign Key, strdata, Len(strdata), vbNullString, sLen Dim strSig As String: strSig = String(sLen, 0) - modActiveLock.rsa_sign Key, strData, Len(strData), strSig, sLen + modActiveLock.rsa_sign Key, strdata, Len(strdata), strSig, sLen ' throw away the key modActiveLock.rsa_freekey Key RSASign = strSig @@ -252,13 +252,13 @@ ' @param strSig Private key blob ' @return Zero if verification is successful; Non-zero otherwise. ' -Public Function RSAVerify(strPub As String, strData As String, strSig As String) As Long +Public Function RSAVerify(strPub As String, strdata As String, strSig As String) As Long Dim Key As RSAKey Dim rc& ' create the key from the public key blob rsa_createkey strPub, Len(strPub), vbNullString, 0, Key ' validate the key - rc = rsa_verifysig(Key, strSig, Len(strSig), strData, Len(strData)) + rc = rsa_verifysig(Key, strSig, Len(strSig), strdata, Len(strdata)) ' de-allocate memory used by the key rsa_freekey Key RSAVerify = rc Index: IActiveLock.cls =================================================================== RCS file: /cvsroot/activelock/activelock2/src/IActiveLock.cls,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- IActiveLock.cls 3 Aug 2003 08:38:11 -0000 1.7 +++ IActiveLock.cls 3 Aug 2003 09:01:04 -0000 1.8 @@ -71,13 +71,13 @@ ' ... ' Private Sub Form_Load() ' On Error GoTo Hell -' '' Obtain an instance of AL +' ' Obtain an instance of AL ' Set MyActiveLock = ActiveLock2.NewInstance() -' '' Verify AL's authenticity -' '' modActiveLock.CRCCheckSumTypeLib() requires a public-creatable object to be passed in so that it can -' '' determine the Type Library DLL on which to perform the checksum. -' '' So can't use MyActiveLock object to authenticate since it is not a public creatable object. -' '' So we'll use ActiveLock2.Globals, which is just as good because they are in the same DLL. +' ' Verify AL's authenticity +' ' modActiveLock.CRCCheckSumTypeLib() requires a public-creatable object to be passed in so that it can +' ' determine the Type Library DLL on which to perform the checksum. +' ' So can't use MyActiveLock object to authenticate since it is not a public creatable object. +' ' So we'll use ActiveLock2.Globals, which is just as good because they are in the same DLL. ' Dim crc As Long ' crc = modActiveLock.CRCCheckSumTypeLib(New ActiveLock2.Globals) ' Debug.Print "Hash: " & crc @@ -85,76 +85,76 @@ ' MsgBox "ActiveLock2.dll has been corrupted. If you were running a real application, it should terminate at this point." ' End If '<br> -' '' Initialize the keystore. We use a File keystore in this case. +' ' Initialize the keystore. We use a File keystore in this case. ' MyActiveLock.KeyStoreType = alsFile ' MyActiveLock.KeyStorePath = App.path & "\al.lic" '<br> -' '' Obtain the EventNotifier so that we can receive notifications from AL. +' ' Obtain the EventNotifier so that we can receive notifications from AL. ' Set ActiveLockEventSink = MyActiveLock.EventNotifier '<br> -' '' Specify the name of the product that will be locked through AL. +' ' Specify the name of the product that will be locked through AL. ' MyActiveLock.SoftwareName = "MyApp" '<br> -' '' Specify our product code. This is a RSA public key, which will be used later by ActiveLock to validate license signatures +' ' Specify our product code. This is a RSA public key, which will be used later by ActiveLock to validate license signatures ' MyActiveLock.SoftwareCode = "AAAAB3NzaC1yc2EAAAABJQAAAIBZnXD4IKfrBH25ekwLWQMs5mJuNH7D7U99EKFIsVhKQv17GHxKWvxHv/FwWhI1Rmd8TCiqk4Wmk7H1rh6xdbIVBwDj+RSeiXs8mmQX4/XvaWZx9BIQr5wODWnQCH/tj6Y6In2Xjc2J3B7LSjD60cWDBY/u+z9cSheTHLyhb16zFw==" '<br> -' '' Specify product version +' ' Specify product version ' MyActiveLock.SoftwareVersion = txtVersion '<br> -' '' Specify License Type +' ' Specify License Type ' MyActiveLock.LicenseType = allicTimeLocked '<br> -' '' Specify Lock Type +' ' Specify Lock Type ' MyActiveLock.LockType = lockHD '<br> -' '' Now initialize AL +' ' Now initialize AL ' MyActiveLock.Init '<br> -' '' At this point, either AL has been initialized or an error would have already been raised -' '' if there were problems (such as the DLL has been tampered). +' ' At this point, either AL has been initialized or an error would have already been raised +' ' if there were problems (such as the DLL has been tampered). '<br> -' '' Check registration status by calling Acquire() -' '' Note: Calling Acquire() may trigger ActiveLockEventNotifier_ValidateValue() event. -' '' So we must be prepared to handle that. -' MyActiveLock.Acquire +' ' Check registration status by calling Acquire() +' ' Note: Calling Acquire() may trigger ActiveLockEventNotifier_ValidateValue() event. +' ' So we must be prepared to handle that. +' MyActiveLock.Acquire '<br> -' '' By now, if the product is not registered, then an error whould have been raised, -' '' which means if we get to here, then we're registered. +' ' By now, if the product is not registered, then an error whould have been raised, +' ' which means if we get to here, then we're registered. '<br> -' '' Just for fun, print out some registration status info +' ' Just for fun, print out some registration status info ' Debug.Print "Used Days: " & MyActiveLock.UsedDays ' Debug.Print "Expiration Date: " & MyActiveLock.ExpirationDate ' Exit Sub ' Hell: ' MsgBox Err.Number & ": " & Err.Description -' '' End program +' ' End program ' End ' End Sub ' ... ' ... -' '' -' '' ActiveLock raises this event typically when it needs a value to be encrypted. -' '' We can use any kind of encryption we'd like here, as long as it's deterministic. -' '' i.e. there's a one-to-one correspondence between unencrypted value and encrypted value. -' '' NOTE: BlowFish is NOT an example of deterministic encryption so you can't use it here. +' ' +' ' ActiveLock raises this event typically when it needs a value to be encrypted. +' ' We can use any kind of encryption we'd like here, as long as it's deterministic. +' ' i.e. there's a one-to-one correspondence between unencrypted value and encrypted value. +' ' NOTE: BlowFish is NOT an example of deterministic encryption so you can't use it here. ' Private Sub ActiveLockEventSink_ValidateValue(ByVal Value As String, Result As String) ' Result = Encrypt(Value) ' End Sub '<br> -' '' Encrypts a string. +' ' Encrypts a string. ' Private Function Encrypt(strData As String) As String ' Dim Key As RSAKey -' '' create the key from the key blobs +' ' create the key from the key blobs ' modActiveLock.rsa_createkey PUB_KEY, Len(PUB_KEY), PRIV_KEY, Len(PRIV_KEY), Key '<br> -' '' sign the data using the created key +' ' sign the data using the created key ' Dim dLen& ' Dim strEnc As String * 255 ' strEnc = strData ' dLen = Len(strData) ' modActiveLock.rsa_encrypt 1, strEnc, dLen, Key '<br> -' '' done with the key - throw it away +' ' done with the key - throw it away ' modActiveLock.rsa_freekey Key '<br> ' Dim strOut As String @@ -179,7 +179,7 @@ ' <pre> ' 07.07.03 - mcrute - Updated the header comments for this file. ' 07.20.03 - th2tran - Added EventNotifier used for firing COM events. -' 08.03.03 - th2tran - VBDox'ed this interface. +' 08.03.03 - th2tran - VBDox'ed this interface. ' ' </pre> @@ -190,7 +190,7 @@ Option Explicit '' -' License Types. Values are mutually exclusive. i.e. they cannot be OR'd together. +' License Types. Values are mutually exclusive. i.e. they cannot be OR'd together. ' ' @param allicNone Not licensed ' @param allicPeriodic License expires after X number of days @@ -204,7 +204,7 @@ End Enum '' -' License Lock Types. Values can be combined (OR''ed) together. +' License Lock Types. Values can be combined (OR'ed) together. ' ' @param lockNone No locking - not recommended ' @param lockWindows Lock to windows serial number @@ -222,7 +222,7 @@ End Enum '' -' License Flags. Values can be combined (OR''ed) together. +' License Flags. Values can be combined (OR'ed) together. ' ' @param alfSingle Single-user license ' @param alfMulti Multi-user license @@ -325,7 +325,7 @@ ' @param Path The path to be used for the specified KeyStoreType. ' e.g. If <code>alsFile</code> is used for <code>KeyStoreType</code>, then Path specifies the path to the license file. ' If <code>alsRegistry</code> is used for <code>KeyStoreType</code>, the Path specifies the Registry hive where license information is stored. -Public Property Let KeyStorePath(Path As String) +Public Property Let KeyStorePath(path As String) End Property Index: IKeyStoreProvider.cls =================================================================== RCS file: /cvsroot/activelock/activelock2/src/IKeyStoreProvider.cls,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- IKeyStoreProvider.cls 3 Aug 2003 08:38:11 -0000 1.6 +++ IKeyStoreProvider.cls 3 Aug 2003 09:01:04 -0000 1.7 @@ -64,7 +64,7 @@ ' @history ' <pre> ' 07.07.03 - mcrute - Updated the header comments for this file. -' 08.03.03 - th2tran - VBDox'ed this class. +' 08.03.03 - th2tran - VBDox'ed this class. ' </pre> ' /////////////////////////////////////////////////////////////////////// @@ -77,7 +77,7 @@ ' Example: path to a license file, or path to the Windows Registry hive. ' @param Path Key store path. ' -Public Property Let KeyStorePath(Path As String) +Public Property Let KeyStorePath(path As String) End Property Index: ProductLicense.cls =================================================================== RCS file: /cvsroot/activelock/activelock2/src/ProductLicense.cls,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ProductLicense.cls 3 Aug 2003 08:38:11 -0000 1.5 +++ ProductLicense.cls 3 Aug 2003 09:01:04 -0000 1.6 @@ -63,7 +63,7 @@ ' <pre> ' 06.16.03 - th2tran - created ' 07.07.03 - mecrute - Updated the header comments for this file. -' 08.03.03 - th2tran - VBDox'ed this class. +' 08.03.03 - th2tran - VBDox'ed this class. ' </pre> @@ -102,8 +102,8 @@ '' ' [INTERNAL] Specifies product name. ' -Friend Property Let ProductName(Name As String) - mstrProductName = Name +Friend Property Let ProductName(name As String) + mstrProductName = name End Property '' @@ -176,8 +176,8 @@ '' ' [INTERNAL] Specifies the licensed user. ' -Friend Property Let Licensee(Name As String) - mstrLicensee = Name +Friend Property Let Licensee(name As String) + mstrLicensee = name End Property '' |
From: Thanh H. T. <th...@us...> - 2003-08-03 08:38:16
|
Update of /cvsroot/activelock/activelock2/src In directory sc8-pr-cvs1:/tmp/cvs-serv7316 Modified Files: ActiveLock.cls ActiveLockEventNotifier.cls Globals.cls IActiveLock.cls IKeyStoreProvider.cls ProductLicense.cls Log Message: - VBDox'ed publicly accesible classes. - Corrected typo: ActiveLockErrCodeConstants.alerrLockChanged -> ActiveLockErrCodeConstants.alerrClockChanged, Index: ActiveLock.cls =================================================================== RCS file: /cvsroot/activelock/activelock2/src/ActiveLock.cls,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- ActiveLock.cls 2 Aug 2003 08:07:23 -0000 1.11 +++ ActiveLock.cls 3 Aug 2003 08:38:11 -0000 1.12 @@ -43,9 +43,8 @@ '* '' -' This is an unsecure implementation of IActiveLock, and hence it -' needs to be private. Access to this class from the outside world is -' brokered via the ActiveLockAgent object. +' This is an implementation of IActiveLock. It is not public-creatable, and so must only +' be accessed via ActiveLock.NewInstance() method. ' ' @author th...@us... ' @version 2.0.0 @@ -55,19 +54,23 @@ ' / MODULE TO DO LIST / ' /////////////////////////////////////////////////////////////////////// ' -' [ ] Implement IActiveLock_Release -' [ ] Implement IActiveLock_Transfer -' -' /////////////////////////////////////////////////////////////////////// +' @todo Implement IActiveLock_Release. Not sure what if anything needs to be +' done here. +' @todo Implement IActiveLock_Transfer. This is the functionality to transfer +' a license from one machine to another. + +'* /////////////////////////////////////////////////////////////////////// ' / MODULE CHANGE LOG / ' /////////////////////////////////////////////////////////////////////// -' -' 07.07.03 - mcrute - Updated the header comments for this file. -' 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. +' @history +' <pre> +' 07.07.03 - mcrute - Updated the header comments for this file. +' 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. +' </pre> + ' /////////////////////////////////////////////////////////////////////// ' / MODULE CODE BEGINS BELOW THIS LINE / ' /////////////////////////////////////////////////////////////////////// @@ -107,9 +110,9 @@ Private Sub IActiveLock_Init(Arg1 As Variant, ParamArray OtherArgs() As Variant) ' Checksum ALCrypto.dll Const ALCRYPTO_MD5$ = "ac0dd6351905e6d688199146165170c4" - Dim strdata As String, strMD5 As String - Call modActiveLock.ReadFile(App.path & "\ALCrypto.Dll", strdata) - strMD5 = modMD5.Hash(strdata) ' use our own MD5 hashing routine instead of ALCrypto's md5_hash() function. + Dim strData As String, strMD5 As String + Call modActiveLock.ReadFile(App.Path & "\ALCrypto.Dll", strData) + strMD5 = modMD5.Hash(strData) ' use our own MD5 hashing routine instead of ALCrypto's md5_hash() function. If strMD5 <> ALCRYPTO_MD5 Then Err.Raise ActiveLockErrCodeConstants.alerrFileTampered, "IActiveLock_Acquire", "ALCrypto.dll has been tampered." End If @@ -196,7 +199,7 @@ ' try to detect the user setting their system clock back If Now < CDate(Lic.LastUsed) Then ' TODO: Need to account for Daylight Savings Time - Err.Raise ActiveLockErrCodeConstants.alerrLockChanged, "ActiveLock2", "License invalid. You have set your system clock backward!" + Err.Raise ActiveLockErrCodeConstants.alerrClockChanged, "ActiveLock2", "License invalid. You have set your system clock backward!" End If UpdateLastUsed Lic mKeyStore.Store Lic Index: ActiveLockEventNotifier.cls =================================================================== RCS file: /cvsroot/activelock/activelock2/src/ActiveLockEventNotifier.cls,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ActiveLockEventNotifier.cls 28 Jul 2003 06:35:30 -0000 1.3 +++ ActiveLockEventNotifier.cls 3 Aug 2003 08:38:11 -0000 1.4 @@ -75,6 +75,8 @@ '' ' ProductLicense Property Value validation event allows the client application ' to return the encrypted version of a license property value. +' The client will receive this event, encrypt <code>Value</code> using its own encryption algorithm, +' and store the result in <code>Result</code> to be returned to ActiveLock. ' @param Value Property value. ' @param Result Encrypted value. Public Event ValidateValue(ByVal Value As String, Result As String) Index: Globals.cls =================================================================== RCS file: /cvsroot/activelock/activelock2/src/Globals.cls,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Globals.cls 2 Aug 2003 08:07:23 -0000 1.11 +++ Globals.cls 3 Aug 2003 08:38:11 -0000 1.12 @@ -44,6 +44,10 @@ '' ' This class contains global object factory and utility methods. +' It is a global class so its routines in here can be accessed directly +' from the ActiveLock2 namespace. +' For example, the <code>NewInstance()</code> routine can be access via +' <code>ActiveLock2.NewInstance()</code>. ' ' @author th...@us... ' @version 2.0.0 @@ -52,13 +56,14 @@ '* /////////////////////////////////////////////////////////////////////// ' / MODULE TO DO LIST / ' /////////////////////////////////////////////////////////////////////// +' @todo GetLicTypeString() - Implement this fully. ' -' [ ] GetLicTypeString() - implement this -' + ' /////////////////////////////////////////////////////////////////////// ' / MODULE CHANGE LOG / ' /////////////////////////////////////////////////////////////////////// -' +' @history +' <pre> ' 07.07.03 - mcrute - Updated the header comments for this file. ' 07.21.03 - th2tran - Added ActiveLockErrCodeConstants to contain ' a list of error code constants raised by ActiveLock. @@ -66,36 +71,32 @@ ' 07.31.03 - th2tran - Added alerrFileTampered ' - CreateProductLicense() to ignore Expiration date ' for Permanent license type -' +' 08.03.03 - th2tran - VBDox'ed this class. +' </pre> ' /////////////////////////////////////////////////////////////////////// ' / MODULE CODE BEGINS BELOW THIS LINE / ' /////////////////////////////////////////////////////////////////////// Option Explicit '' -' This class contains global object factory and utility methods. -' -' @author th2tran -' @version 2.0.0 -' @date 20030616 -' - - -'' ' ActiveLock Error Codes ' ' @param alerrOK No error. Operation was successful. +' @param alerrNoLicense No license available. ' @param alerrLicenseInvalid License is invalid. ' @param alerrLicenseExpired License has expired. -' @param alerrKeyStoreInvalid Key Store Provider hasn't been initialized yet. -' @param alerrNoLicense No license available. +' @param alerrLicenseTampered License has been tampered. +' @param alerrClockChanged System as been set back. +' @param alerrKeyStoreInvalid Key Store Provider has not been initialized yet. +' @param alerrFileTampered License file has been tampered. +' @param alerrNotInitialized ActiveLock has not been initialized yet. Public Enum ActiveLockErrCodeConstants alerrOK = 0 ' successful alerrNoLicense = &H80040001 ' vbObjectError (&H80040000) + 1 alerrLicenseInvalid = &H80040002 alerrLicenseExpired = &H80040003 alerrLicenseTampered = &H80040004 - alerrLockChanged = &H80040005 + alerrClockChanged = &H80040005 alerrKeyStoreInvalid = &H80040010 alerrFileTampered = &H80040011 alerrNotInitialized = &H80040012 @@ -103,6 +104,7 @@ '' ' Returns a new instance of an object that implements IActiveLock interface. +' @param Args Optional list of parameters. ' Public Function NewInstance(Optional Args As Variant) As IActiveLock 'TODO: Add parameters as appropriate Dim NewInst As IActiveLock @@ -118,7 +120,18 @@ ' Instantiates a new ProductLicense object. ' If LicType is "Permanent", then Expiration date parameter will be ignored. ' -Public Function CreateProductLicense(name As String, _ +' @param Name Product/Software Name +' @param Code Product/Software Code +' @param Ver Product version +' @param Licclass License class +' @param LicType License type +' @param Licensee Registered party for which the license has been issued +' @param Expiration Expiration date +' @param LicKey License key +' @param RegisteredDate Date on which the product is registered +' @param Hash1 Hash-1 code +' +Public Function CreateProductLicense(Name As String, _ Code As String, _ Ver As String, _ LicClass As ActiveLock2.ALLockTypes, _ @@ -131,7 +144,7 @@ ) As ProductLicense Dim NewLic As New ProductLicense With NewLic - .ProductName = name + .ProductName = Name .ProductKey = Code .ProductVer = Ver .LicenseClass = GetClassString(LicClass) @@ -173,6 +186,8 @@ '' ' Returns a string version of LicType ' +' @param LicType License Type +' Private Function GetLicTypeString(LicType As ALLicType) As String 'TODO: Implement this properly. GetLicTypeString = "Single" @@ -180,12 +195,14 @@ '' ' Trim Null characters from the string. +' @param str String to be trimmed. ' Public Function TrimNulls(str As String) As String TrimNulls = modActiveLock.TrimNulls(str) End Function '' ' Computes an MD5 hash of the specified string. +' @param str String to be hashed. ' Public Function MD5Hash(str As String) As String MD5Hash = modMD5.Hash(str) @@ -193,6 +210,7 @@ '' ' Base-64 encode the specified string. +' @param str String to be encoded ' Public Function Base64Encode(str As String) As String Base64Encode = modBase64.Base64_Encode(str) @@ -200,6 +218,7 @@ '' ' Base-64 decode the string. +' @param strEncoded String to be decoded ' Public Function Base64Decode(strEncoded As String) As String Base64Decode = modBase64.Base64_Decode(strEncoded) @@ -207,16 +226,20 @@ '' ' Performs RSA signing of strData using the specified key. +' @param strPub Public key blob +' @param strPriv Private key blob +' @param strData Data to be signed +' @return Signature string. ' -Public Function RSASign(strPub As String, strPriv As String, strdata As String) As String +Public Function RSASign(strPub As String, strPriv As String, strData As String) As String Dim Key As RSAKey ' create the key from the key blobs modActiveLock.rsa_createkey strPub, Len(strPub), strPriv, Len(strPriv), Key ' sign the data using the created key Dim sLen& - rsa_sign Key, strdata, Len(strdata), vbNullString, sLen + rsa_sign Key, strData, Len(strData), vbNullString, sLen Dim strSig As String: strSig = String(sLen, 0) - modActiveLock.rsa_sign Key, strdata, Len(strdata), strSig, sLen + modActiveLock.rsa_sign Key, strData, Len(strData), strSig, sLen ' throw away the key modActiveLock.rsa_freekey Key RSASign = strSig @@ -224,14 +247,18 @@ '' ' Verifies an RSA signature. +' @param strPub Public key blob +' @param strData Data to be signed +' @param strSig Private key blob +' @return Zero if verification is successful; Non-zero otherwise. ' -Public Function RSAVerify(strPub As String, strdata As String, strSig As String) As Long +Public Function RSAVerify(strPub As String, strData As String, strSig As String) As Long Dim Key As RSAKey Dim rc& ' create the key from the public key blob rsa_createkey strPub, Len(strPub), vbNullString, 0, Key ' validate the key - rc = rsa_verifysig(Key, strSig, Len(strSig), strdata, Len(strdata)) + rc = rsa_verifysig(Key, strSig, Len(strSig), strData, Len(strData)) ' de-allocate memory used by the key rsa_freekey Key RSAVerify = rc Index: IActiveLock.cls =================================================================== RCS file: /cvsroot/activelock/activelock2/src/IActiveLock.cls,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- IActiveLock.cls 28 Jul 2003 06:35:30 -0000 1.6 +++ IActiveLock.cls 3 Aug 2003 08:38:11 -0000 1.7 @@ -43,8 +43,126 @@ '* '' -' This is the interface by which all ActiveLock implemenations must -' adhere. +' This is the main interface into ActiveLock. +' The user program interacts with ActiveLock via this IActiveLock interface. +' Typically, the user program would obtain an instance of this interface via the +' <code>ActiveLock2.NewInstance()</code> accessor method. From there, initialization calls are taken +' place, and then various method such as <code>Register()</code>, <code>Acquire()</code>, etc..., can be used. +' ActiveLock also sends event notifications to to the user program whenever it needs the +' user program's help to perform some action, such as parameter validation. These events +' are sent via the ActiveLockEventNotifier object, which can be obtained from IActiveLock_Notifier() +' accessor method. +' <p> +' <b>Important!</b> It is also strongly recommended that a checksum on ActiveLock2.dll be performed +' prior to accessing and interacting with ActiveLock. See sample code below on how it is done. +' <p> The sample code below illustrates of how this interface is used. +' <pre> +' Form1.frm: +' ... +' Private MyActiveLock As ActiveLock2.IActiveLock +' Private WithEvents ActiveLockEventSink As ActiveLockEventNotifier +' Private Const AL_CRC& = 308603 '' ActiveLock2.dll's CRC checksum to be used for validation +'<br> +' '' This RSA private key will be used for data encryption and/or license key signing. +' Private Const PRIV_KEY$ = "AAAAgEPRFzhQEF7S91vt2K6kOcEdDDe5BfwNiEL30/+ozTFHc7cZctB8NIlS++ZR//D3AjSMqScjh7xUF/gwvUgGCjiExjj1DF/XWFWnPOCfF8UxYAizCLZ9fdqxb1FRpI5NoW0xxUmvxGjmxKwazIW4P4XVi/+i1Bvh2qQ6ri3whcsNAAAAQQCyWGsbJKO28H2QLYH+enb7ehzwBThqfAeke/Gv1Te95yIAWme71I9aCTTlLsmtIYSk9rNrp3sh9ItD2Re67SE7AAAAQQCAookH1nws1gS2XP9cZTPaZEmFLwuxlSVsLQ5RWmd9cuxpgw5y2gIskbL4c+4oBuj0IDwKtnMrZq7UfV9I5VfVAAAAQQCEnyAuO0ahXH3KhAboop9+tCmRzZInTrDYdMy23xf3PLCLd777dL/Y2Y+zmaH1VO03m6iOog7WLiN4dCL7m+Im" +' '' This RSA public key will be used as the product's software code. +' Private Const PUB_KEY$ = "AAAAB3NzaC1yc2EAAAABJQAAAIBZnXD4IKfrBH25ekwLWQMs5mJuNH7D7U99EKFIsVhKQv17GHxKWvxHv/FwWhI1Rmd8TCiqk4Wmk7H1rh6xdbIVBwDj+RSeiXs8mmQX4/XvaWZx9BIQr5wODWnQCH/tj6Y6In2Xjc2J3B7LSjD60cWDBY/u+z9cSheTHLyhb16zFw==" +'<br> +' ... +' Private Sub Form_Load() +' On Error GoTo Hell +' '' Obtain an instance of AL +' Set MyActiveLock = ActiveLock2.NewInstance() +' '' Verify AL's authenticity +' '' modActiveLock.CRCCheckSumTypeLib() requires a public-creatable object to be passed in so that it can +' '' determine the Type Library DLL on which to perform the checksum. +' '' So can't use MyActiveLock object to authenticate since it is not a public creatable object. +' '' So we'll use ActiveLock2.Globals, which is just as good because they are in the same DLL. +' Dim crc As Long +' crc = modActiveLock.CRCCheckSumTypeLib(New ActiveLock2.Globals) +' Debug.Print "Hash: " & crc +' If crc <> AL_CRC Then +' MsgBox "ActiveLock2.dll has been corrupted. If you were running a real application, it should terminate at this point." +' End If +'<br> +' '' Initialize the keystore. We use a File keystore in this case. +' MyActiveLock.KeyStoreType = alsFile +' MyActiveLock.KeyStorePath = App.path & "\al.lic" +'<br> +' '' Obtain the EventNotifier so that we can receive notifications from AL. +' Set ActiveLockEventSink = MyActiveLock.EventNotifier +'<br> +' '' Specify the name of the product that will be locked through AL. +' MyActiveLock.SoftwareName = "MyApp" +'<br> +' '' Specify our product code. This is a RSA public key, which will be used later by ActiveLock to validate license signatures +' MyActiveLock.SoftwareCode = "AAAAB3NzaC1yc2EAAAABJQAAAIBZnXD4IKfrBH25ekwLWQMs5mJuNH7D7U99EKFIsVhKQv17GHxKWvxHv/FwWhI1Rmd8TCiqk4Wmk7H1rh6xdbIVBwDj+RSeiXs8mmQX4/XvaWZx9BIQr5wODWnQCH/tj6Y6In2Xjc2J3B7LSjD60cWDBY/u+z9cSheTHLyhb16zFw==" +'<br> +' '' Specify product version +' MyActiveLock.SoftwareVersion = txtVersion +'<br> +' '' Specify License Type +' MyActiveLock.LicenseType = allicTimeLocked +'<br> +' '' Specify Lock Type +' MyActiveLock.LockType = lockHD +'<br> +' '' Now initialize AL +' MyActiveLock.Init +'<br> +' '' At this point, either AL has been initialized or an error would have already been raised +' '' if there were problems (such as the DLL has been tampered). +'<br> +' '' Check registration status by calling Acquire() +' '' Note: Calling Acquire() may trigger ActiveLockEventNotifier_ValidateValue() event. +' '' So we must be prepared to handle that. +' MyActiveLock.Acquire +'<br> +' '' By now, if the product is not registered, then an error whould have been raised, +' '' which means if we get to here, then we're registered. +'<br> +' '' Just for fun, print out some registration status info +' Debug.Print "Used Days: " & MyActiveLock.UsedDays +' Debug.Print "Expiration Date: " & MyActiveLock.ExpirationDate +' Exit Sub +' Hell: +' MsgBox Err.Number & ": " & Err.Description +' '' End program +' End +' End Sub +' ... +' ... +' '' +' '' ActiveLock raises this event typically when it needs a value to be encrypted. +' '' We can use any kind of encryption we'd like here, as long as it's deterministic. +' '' i.e. there's a one-to-one correspondence between unencrypted value and encrypted value. +' '' NOTE: BlowFish is NOT an example of deterministic encryption so you can't use it here. +' Private Sub ActiveLockEventSink_ValidateValue(ByVal Value As String, Result As String) +' Result = Encrypt(Value) +' End Sub +'<br> +' '' Encrypts a string. +' Private Function Encrypt(strData As String) As String +' Dim Key As RSAKey +' '' create the key from the key blobs +' modActiveLock.rsa_createkey PUB_KEY, Len(PUB_KEY), PRIV_KEY, Len(PRIV_KEY), Key +'<br> +' '' sign the data using the created key +' Dim dLen& +' Dim strEnc As String * 255 +' strEnc = strData +' dLen = Len(strData) +' modActiveLock.rsa_encrypt 1, strEnc, dLen, Key +'<br> +' '' done with the key - throw it away +' modActiveLock.rsa_freekey Key +'<br> +' Dim strOut As String +' strOut = Left$(strEnc, dLen) +' Encrypt = strOut +' End Function +' </pre> +' ' ' @author th...@us... ' @version 2.0.0 @@ -53,16 +171,18 @@ '* /////////////////////////////////////////////////////////////////////// ' / MODULE TO DO LIST / ' /////////////////////////////////////////////////////////////////////// -' [ ] TODO Item 1 -' [ ] TODO Item 2 ' ' /////////////////////////////////////////////////////////////////////// ' / MODULE CHANGE LOG / ' /////////////////////////////////////////////////////////////////////// -' +' @history +' <pre> ' 07.07.03 - mcrute - Updated the header comments for this file. ' 07.20.03 - th2tran - Added EventNotifier used for firing COM events. +' 08.03.03 - th2tran - VBDox'ed this interface. ' +' </pre> + ' /////////////////////////////////////////////////////////////////////// ' / MODULE CODE BEGINS BELOW THIS LINE / ' /////////////////////////////////////////////////////////////////////// @@ -70,12 +190,12 @@ Option Explicit '' -' License Types. Values are mutually exclusive. +' License Types. Values are mutually exclusive. i.e. they cannot be OR'd together. ' -' @param licNone Not licensed -' @param licPeriodic License expires after X number of days -' @param licPermanent License will never expire -' @param licTimeLocked License expires on a particular date +' @param allicNone Not licensed +' @param allicPeriodic License expires after X number of days +' @param allicPermanent License will never expire +' @param allicTimeLocked License expires on a particular date Public Enum ALLicType allicNone = 0 allicPeriodic = 1 @@ -84,9 +204,9 @@ End Enum '' -' License Lock Types. Values can be combined (OR'ed) together. +' License Lock Types. Values can be combined (OR''ed) together. ' -' @param licNone No locking - not recommended +' @param lockNone No locking - not recommended ' @param lockWindows Lock to windows serial number ' @param lockComp Lock to computer name ' @param lockHD Lock to hard drive serial @@ -102,7 +222,7 @@ End Enum '' -' License Flags. Values can be combined (OR'ed) together. +' License Flags. Values can be combined (OR''ed) together. ' ' @param alfSingle Single-user license ' @param alfMulti Multi-user license @@ -115,82 +235,86 @@ ' License Store Type specifies where to store license keys ' ' @param alsRegistry ' Store in Windows Registry -' @param alsFile ' Store in a license type +' @param alsFile ' Store in a license file Public Enum LicStoreType alsRegistry = 0 alsFile = 1 End Enum -'' -' Performs special initialization before we start operating. -' -' @param Args -'* [th2tran20030720] I can't think of any special initialization that is required right now. -' But let's keep this for future use. -Public Sub Init(Arg1 As Variant, ParamArray OtherArgs() As Variant) - -End Sub - '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Interface Properties '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '' ' Specifies the license type for this instance of ActiveLock. +' @param LicType License Type ' Public Property Let LicenseType(LicType As ALLicType) End Property + +'' +' Returns the License Type being used in this instance. +' Public Property Get LicenseType() As ALLicType End Property '' ' Specifies the lock type for this instance of ActiveLock. +' @param LockTypes Lock Types. ' -Public Property Let LockType(locktypes As ALLockTypes) +Public Property Let LockType(LockTypes As ALLockTypes) End Property + +'' +' Returns the Lock Type being used in this instance. +' Public Property Get LockType() As ALLockTypes End Property '' ' Specifies the name of the product being locked. +' @param sName Software Name ' Public Property Let SoftwareName(sName As String) End Property + +'' +' Returns the Software Name being used in this instance. +' Public Property Get SoftwareName() As String End Property '' ' Specifies the software code (product code) -' +' @param sCode Software Code. Public Property Let SoftwareCode(sCode As String) End Property '' ' Specifies the version of the product being locked. +' @param sVer Version string e.g. "1.0" ' Public Property Let SoftwareVersion(sVer As String) End Property -Public Property Get SoftwareVersion() As String - -End Property '' -' Specifies the product code for the product being locked. -' -'Public Property Get SoftwareCode(sCode As String) +' Returns the Software Version being used in this instance. ' -'End Property +Public Property Get SoftwareVersion() As String + +End Property '' ' Specifies the key store type. +' @param KeyStore Key Store Type. ' Public Property Let KeyStoreType(KeyStore As LicStoreType) @@ -198,18 +322,22 @@ '' ' Specifies the key store path. -' +' @param Path The path to be used for the specified KeyStoreType. +' e.g. If <code>alsFile</code> is used for <code>KeyStoreType</code>, then Path specifies the path to the license file. +' If <code>alsRegistry</code> is used for <code>KeyStoreType</code>, the Path specifies the Registry hive where license information is stored. Public Property Let KeyStorePath(Path As String) End Property -'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -' Interface Methods -'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +'* +'*''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +'* Interface Methods +'*''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '' -' Returns the software code corresponding to the set LockTypes, license class, etc... +' Computes a lock code corresponding to the specified Lock Types, License Class, etc... ' Optionally, if a product license is specified, then a lock string specific to that license is returned. +' @param Lic Product License for which to compute the lock code. Public Function LockCode(Optional Lic As ProductLicense = Nothing) As String End Function @@ -217,7 +345,7 @@ '' ' Registers the following product license. -' +' @param Lic Product License with which to register. Public Sub Register(Lic As ProductLicense) End Sub @@ -225,12 +353,26 @@ '' ' Transfers the current license to another computer. ' Returns the liberation key tailored for the other request code. +' @param RequestCode Request Code generated from the other computer. ' Public Function Transfer(RequestCode As String) As String End Function '' +' Performs special initialization before we start operating. Some of the routines, including <code>Acquire()</code> +' and <code>Register()</code> requires Init() to be called first. +' This routine accepts varying number of parameters. +' @todo [th2tran20030720] I can't think of any special initialization that is required right now. But let''s keep this for future use. +' +' @param Arg1 First parameter to be passed to this routine. +' @param OtherArgs The remaining array of arguments to be passed into this routine. +Public Sub Init(Arg1 As Variant, ParamArray OtherArgs() As Variant) + +End Sub + + +'' ' Acquires a valid license token. ' If no valid license can be found, an appropriate error will be thrown, specifying the cause. ' @@ -248,13 +390,14 @@ '' ' Retrieves the event notifier. ' Client applications uses this Notifier to handle event notifications sent by ActiveLock, -' including key validation events. +' including license validation events. +' @see ActiveLockEventNotifier for more information. Public Property Get EventNotifier() As ActiveLockEventNotifier End Property '' -' Returns the number of days this product has been used. +' Returns the number of days this product has been used since its registration. ' Public Property Get UsedDays() As Long @@ -268,7 +411,7 @@ End Property '' -' Returns the expiration date +' Returns the expiration date string. ' Public Property Get ExpirationDate() As String Index: IKeyStoreProvider.cls =================================================================== RCS file: /cvsroot/activelock/activelock2/src/IKeyStoreProvider.cls,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- IKeyStoreProvider.cls 23 Jul 2003 03:55:21 -0000 1.5 +++ IKeyStoreProvider.cls 3 Aug 2003 08:38:11 -0000 1.6 @@ -43,8 +43,8 @@ '* '' -' This is the interface for a an object that facilitates storing and -' retrieving of product keys. +' This is the interface for a class that facilitates storing and +' retrieving of product license keys. ' ' @author th...@us... ' @version 2.0.0 @@ -57,31 +57,35 @@ ' [ ] TO-DO Item 1 ' ' + ' /////////////////////////////////////////////////////////////////////// ' / MODULE CHANGE LOG / ' /////////////////////////////////////////////////////////////////////// -' +' @history +' <pre> ' 07.07.03 - mcrute - Updated the header comments for this file. -' -' +' 08.03.03 - th2tran - VBDox'ed this class. +' </pre> + ' /////////////////////////////////////////////////////////////////////// ' / MODULE CODE BEGINS BELOW THIS LINE / ' /////////////////////////////////////////////////////////////////////// - - Option Explicit - '' ' Specifies the path under which the keys are stored. ' Example: path to a license file, or path to the Windows Registry hive. +' @param Path Key store path. ' Public Property Let KeyStorePath(Path As String) End Property '' -' Retrieves license info for the specified product key. +' Retrieves license info for the specified product name. +' @param ProductName Product name. +' @return ProductLicense object matching the specified product name. +' If no license found, then <code>Nothing</code> is returned. ' Public Function Retrieve(ProductName As String) As ProductLicense @@ -89,6 +93,7 @@ '' ' Stores a license. +' @param Lic License to be stored. ' Public Sub Store(Lic As ProductLicense) Index: ProductLicense.cls =================================================================== RCS file: /cvsroot/activelock/activelock2/src/ProductLicense.cls,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ProductLicense.cls 28 Jul 2003 06:35:30 -0000 1.4 +++ ProductLicense.cls 3 Aug 2003 08:38:11 -0000 1.5 @@ -45,7 +45,7 @@ '' ' This class encapsulates a product license. A product license contains ' information such as the registered user, license type, product ID, -' license code, etc... +' license key, etc... ' ' @author th...@us... ' @version 2.0.0 @@ -60,11 +60,13 @@ ' /////////////////////////////////////////////////////////////////////// ' / MODULE CHANGE LOG / ' /////////////////////////////////////////////////////////////////////// -' +' <pre> ' 06.16.03 - th2tran - created ' 07.07.03 - mecrute - Updated the header comments for this file. -' -' +' 08.03.03 - th2tran - VBDox'ed this class. +' </pre> + + ' /////////////////////////////////////////////////////////////////////// ' / MODULE CODE BEGINS BELOW THIS LINE / ' /////////////////////////////////////////////////////////////////////// @@ -83,67 +85,115 @@ Private mstrHash1 As String ' hash of mstrRegisteredDate +'' ' CPU License Class - I don't yet know how this could be done! +' Public Property Get CLASS_1() As String CLASS_1 = "Class1" End Property -' ' Site License Class - lock to hard-drive(nic?) +'' +' Site License Class - lock to hard-drive(nic?) +' Public Property Get CLASS_2() As String CLASS_2 = "Class2" End Property -Friend Property Let ProductName(name As String) - mstrProductName = name +'' +' [INTERNAL] Specifies product name. +' +Friend Property Let ProductName(Name As String) + mstrProductName = Name End Property + +'' +' Returns the product name. +' Public Property Get ProductName() As String ProductName = mstrProductName End Property +'' +' [INTERNAL] Specified product version. +' Friend Property Let ProductVer(Ver As String) mstrProductVer = Ver End Property + +'' +' Returns the product version string. +' Public Property Get ProductVer() As String ProductVer = mstrProductVer End Property '' -' !!!WARNING!!! Use this method with caution. You run the risk of invalidating your existing license +' Specifies the product key. +' +' <p>!!!WARNING!!! Use this method with caution. You run the risk of invalidating your existing license ' if you call this method without knowing what you are doing. +' @param Key Product Key ' Public Property Let ProductKey(Key As String) mstrProductKey = Key End Property + +'' +' Returns the product key. +' Public Property Get ProductKey() As String ProductKey = mstrProductKey End Property +'' +' [INTERNAL] Specifies license type. +' Friend Property Let LicenseType(LicType As String) mstrType = LicType End Property + +'' +' Returns the license type. +' Public Property Get LicenseType() As String LicenseType = mstrType End Property +'' +' [INTERNAL] Specifies the license class string. +' Friend Property Let LicenseClass(LicClass As String) mstrLicenseClass = LicClass End Property + +'' +' Returns the license class string. +' Public Property Get LicenseClass() As String LicenseClass = mstrLicenseClass End Property -Friend Property Let Licensee(name As String) - mstrLicensee = name +'' +' [INTERNAL] Specifies the licensed user. +' +Friend Property Let Licensee(Name As String) + mstrLicensee = Name End Property + +'' +' Returns the person or organization registered to this license. +' Public Property Get Licensee() As String Licensee = mstrLicensee End Property '' ' Updates the License Key. -' !!! WARNING !!! Make sure you know what you're doing when you call this method; otherwise, you run +' <p>!!! WARNING !!! Make sure you know what you're doing when you call this method; otherwise, you run ' the risk of invalidating your existing license. ' +' @param Key New license key to be updated. +' Public Property Let LicenseKey(Key As String) mstrLicenseKey = Key End Property @@ -155,11 +205,17 @@ LicenseKey = mstrLicenseKey End Property +'' +' [INTERNAL] Specifies expiration data. +' @param strData expiration date string +' Friend Property Let Expiration(strDate As String) mstrExpiration = strDate End Property + '' ' Returns the expiration date string. +' Public Property Get Expiration() As String Expiration = mstrExpiration End Property @@ -170,6 +226,10 @@ Public Property Get RegisteredDate() As String RegisteredDate = mstrRegisteredDate End Property + +'' +' [INTERNAL] Specifies the registered date. +' @param strDate registered date Friend Property Let RegisteredDate(strDate As String) mstrRegisteredDate = strDate End Property @@ -180,16 +240,25 @@ Public Property Get LastUsed() As String LastUsed = mstrLastUsed End Property + +'' +' [INTERNAL] Sets the last used date. +' @param strDateTime DateTime string +' Friend Property Let LastUsed(strDateTime As String) mstrLastUsed = strDateTime End Property '' -' Returns Hash-1 code. +' Returns Hash-1 code. Hash-1 code is the encryption hash of the <code>LastUsed</code> property. ' Public Property Get Hash1() As String Hash1 = mstrHash1 End Property + +'' +' [INTERNAL] Sets the Hash-1 code. +' Friend Property Let Hash1(hcode As String) mstrHash1 = hcode End Property @@ -212,6 +281,7 @@ '' ' Loads the license from a formatted string. +' @param strLic Formatted license string, delimited by CrLf characters. ' Public Sub Load(strLic As String) ' First, base64-decode it @@ -231,6 +301,7 @@ '' ' Saves the license into a formatted string. +' @param strOut [out] Formatted license string will be saved into this parameter when the routine returns. ' Public Sub Save(strOut As String) strOut = ToString() & vbCrLf & LicenseKey 'add License Key at the end |
From: Thanh H. T. <th...@us...> - 2003-08-03 08:33:38
|
Update of /cvsroot/activelock/activelock2/src In directory sc8-pr-cvs1:/tmp/cvs-serv6874 Modified Files: ActiveLock2.vbp modActiveLock.bas Log Message: Removed BlowFish encryption class - not used. Index: ActiveLock2.vbp =================================================================== RCS file: /cvsroot/activelock/activelock2/src/ActiveLock2.vbp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- ActiveLock2.vbp 1 Aug 2003 06:13:27 -0000 1.10 +++ ActiveLock2.vbp 3 Aug 2003 08:33:35 -0000 1.11 @@ -7,7 +7,6 @@ Class=RegistryKeyStoreProvider; RegistryKeyStore.cls Class=ProductLicense; ProductLicense.cls Class=FileKeyStoreProvider; FileKeyStore.cls -Class=BlowFish; BlowFish.cls Module=modMACAddress; modMACAddress.bas Module=modMD5; modMd5.bas Module=modSHA1; modSha1.bas Index: modActiveLock.bas =================================================================== RCS file: /cvsroot/activelock/activelock2/src/modActiveLock.bas,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- modActiveLock.bas 2 Aug 2003 07:16:03 -0000 1.7 +++ modActiveLock.bas 3 Aug 2003 08:33:35 -0000 1.8 @@ -113,8 +113,6 @@ hwndProgbar As Long End Type -Private Crypto As New BlowFish - ' ActiveLock Encryption Key ' !!!WARNING!!! It is highly recommended that you change this key for your version of ActiveLock before deploying your app. Public Const ENCRYPT_KEY$ = "AAAAgEPRFzhQEF7S91vt2K6kOcEdDDe5BfwNiEL30/+ozTFHc7cZctB8NIlS++ZR//D3AjSMqScjh7xUF/gwvUgGCjiExjj1DF/XWFWnPOCfF8UxYAizCLZ9fdqxb1FRpI5NoW0xxUmvxGjmxKwazIW4P4XVi/+i1Bvh2qQ6ri3whcsNAAAAQQCyWGsbJKO28H2QLYH+enb7ehzwBThqfAeke/Gv1Te95yIAWme71I9aCTTlLsmtIYSk9rNrp3sh9ItD2Re67SE7AAAAQQCAookH1nws1gS2XP9cZTPaZEmFLwuxlSVsLQ5RWmd9cuxpgw5y2gIskbL4c+4oBuj0IDwKtnMrZq7UfV9I5VfVAAAAQQCEnyAuO0ahXH3KhAboop9+tCmRzZInTrDYdMy23xf3PLCLd777dL/Y2Y+zmaH1VO03m6iOog7WLiN4dCL7m+Im" ' RSA Private Key @@ -252,23 +250,6 @@ Hell: Close #hFile Err.Raise Err.Number, Err.Source, Err.Description, Err.HelpFile, Err.HelpContext -End Function - - - - -'' -' Encrypt a string using encryption key specified in this module -' -Public Function EncryptString(Text As String) As String - EncryptString = Crypto.EncryptString(Text, ENCRYPT_KEY) -End Function - -'' -' Decrypt a string using decryption key specified in this module -' -Public Function DecryptString(Text As String) As String - DecryptString = Crypto.DecryptString(Text, ENCRYPT_KEY) End Function Public Sub CryptoProgressUpdate(ByVal param As Long, ByVal action As Long, ByVal phase As Long, ByVal iprogress As Long) |
From: Thanh H. T. <th...@sy...> - 2003-08-02 20:31:59
|
Hi all, I've posted the meeting's agenda on our forum. Please review before our = next get-together. http://www.activelock.org/boards/index.php?showtopic=3D42&st=3D0&#entry11= 1 Thanks, Thanh. |
From: SourceForge.net <no...@so...> - 2003-08-02 08:28:59
|
Task #82903 has been updated. Project: ActiveLock Subproject: ActiveLock 2.0-alpha1 Summary: API Docs Complete: 0% Status: Open Authority : th2tran Assigned to: mcrute Description: Need to generate docs for the API. Suggestion: Use VBDox (search for VBDox on SF). It allows you to autogenerate docs from code comments. We can then use the generated html files to compile into a .chm or something. Follow-Ups: ------------------------------------------------------- Date: 2003-08-02 08:28 By: th2tran Comment: I think we need something for Alpha 1 that developers can use to familiarize themselves with how the API works. I can have a head start by vbdoxing the code if you'd like. You can take over from there. ------------------------------------------------------- Date: 2003-08-02 02:37 By: mcrute Comment: I will take care of this one. Starting as soon as alpha one is released. -Mike ------------------------------------------------------- For more info, visit: http://sourceforge.net/pm/task.php?func=detailtask&project_task_id=82903&group_id=70007&group_project_id=25539 |
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 |
From: Thanh H. T. <th...@us...> - 2003-08-02 07:18:20
|
Update of /cvsroot/activelock/activelock2/test In directory sc8-pr-cvs1:/tmp/cvs-serv2445 Modified Files: frmMain.frm modMain.bas Log Message: wizzardme2000 found a security breach associated with using md5_hash() function in ALCrypto.dll from the client app. So I'm switching to using CRC checksum (system API call) as a (hopefully) better alternative. The MD5 checksum bit inside ActiveLock2.dll is still safe, however, since it is using its own self-contained implementation. Index: frmMain.frm =================================================================== RCS file: /cvsroot/activelock/activelock2/test/frmMain.frm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- frmMain.frm 1 Aug 2003 23:43:31 -0000 1.6 +++ frmMain.frm 2 Aug 2003 07:18:17 -0000 1.7 @@ -301,17 +301,17 @@ Left = 0 Top = 0 Width = 7850 - _ExtentX = 13838 - _ExtentY = 661 - TickerScaleHeight= 21 - TickerScaleWidth= 519 - TickerFontBold = -1 'True - TickerFontSize = 11.25 - TickerFlash = 0 'False - TickerPlaySound = 0 'False - TickerScrollX = 282 - BalloonTipIcon = 0 - BalloonTipText = "No Messages" + _extentx = 13838 + _extenty = 661 + tickerscaleheight= 21 + tickerscalewidth= 519 + tickerfontbold = -1 'True + tickerfontsize = 11.25 + tickerflash = 0 'False + tickerplaysound = 0 'False + tickerscrollx = 123 + balloontipicon = 0 + balloontiptext = "No Messages" End End Begin VB.Frame fraTicker @@ -491,7 +491,7 @@ Width = 1215 End Begin VB.Label Label14 - Caption = "ActiveLock's MD5 Checksum:" + Caption = "ActiveLock's Checksum:" Height = 375 Left = 120 TabIndex = 54 Index: modMain.bas =================================================================== RCS file: /cvsroot/activelock/activelock2/test/modMain.bas,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- modMain.bas 1 Aug 2003 06:15:20 -0000 1.6 +++ modMain.bas 2 Aug 2003 07:18:17 -0000 1.7 @@ -207,8 +207,7 @@ ' that you generate your own set of keys to use before deploying your app. Public Const PRIV_KEY$ = "AAAAgEPRFzhQEF7S91vt2K6kOcEdDDe5BfwNiEL30/+ozTFHc7cZctB8NIlS++ZR//D3AjSMqScjh7xUF/gwvUgGCjiExjj1DF/XWFWnPOCfF8UxYAizCLZ9fdqxb1FRpI5NoW0xxUmvxGjmxKwazIW4P4XVi/+i1Bvh2qQ6ri3whcsNAAAAQQCyWGsbJKO28H2QLYH+enb7ehzwBThqfAeke/Gv1Te95yIAWme71I9aCTTlLsmtIYSk9rNrp3sh9ItD2Re67SE7AAAAQQCAookH1nws1gS2XP9cZTPaZEmFLwuxlSVsLQ5RWmd9cuxpgw5y2gIskbL4c+4oBuj0IDwKtnMrZq7UfV9I5VfVAAAAQQCEnyAuO0ahXH3KhAboop9+tCmRzZInTrDYdMy23xf3PLCLd777dL/Y2Y+zmaH1VO03m6iOog7WLiN4dCL7m+Im" Public Const PUB_KEY$ = "AAAAB3NzaC1yc2EAAAABJQAAAIBZnXD4IKfrBH25ekwLWQMs5mJuNH7D7U99EKFIsVhKQv17GHxKWvxHv/FwWhI1Rmd8TCiqk4Wmk7H1rh6xdbIVBwDj+RSeiXs8mmQX4/XvaWZx9BIQr5wODWnQCH/tj6Y6In2Xjc2J3B7LSjD60cWDBY/u+z9cSheTHLyhb16zFw==" -Private Const AL_MD5$ = "f298c67dee092235a533899292721129" - +Private Const AL_CRC& = 308603 ' ActiveLock2.dll's CRC checksum to be used for comparison Public Function Encrypt(strData As String) As String Dim Key As RSAKey ' create the key from the key blobs @@ -238,11 +237,11 @@ ' Returns the checksum. ' Public Function VerifyActiveLockdll(obj As IUnknown) As String - Dim strMd5 As String - strMd5 = modActiveLock.MD5HashTypeLib(obj) - Debug.Print "Hash: " & strMd5 - If strMd5 <> AL_MD5 Then + Dim crc As Long + crc = modActiveLock.CRCCheckSumTypeLib(obj) + Debug.Print "Hash: " & crc + If crc <> AL_CRC Then MsgBox "ActiveLock2.dll has been corrupted. If you were running a real application, it should terminate at this point." End If - VerifyActiveLockdll = strMd5 + VerifyActiveLockdll = CStr(crc) End Function |
From: Thanh H. T. <th...@us...> - 2003-08-02 07:16:05
|
Update of /cvsroot/activelock/activelock2/src In directory sc8-pr-cvs1:/tmp/cvs-serv2203 Modified Files: modActiveLock.bas Log Message: wizzardme2000 found a security breach associated with using md5_hash() function in ALCrypto.dll from the client app. So I'm switching to using CRC checksum as a (hopefully) better alternative. The MD5 checksum bit inside ActiveLock2.dll is still safe, however, since it is using its own self-contained implementation. Index: modActiveLock.bas =================================================================== RCS file: /cvsroot/activelock/activelock2/src/modActiveLock.bas,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- modActiveLock.bas 31 Jul 2003 07:04:53 -0000 1.6 +++ modActiveLock.bas 2 Aug 2003 07:16:03 -0000 1.7 @@ -50,7 +50,10 @@ ' ' 07.07.03 - mcrute - Updated the header comments for this file. ' 07.30.03 - th2tran - New routines to do MD5 hashes of TypeLibs. -' +' 08.02.03 - th2tran - wizzardme2000 found a gaping security hole with using md5_hash(). +' So now I'm using CRC checksums and MapFileAndCheckSum() API call +' instead. This approach was suggested by Peter Young (vbclassicforever) +' in the forum and mailing list a while back. ' ' /////////////////////////////////////////////////////////////////////// ' / MODULE CODE BEGINS BELOW THIS LINE / @@ -128,7 +131,7 @@ Private Declare Sub CopyMem Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long) Private Declare Function GetModuleFileName Lib "kernel32" Alias "GetModuleFileNameA" (ByVal hModule As Long, ByVal lpFileName As String, ByVal nSize As Long) As Long - +Private Declare Function MapFileAndCheckSum Lib "imagehlp" Alias "MapFileAndCheckSumA" (ByVal FileName As String, HeaderSum As Long, CheckSum As Long) As Long Public Sub Init() If fInit Then Exit Sub @@ -276,17 +279,34 @@ ' Computes an MD5 hash of the type library containing the object. ' Public Function MD5HashTypeLib(obj As IUnknown) As String - ' Retrieve DLL Path of self + Dim strDllPath As String + strDllPath = GetTypeLibPathFromObject(obj) + MD5HashTypeLib = MD5HashFile(strDllPath) +End Function + +Private Function GetTypeLibPathFromObject(obj As IUnknown) As String + ' Retrieve TypeLib info using TLI library (tlbinfo.dll) ' Use late-binding so that the user doesn't have to add it to their project reference Dim tliApp As Object Set tliApp = CreateObject("TLI.TLIApplication") Dim ti As Object ' actually TLI.TypeInfo Set ti = tliApp.ClassInfoFromObject(obj) Dim strDllPath As String - strDllPath = ti.Parent.ContainingFile - MD5HashTypeLib = MD5HashFile(strDllPath) + GetTypeLibPathFromObject = ti.Parent.ContainingFile +End Function + +'' +' Performs CRC checksum on the type library containing the object. +' +Public Function CRCCheckSumTypeLib(obj As IUnknown) As Long + Dim strDllPath As String + strDllPath = GetTypeLibPathFromObject(obj) + Dim HeaderSum As Long, RealSum As Long + MapFileAndCheckSum strDllPath, HeaderSum, RealSum + CRCCheckSumTypeLib = RealSum End Function + '' ' Computes an MD5 hash of the specified file. ' @@ -304,7 +324,7 @@ '' ' Check if we're running inside the VB6 IDE -Private Function IsRunningInIde() As Boolean +Public Function IsRunningInIde() As Boolean Dim strFileName As String Dim lngCount As Long @@ -313,4 +333,3 @@ 30 strFileName = Left(strFileName, lngCount) 40 IsRunningInIde = UCase(Right(strFileName, 7)) = "VB6.EXE" End Function - |
From: Thanh H. T. <th...@sy...> - 2003-08-02 06:50:43
|
Just to let everyone know, Dan Sanders (wizzardme2000) found the first = gaping hole with my md5 checksum bit. Turns out someone can write a fake = ALCrypto.dll with a dummy md5_hash function which can return the = epxected checksum for ActiveLock2.dll, effectively fooling the app into = thinking that ActiveLock2.dll is authentic when in fact it may have = been tampered. Looks like I'm going to have resort to the = MapFileAndCheckSum() API call suggested on the forum by vbclassicforever = a while back. Round of applause for Dan. :-) Hack on, bro! Now it gets a little = interesting. Anyway, below are the excerpts from our conversation, if anyone's = interested. Cheers, Thanh. ------------------------------------------------------------------- 02/08/2003 12:38:23 AM Dan Thanh Are you working on the multiple = lock-types thing, or am I still on that?=20 02/08/2003 12:38:42 AM Thanh Dan i'll take it from here...thanks=20 02/08/2003 12:38:53 AM Dan Thanh ok, cause I have free time now=20 02/08/2003 12:39:20 AM Thanh Dan ok=20 02/08/2003 12:40:18 AM Thanh Dan if you have time...may be you can = play with softice/smartcheck some more to see if you can crack it....=20 02/08/2003 12:41:36 AM Dan Thanh ok... and just to let you know, you = dont have to "if (lockto and lockhd) =3D lockhd then"... you can use "if = lockto and lock hd then". It has the same effect, but it seem a little = more english=20 02/08/2003 12:42:10 AM Thanh Dan yeah i figured as much....just that = it's easier to read=20 02/08/2003 12:53:51 AM Dan Thanh I think I found the kind of hole = you were looking for...=20 02/08/2003 1:05:30 AM Dan Thanh All you have to do to use a fake = activelock2.dll is make a fake alcrypto.dll that works properly on md5 = hashes, and checks if its testing a dll, then returns a fake hash so = that the program wont know. I don't know what to do to fix it, but = something along the lines of adding md5 dll hashing functions to the = actual apps so that they can chack alcrypto and activelock2 themselves = might be in order.=20 |
From: SourceForge.net <no...@so...> - 2003-08-02 02:39:54
|
Task #82239 has been updated. Project: ActiveLock Subproject: ActiveLock 2.0-alpha1 Summary: Handle other LockTo Types Complete: 0% Status: Open Authority : mcrute Assigned to: wizzardme2000 Description: Code other LockTo types as specified by comments in Global.cls Follow-Ups: ------------------------------------------------------- Date: 2003-08-01 21:39 By: mcrute Comment: Do we have a status or a precentage complete for this yet? ------------------------------------------------------- Date: 2003-07-28 12:31 By: th2tran Comment: Re-assigning to Dan. ------------------------------------------------------- Date: 2003-07-22 23:16 By: th2tran Comment: Implement the rest of LockTypes other than lockToMAC. See TODO list in Globals.cls and ActiveLock.cls ------------------------------------------------------- For more info, visit: http://sourceforge.net/pm/task.php?func=detailtask&project_task_id=82239&group_id=70007&group_project_id=25539 |
From: SourceForge.net <no...@so...> - 2003-08-02 02:38:45
|
Task #82243 has been updated. Project: ActiveLock Subproject: ActiveLock 2.0-alpha1 Summary: Add IActiveLock_LastRunDate Complete: 100% Status: Closed Authority : th2tran Assigned to: th2tran Description: Need this property to detect when the user has tried to set the clock back. Follow-Ups: ------------------------------------------------------- Date: 2003-07-28 01:52 By: th2tran Comment: IActiveLock_LastRunDate is not necessary. LastRunDate is (should) only used internally by ActiveLock to detect tampering with the system clock; outside user should not/need not be aware of this property. Therefore, I've implemented it in the ProductLicense level instead of IActiveLock level. ------------------------------------------------------- For more info, visit: http://sourceforge.net/pm/task.php?func=detailtask&project_task_id=82243&group_id=70007&group_project_id=25539 |
From: SourceForge.net <no...@so...> - 2003-08-02 02:38:30
|
Task #82242 has been updated. Project: ActiveLock Subproject: ActiveLock 2.0-alpha1 Summary: Checksumming the DLL to prevent cracking Complete: 100% Status: Closed Authority : th2tran Assigned to: th2tran Description: Need to provide the user the ability to perform an MD5 checksum on ActiveLock dll in order to detect tampering. Could be something like this in modActiveLock.bas: Public Function Checksum(strDllFilePath as String) As Llong Follow-Ups: ------------------------------------------------------- Date: 2003-07-31 02:26 By: th2tran Comment: Done. ------------------------------------------------------- Date: 2003-07-30 20:58 By: th2tran Comment: I'll take this. Thank you. ------------------------------------------------------- For more info, visit: http://sourceforge.net/pm/task.php?func=detailtask&project_task_id=82242&group_id=70007&group_project_id=25539 |
From: SourceForge.net <no...@so...> - 2003-08-02 02:37:47
|
Task #82238 has been updated. Project: ActiveLock Subproject: ActiveLock 2.0-alpha1 Summary: Update IActiveLock_Acquire() Complete: 100% Status: Closed Authority : mcrute Assigned to: nobody Description: Code other LockTo types as specified by comments in Global.cls Follow-Ups: ------------------------------------------------------- Date: 2003-07-28 01:54 By: th2tran Comment: Implemented as specified. ------------------------------------------------------- Date: 2003-07-22 23:14 By: mcrute Comment: IActiveLock_Acquire needs to check if the license has already expired. ------------------------------------------------------- For more info, visit: http://sourceforge.net/pm/task.php?func=detailtask&project_task_id=82238&group_id=70007&group_project_id=25539 |
From: SourceForge.net <no...@so...> - 2003-08-02 02:37:15
|
Task #82903 has been updated. Project: ActiveLock Subproject: ActiveLock 2.0-alpha1 Summary: API Docs Complete: 0% Status: Open Authority : th2tran Assigned to: mcrute Description: Need to generate docs for the API. Suggestion: Use VBDox (search for VBDox on SF). It allows you to autogenerate docs from code comments. We can then use the generated html files to compile into a .chm or something. Follow-Ups: ------------------------------------------------------- Date: 2003-08-01 21:37 By: mcrute Comment: I will take care of this one. Starting as soon as alpha one is released. -Mike ------------------------------------------------------- For more info, visit: http://sourceforge.net/pm/task.php?func=detailtask&project_task_id=82903&group_id=70007&group_project_id=25539 |
From: Dan <wiz...@us...> - 2003-08-02 00:10:44
|
Update of /cvsroot/activelock/activelock2/src/res In directory sc8-pr-cvs1:/tmp/cvs-serv13014/src/res Added Files: DLL.ico Hole.ico No Hole.ico Log Message: I ripped the 50% grey icons and compiled some ico's for you people. If you want White, 25% Grey, 75% Grey, or Black matted icons, they can be ripped from the icls. I reccommend Icon Sushi (freeware) for anyone who wants to fiddle with these icons. --- NEW FILE: DLL.ico --- EEE "#$ $ ##" koeeoku,,ed ¨¨¨ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿDDD nnn ||| jjj ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¶¶¶ A --- NEW FILE: Hole.ico --- ¨ÝøÚø×øÑ÷~Éón¼í\ªâLÐBÀ2k§¢©± AÑAÑAÒAÒAÓ@Ó@Ó@Ó@Ó?Ó<Ï5Â&kªBr£¦° Ê*È,È.È.À/z·0w±0t2t¬2u4w¯5y±7z³9}¶;¸=º?½A¿DÁGÃIÅLÈOÊQËSÍTÎUÏVÐWÐWÑVÐVÐTÏSÎQÍOÌMËLÊJÈHÇGÆEÄDÃB Á@¿@¾?½>»=}º<}º;|¹:{¸:{¸:z·:z·9xµ9x´8v³8v²7t±7t°7t°6s¯5q5p¬4o«2m©1l©.g¥&X {ÄíyÃíwÂìvÂìxÃíyÃízÄízÄí|Åî~Æî|ÅîÈïÇïÇïÇïÇïÈï{ÅîwÃîuÁîqÀîi»ía·ì^´ê\°çV¥ÞFÉ<z¸Es¦ --- NEW FILE: No Hole.ico --- ©Ýø ÚøØøÑö~Éóm¼í[ªâLÐBÀ2k§¢©± AÑBÒAÒAÓAÓAÔ@Ó@Ó@Ó>Ò<Ï4Á'l«Br£¦° Ê*Ç,È.È.À.z·0w±1u®1t¬3u4w¯6y±6z³9}µ;¸<º?½B¿DÁGÄJÆLÇNÉQÌSÍUÏVÐVÐWÐVÐVÐVÐUÏSÎQÍPÌNËLÊJÈHÇGÅEÄDÃBÀ@¿?¾>¼=~»<}º<}º<|¹:{¸;{¸9z¶9y¶9xµ8w´8v³8v²7t°6s°6s°6s¯5q4p¬3oª2m©1l©.h¦&X {ÄíyÃívÂíyÃíwÂíwÃíyÄí~Æî}Åî~Æï}ÅîÇï ÉðÈïÇïÇð~Æï|ÅïxÃîtÁíq¿îi¼ía·ì^´ê\±çV¤ÝFÉ<z¸Dr¥ |
From: Thanh H. T. <th...@sy...> - 2003-08-02 00:07:17
|
Yes, that's right. And it could also return 3 (1+2), 5 (4+1), 15, 31, etc..... Also, As mentioned in the Enum the LockTypes can be OR'd, which means your if test should really be: If (LockType AND lockMAC) = lockMAC Then .... End If ----- Original Message ----- From: "Dan" <da...@fl...> To: <act...@li...> Sent: Friday, August 01, 2003 7:54 PM Subject: Re: [ActiveLock-Development] CVS: activelock2/src ActiveLock.cls,1.6,1.7 ActiveLock2.dll,1.2,1.3 ActiveLock2.vbp,1.7,1.8 Globals.cls,1.7,1.8 > Ok, the new test app is up now. We could use that code, but it would return > "Class2" "Class4" "Class8" "Class16" > ----- Original Message ----- > From: "Thanh Hai Tran" <th...@sy...> > To: <act...@li...> > Sent: Friday, August 01, 2003 2:34 PM > Subject: Re: [ActiveLock-Development] CVS: activelock2/src > ActiveLock.cls,1.6,1.7 ActiveLock2.dll,1.2,1.3 ActiveLock2.vbp,1.7,1.8 > Globals.cls,1.7,1.8 > > > > Hi Dan, > > > > > Private Function GetClassString(LockType As ActiveLock2.ALLockTypes) As > > String > > > + 'TODO: Decide the class numbers. > > > + ' lockMAC should probably be last, > > > + ' like it is in the enum. (IActivelock.cls) > > > If LockType = lockMAC Then > > > GetClassString = "Class1" > > > ElseIf LockType = lockWindows Then > > > GetClassString = "Class2" > > > - Else > > > - 'TODO: Handle the rest > > > + ElseIf LockType = lockComp Then > > > + GetClassString = "Class3" > > > + ElseIf LockType = lockHD Then > > > + GetClassString = "Class4" > > > End If > > > End Function > > > > Suggestion..... > > > > >Private Function GetClassString(LockType As ActiveLock2.ALLockTypes) As > > String > > GetClassString = "Class" & LockType > > > End Function > > > > BTW, I'm still waiting for your update on making these changes available > in > > the TestApp. > > > > Thanh. > > > > ----- Original Message ----- > > From: "Dan" <wiz...@us...> > > To: <act...@li...> > > Sent: Tuesday, July 29, 2003 2:49 PM > > Subject: [ActiveLock-Development] CVS: activelock2/src > > ActiveLock.cls,1.6,1.7 ActiveLock2.dll,1.2,1.3 ActiveLock2.vbp,1.7,1.8 > > Globals.cls,1.7,1.8 > > > > > > > Update of /cvsroot/activelock/activelock2/src > > > In directory sc8-pr-cvs1:/tmp/cvs-serv8475/src > > > > > > Modified Files: > > > ActiveLock.cls ActiveLock2.dll ActiveLock2.vbp Globals.cls > > > Log Message: > > > Added support for locks other than MAC. Hopefully a new test app will > > follow shortly. > > > > > > - Dan > > > > > > Index: ActiveLock.cls > > > =================================================================== > > > RCS file: /cvsroot/activelock/activelock2/src/ActiveLock.cls,v > > > retrieving revision 1.6 > > > retrieving revision 1.7 > > > diff -u -d -r1.6 -r1.7 > > > --- ActiveLock.cls 28 Jul 2003 06:35:30 -0000 1.6 > > > +++ ActiveLock.cls 29 Jul 2003 18:49:42 -0000 1.7 > > > @@ -55,7 +55,6 @@ > > > ' / MODULE TO DO LIST > > / > > > ' > > /////////////////////////////////////////////////////////////////////// > > > ' > > > -' [ ] Implement IActiveLock_GetLockString() for locktypes other than > > MAC > > > ' [ ] IActiveLock_Acquire: Check if license has not expired > > > ' [ ] Implement IActiveLock_Release > > > ' [ ] Implement IActiveLock_Transfer > > > @@ -63,8 +62,9 @@ > > > ' / MODULE CHANGE LOG > > / > > > ' > > /////////////////////////////////////////////////////////////////////// > > > ' > > > -' 07.07.03 - mcrute - Updated the header comments for this file. > > > -' 07.28.03 - th2tran - Using RSA signature for license key. > > > +' 07.07.03 - mcrute - Updated the header comments for this > file. > > > +' 07.28.03 - th2tran - Using RSA signature for license key. > > > +' 07.28.03 - wizzardme2000 - Implemented lockComp, lockHD, and > > lockWindows > > > ' > > > ' > > /////////////////////////////////////////////////////////////////////// > > > ' / MODULE CODE BEGINS BELOW THIS LINE > > / > > > @@ -286,13 +286,13 @@ > > > strLock = strLock & modMACAddress.GetMACAddress() > > > End If > > > If mLockTypes And lockComp Then > > > - ' TODO: strLock = strLock & GetComputerName() > > > + strLock = strLock & modComputerName.GetComputerName() > > > End If > > > If mLockTypes And lockHD Then > > > - ' TODO: strLock = strLock & GetComputerName() > > > + strLock = strLock & modHDSerial.GetHDSerial("C:\") > > > End If > > > If mLockTypes And lockWindows Then > > > - ' TODO: strLock = strLock & GetWindowSerial() > > > + strLock = strLock & modWindowsSerial.GetWindowsSerial() > > > End If > > > If Lic Is Nothing Then > > > IActiveLock_LockCode = strLock > > > > > > Index: ActiveLock2.dll > > > =================================================================== > > > RCS file: /cvsroot/activelock/activelock2/src/ActiveLock2.dll,v > > > retrieving revision 1.2 > > > retrieving revision 1.3 > > > diff -u -d -r1.2 -r1.3 > > > Binary files /tmp/cvsEbKVXy and /tmp/cvsayEYT0 differ > > > > > > Index: ActiveLock2.vbp > > > =================================================================== > > > RCS file: /cvsroot/activelock/activelock2/src/ActiveLock2.vbp,v > > > retrieving revision 1.7 > > > retrieving revision 1.8 > > > diff -u -d -r1.7 -r1.8 > > > --- ActiveLock2.vbp 28 Jul 2003 06:35:30 -0000 1.7 > > > +++ ActiveLock2.vbp 29 Jul 2003 18:49:42 -0000 1.8 > > > @@ -1,5 +1,5 @@ > > > Type=OleDll > > > > -Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\Syst > > em32\stdole2.tlb#OLE Automation > > > > > > +Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\.. > > \..\WINNT\System32\stdole2.tlb#OLE Automation > > > Class=ActiveLock; ActiveLock.cls > > > Class=IActiveLock; IActiveLock.cls > > > Class=Globals; Globals.cls > > > @@ -17,6 +17,9 @@ > > > Class=ActiveLockEventNotifier; ActiveLockEventNotifier.cls > > > Module=modActiveLock; modActiveLock.bas > > > Module=modBase64; modBase64.bas > > > +Module=modHDSerial; modHDSerial.bas > > > +Module=modWindowsSerial; modWindowsSerial.bas > > > +Module=modComputerName; modComputerName.bas > > > Startup="(None)" > > > HelpFile="" > > > Title="ActiveLock2" > > > > > > Index: Globals.cls > > > =================================================================== > > > RCS file: /cvsroot/activelock/activelock2/src/Globals.cls,v > > > retrieving revision 1.7 > > > retrieving revision 1.8 > > > diff -u -d -r1.7 -r1.8 > > > --- Globals.cls 28 Jul 2003 06:35:30 -0000 1.7 > > > +++ Globals.cls 29 Jul 2003 18:49:42 -0000 1.8 > > > @@ -53,7 +53,6 @@ > > > ' / MODULE TO DO LIST > > / > > > ' > > /////////////////////////////////////////////////////////////////////// > > > ' > > > -' [ ] GetClassString() - handle the rest of the LockTypes > > > ' [ ] GetLicTypeString() - implement this > > > ' > > > ' > > /////////////////////////////////////////////////////////////////////// > > > @@ -63,6 +62,7 @@ > > > ' 07.07.03 - mcrute - Updated the header comments for this file. > > > ' 07.21.03 - th2tran - Added ActiveLockErrCodeConstants to contain > > > ' a list of error code constants raised by > > ActiveLock. > > > +' 07.28.03 - wizzardme2000 - Implemented lockComp, lockHD, and > > lockWindows > > > ' > > > ' > > /////////////////////////////////////////////////////////////////////// > > > ' / MODULE CODE BEGINS BELOW THIS LINE > > / > > > @@ -146,12 +146,17 @@ > > > End Function > > > > > > Private Function GetClassString(LockType As ActiveLock2.ALLockTypes) As > > String > > > + 'TODO: Decide the class numbers. > > > + ' lockMAC should probably be last, > > > + ' like it is in the enum. (IActivelock.cls) > > > If LockType = lockMAC Then > > > GetClassString = "Class1" > > > ElseIf LockType = lockWindows Then > > > GetClassString = "Class2" > > > - Else > > > - 'TODO: Handle the rest > > > + ElseIf LockType = lockComp Then > > > + GetClassString = "Class3" > > > + ElseIf LockType = lockHD Then > > > + GetClassString = "Class4" > > > End If > > > End Function > > > > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > > > Data Reports, E-commerce, Portals, and Forums are available now. > > > Download today and enter to win an XBOX or Visual Studio .NET. > > > > > > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > > > _______________________________________________ > > > Activelock-Development mailing list > > > Act...@li... > > > https://lists.sourceforge.net/lists/listinfo/activelock-development > > > > > > > > ------------------------------------------------------- > > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > > Data Reports, E-commerce, Portals, and Forums are available now. > > Download today and enter to win an XBOX or Visual Studio .NET. > > > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > > _______________________________________________ > > Activelock-Development mailing list > > Act...@li... > > https://lists.sourceforge.net/lists/listinfo/activelock-development > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > _______________________________________________ > Activelock-Development mailing list > Act...@li... > https://lists.sourceforge.net/lists/listinfo/activelock-development |
From: Dan <da...@fl...> - 2003-08-01 23:52:02
|
Ok, the new test app is up now. We could use that code, but it would return "Class2" "Class4" "Class8" "Class16" ----- Original Message ----- From: "Thanh Hai Tran" <th...@sy...> To: <act...@li...> Sent: Friday, August 01, 2003 2:34 PM Subject: Re: [ActiveLock-Development] CVS: activelock2/src ActiveLock.cls,1.6,1.7 ActiveLock2.dll,1.2,1.3 ActiveLock2.vbp,1.7,1.8 Globals.cls,1.7,1.8 > Hi Dan, > > > Private Function GetClassString(LockType As ActiveLock2.ALLockTypes) As > String > > + 'TODO: Decide the class numbers. > > + ' lockMAC should probably be last, > > + ' like it is in the enum. (IActivelock.cls) > > If LockType = lockMAC Then > > GetClassString = "Class1" > > ElseIf LockType = lockWindows Then > > GetClassString = "Class2" > > - Else > > - 'TODO: Handle the rest > > + ElseIf LockType = lockComp Then > > + GetClassString = "Class3" > > + ElseIf LockType = lockHD Then > > + GetClassString = "Class4" > > End If > > End Function > > Suggestion..... > > >Private Function GetClassString(LockType As ActiveLock2.ALLockTypes) As > String > GetClassString = "Class" & LockType > > End Function > > BTW, I'm still waiting for your update on making these changes available in > the TestApp. > > Thanh. > > ----- Original Message ----- > From: "Dan" <wiz...@us...> > To: <act...@li...> > Sent: Tuesday, July 29, 2003 2:49 PM > Subject: [ActiveLock-Development] CVS: activelock2/src > ActiveLock.cls,1.6,1.7 ActiveLock2.dll,1.2,1.3 ActiveLock2.vbp,1.7,1.8 > Globals.cls,1.7,1.8 > > > > Update of /cvsroot/activelock/activelock2/src > > In directory sc8-pr-cvs1:/tmp/cvs-serv8475/src > > > > Modified Files: > > ActiveLock.cls ActiveLock2.dll ActiveLock2.vbp Globals.cls > > Log Message: > > Added support for locks other than MAC. Hopefully a new test app will > follow shortly. > > > > - Dan > > > > Index: ActiveLock.cls > > =================================================================== > > RCS file: /cvsroot/activelock/activelock2/src/ActiveLock.cls,v > > retrieving revision 1.6 > > retrieving revision 1.7 > > diff -u -d -r1.6 -r1.7 > > --- ActiveLock.cls 28 Jul 2003 06:35:30 -0000 1.6 > > +++ ActiveLock.cls 29 Jul 2003 18:49:42 -0000 1.7 > > @@ -55,7 +55,6 @@ > > ' / MODULE TO DO LIST > / > > ' > /////////////////////////////////////////////////////////////////////// > > ' > > -' [ ] Implement IActiveLock_GetLockString() for locktypes other than > MAC > > ' [ ] IActiveLock_Acquire: Check if license has not expired > > ' [ ] Implement IActiveLock_Release > > ' [ ] Implement IActiveLock_Transfer > > @@ -63,8 +62,9 @@ > > ' / MODULE CHANGE LOG > / > > ' > /////////////////////////////////////////////////////////////////////// > > ' > > -' 07.07.03 - mcrute - Updated the header comments for this file. > > -' 07.28.03 - th2tran - Using RSA signature for license key. > > +' 07.07.03 - mcrute - Updated the header comments for this file. > > +' 07.28.03 - th2tran - Using RSA signature for license key. > > +' 07.28.03 - wizzardme2000 - Implemented lockComp, lockHD, and > lockWindows > > ' > > ' > /////////////////////////////////////////////////////////////////////// > > ' / MODULE CODE BEGINS BELOW THIS LINE > / > > @@ -286,13 +286,13 @@ > > strLock = strLock & modMACAddress.GetMACAddress() > > End If > > If mLockTypes And lockComp Then > > - ' TODO: strLock = strLock & GetComputerName() > > + strLock = strLock & modComputerName.GetComputerName() > > End If > > If mLockTypes And lockHD Then > > - ' TODO: strLock = strLock & GetComputerName() > > + strLock = strLock & modHDSerial.GetHDSerial("C:\") > > End If > > If mLockTypes And lockWindows Then > > - ' TODO: strLock = strLock & GetWindowSerial() > > + strLock = strLock & modWindowsSerial.GetWindowsSerial() > > End If > > If Lic Is Nothing Then > > IActiveLock_LockCode = strLock > > > > Index: ActiveLock2.dll > > =================================================================== > > RCS file: /cvsroot/activelock/activelock2/src/ActiveLock2.dll,v > > retrieving revision 1.2 > > retrieving revision 1.3 > > diff -u -d -r1.2 -r1.3 > > Binary files /tmp/cvsEbKVXy and /tmp/cvsayEYT0 differ > > > > Index: ActiveLock2.vbp > > =================================================================== > > RCS file: /cvsroot/activelock/activelock2/src/ActiveLock2.vbp,v > > retrieving revision 1.7 > > retrieving revision 1.8 > > diff -u -d -r1.7 -r1.8 > > --- ActiveLock2.vbp 28 Jul 2003 06:35:30 -0000 1.7 > > +++ ActiveLock2.vbp 29 Jul 2003 18:49:42 -0000 1.8 > > @@ -1,5 +1,5 @@ > > Type=OleDll > > -Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\Syst > em32\stdole2.tlb#OLE Automation > > > +Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\.. > \..\WINNT\System32\stdole2.tlb#OLE Automation > > Class=ActiveLock; ActiveLock.cls > > Class=IActiveLock; IActiveLock.cls > > Class=Globals; Globals.cls > > @@ -17,6 +17,9 @@ > > Class=ActiveLockEventNotifier; ActiveLockEventNotifier.cls > > Module=modActiveLock; modActiveLock.bas > > Module=modBase64; modBase64.bas > > +Module=modHDSerial; modHDSerial.bas > > +Module=modWindowsSerial; modWindowsSerial.bas > > +Module=modComputerName; modComputerName.bas > > Startup="(None)" > > HelpFile="" > > Title="ActiveLock2" > > > > Index: Globals.cls > > =================================================================== > > RCS file: /cvsroot/activelock/activelock2/src/Globals.cls,v > > retrieving revision 1.7 > > retrieving revision 1.8 > > diff -u -d -r1.7 -r1.8 > > --- Globals.cls 28 Jul 2003 06:35:30 -0000 1.7 > > +++ Globals.cls 29 Jul 2003 18:49:42 -0000 1.8 > > @@ -53,7 +53,6 @@ > > ' / MODULE TO DO LIST > / > > ' > /////////////////////////////////////////////////////////////////////// > > ' > > -' [ ] GetClassString() - handle the rest of the LockTypes > > ' [ ] GetLicTypeString() - implement this > > ' > > ' > /////////////////////////////////////////////////////////////////////// > > @@ -63,6 +62,7 @@ > > ' 07.07.03 - mcrute - Updated the header comments for this file. > > ' 07.21.03 - th2tran - Added ActiveLockErrCodeConstants to contain > > ' a list of error code constants raised by > ActiveLock. > > +' 07.28.03 - wizzardme2000 - Implemented lockComp, lockHD, and > lockWindows > > ' > > ' > /////////////////////////////////////////////////////////////////////// > > ' / MODULE CODE BEGINS BELOW THIS LINE > / > > @@ -146,12 +146,17 @@ > > End Function > > > > Private Function GetClassString(LockType As ActiveLock2.ALLockTypes) As > String > > + 'TODO: Decide the class numbers. > > + ' lockMAC should probably be last, > > + ' like it is in the enum. (IActivelock.cls) > > If LockType = lockMAC Then > > GetClassString = "Class1" > > ElseIf LockType = lockWindows Then > > GetClassString = "Class2" > > - Else > > - 'TODO: Handle the rest > > + ElseIf LockType = lockComp Then > > + GetClassString = "Class3" > > + ElseIf LockType = lockHD Then > > + GetClassString = "Class4" > > End If > > End Function > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > > Data Reports, E-commerce, Portals, and Forums are available now. > > Download today and enter to win an XBOX or Visual Studio .NET. > > > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > > _______________________________________________ > > Activelock-Development mailing list > > Act...@li... > > https://lists.sourceforge.net/lists/listinfo/activelock-development > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > _______________________________________________ > Activelock-Development mailing list > Act...@li... > https://lists.sourceforge.net/lists/listinfo/activelock-development |
From: Dan <wiz...@us...> - 2003-08-01 23:43:35
|
Update of /cvsroot/activelock/activelock2/test In directory sc8-pr-cvs1:/tmp/cvs-serv8838/test Modified Files: ALTestApp.vbp al.lic frmMain.frm frmMain.frx Log Message: Lock Types other than MAC are now implemented. Index: ALTestApp.vbp =================================================================== RCS file: /cvsroot/activelock/activelock2/test/ALTestApp.vbp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ALTestApp.vbp 31 Jul 2003 07:25:04 -0000 1.4 +++ ALTestApp.vbp 1 Aug 2003 23:43:31 -0000 1.5 @@ -1,6 +1,6 @@ Type=Exe -Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\System32\stdole2.tlb#OLE Automation -Reference=*\G{AAED8AB4-AC83-4C51-93EE-64664DB96265}#1.0#0#..\src\ActiveLock2.dll#ActiveLock2 +Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\..\WINNT\system32\STDOLE2.TLB#OLE Automation +Reference=*\G{AAED8AB4-AC83-4C51-93EE-64664DB96265}#7.0#0#..\src\ActiveLock2.dll#ActiveLock2 Object={BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0; TABCTL32.OCX Form=frmMain.frm UserControl=atViewPort.ctl Index: al.lic =================================================================== RCS file: /cvsroot/activelock/activelock2/test/al.lic,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- al.lic 28 Jul 2003 06:39:58 -0000 1.2 +++ al.lic 1 Aug 2003 23:43:31 -0000 1.3 @@ -1,21 +0,0 @@ -[MyApp] -; RSA public key -ProductKey=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCuPTKuuMSyB02+Ejr7Ym8y9CIGvcYfXtMMlCBEZiIkzsUvqOh9xxyQn+nb1ogCeZjXxZG767audpwTXcnrGR9m6N79fYXKO0aIVmfxlwDdbyTpL89frO8HpPZ1cyZ8CoxIqVKJxxW+f3+KFSj/wn/DZiMXQnRNZ2CmrBbYncQsKwIDAQAB -ProductVersion=1.0 -Licensee=Thanh Tran -LicenseType=Single -LicenseClass=Class2 -LicensedFeatures=Feature1,Feature2,Feature9 -Expiration=2003-12-31 -LicenseKey=a4849ca280aeb8679b15f6ecac09bbfa -[ALTestApp] -ProductVersion=1.0.0 -LicenseType=Single -LicenseClass=Class1 -Licensee=Thanh Tran -LicenseKey=AAAAB3NzaC1yc2EAAACAChOALOd+VXMhMAw3OmTjGuV8TMCwtO3ZPnKFqp2WliR8EvmqAJc9XO2DdJFpBglL/1RK9O8G9QQAGaairH8Lh4tG7Wy9L0FVT8Rzi/IlQl+ZNs4bOXLwcYY99AMeoanYdrmdUCS8OGV6EaO2oEHiaIW23FV/m5pT21MEkXbvPns -RegisteredDate=2003/07/28 -Expiration=2003/08/27 -ProductKey=AAAAB3NzaC1yc2EAAAABJQAAAIBZnXD4IKfrBH25ekwLWQMs5mJuNH7D7U99EKFIsVhKQv17GHxKWvxHv/FwWhI1Rmd8TCiqk4Wmk7H1rh6xdbIVBwDj+RSeiXs8mmQX4/XvaWZx9BIQr5wODWnQCH/tj6Y6In2Xjc2J3B7LSjD60cWDBY/u+z9cSheTHLyhb16zFw== -Hash1=b0ffd9956fc8bba60b94dab0c4cc2758 -LastUsed=2003/07/28 02:15:20 Index: frmMain.frm =================================================================== RCS file: /cvsroot/activelock/activelock2/test/frmMain.frm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- frmMain.frm 31 Jul 2003 07:25:05 -0000 1.5 +++ frmMain.frm 1 Aug 2003 23:43:31 -0000 1.6 @@ -22,37 +22,52 @@ _ExtentX = 13996 _ExtentY = 11033 _Version = 393216 - Tab = 1 TabHeight = 520 TabCaption(0) = "Admin" TabPicture(0) = "frmMain.frx":0000 - Tab(0).ControlEnabled= 0 'False - Tab(0).Control(0)= "txtChecksum" - Tab(0).Control(1)= "fraKeyGen" - Tab(0).Control(2)= "txtDays" - Tab(0).Control(3)= "cmbLicType" - Tab(0).Control(4)= "txtSoftwareCodePub" - Tab(0).Control(5)= "txtSoftwareCodePriv" - Tab(0).Control(6)= "txtVersion" - Tab(0).Control(7)= "txtName" - Tab(0).Control(8)= "cmbLicClass" - Tab(0).Control(9)= "cmdSoftwareCodeGen" - Tab(0).Control(10)= "Label14" - Tab(0).Control(11)= "lblDays" - Tab(0).Control(12)= "lblExpiry" - Tab(0).Control(13)= "Label10" - Tab(0).Control(14)= "Label9" - Tab(0).Control(15)= "Label3" - Tab(0).Control(16)= "Label2" - Tab(0).Control(17)= "Label1" + Tab(0).ControlEnabled= -1 'True + Tab(0).Control(0)= "Label1" + Tab(0).Control(0).Enabled= 0 'False + Tab(0).Control(1)= "Label2" + Tab(0).Control(1).Enabled= 0 'False + Tab(0).Control(2)= "Label3" + Tab(0).Control(2).Enabled= 0 'False + Tab(0).Control(3)= "Label9" + Tab(0).Control(3).Enabled= 0 'False + Tab(0).Control(4)= "Label10" + Tab(0).Control(4).Enabled= 0 'False + Tab(0).Control(5)= "lblExpiry" + Tab(0).Control(5).Enabled= 0 'False + Tab(0).Control(6)= "lblDays" + Tab(0).Control(6).Enabled= 0 'False + Tab(0).Control(7)= "Label14" + Tab(0).Control(7).Enabled= 0 'False + Tab(0).Control(8)= "cmdSoftwareCodeGen" + Tab(0).Control(8).Enabled= 0 'False + Tab(0).Control(9)= "cmbLicClass" + Tab(0).Control(9).Enabled= 0 'False + Tab(0).Control(10)= "txtName" + Tab(0).Control(10).Enabled= 0 'False + Tab(0).Control(11)= "txtVersion" + Tab(0).Control(11).Enabled= 0 'False + Tab(0).Control(12)= "txtSoftwareCodePriv" + Tab(0).Control(12).Enabled= 0 'False + Tab(0).Control(13)= "txtSoftwareCodePub" + Tab(0).Control(13).Enabled= 0 'False + Tab(0).Control(14)= "cmbLicType" + Tab(0).Control(14).Enabled= 0 'False + Tab(0).Control(15)= "txtDays" + Tab(0).Control(15).Enabled= 0 'False + Tab(0).Control(16)= "fraKeyGen" + Tab(0).Control(16).Enabled= 0 'False + Tab(0).Control(17)= "txtChecksum" + Tab(0).Control(17).Enabled= 0 'False Tab(0).ControlCount= 18 TabCaption(1) = "Registration" TabPicture(1) = "frmMain.frx":001C - Tab(1).ControlEnabled= -1 'True - Tab(1).Control(0)= "fraReg" - Tab(1).Control(0).Enabled= 0 'False - Tab(1).Control(1)= "fraRegStatus" - Tab(1).Control(1).Enabled= 0 'False + Tab(1).ControlEnabled= 0 'False + Tab(1).Control(0)= "fraRegStatus" + Tab(1).Control(1)= "fraReg" Tab(1).ControlCount= 2 TabCaption(2) = "Sample App" TabPicture(2) = "frmMain.frx":0038 @@ -64,7 +79,7 @@ Begin VB.TextBox txtChecksum BackColor = &H80000011& Height = 285 - Left = -73680 + Left = 1320 Locked = -1 'True TabIndex = 55 Top = 600 @@ -73,7 +88,7 @@ Begin VB.Frame fraKeyGen Caption = "Key Generator" Height = 2415 - Left = -74880 + Left = 120 TabIndex = 43 Top = 3360 Width = 7455 @@ -120,7 +135,7 @@ Begin VB.TextBox txtDays BackColor = &H80000011& Height = 285 - Left = -73680 + Left = 1320 Locked = -1 'True TabIndex = 40 Text = "30" @@ -130,7 +145,7 @@ Begin VB.ComboBox cmbLicType Height = 315 ItemData = "frmMain.frx":0054 - Left = -73680 + Left = 1320 List = "frmMain.frx":0061 Style = 2 'Dropdown List TabIndex = 3 @@ -140,7 +155,7 @@ Begin VB.TextBox txtSoftwareCodePub BackColor = &H80000011& Height = 285 - Left = -71160 + Left = 3840 Locked = -1 'True TabIndex = 34 Top = 1560 @@ -149,7 +164,7 @@ Begin VB.TextBox txtSoftwareCodePriv BackColor = &H80000011& Height = 285 - Left = -73680 + Left = 1320 Locked = -1 'True TabIndex = 35 Top = 1560 @@ -158,7 +173,7 @@ Begin VB.TextBox txtVersion BackColor = &H80000011& Height = 285 - Left = -73680 + Left = 1320 Locked = -1 'True TabIndex = 38 Top = 1320 @@ -167,7 +182,7 @@ Begin VB.TextBox txtName BackColor = &H80000011& Height = 285 - Left = -73680 + Left = 1320 Locked = -1 'True TabIndex = 36 Top = 1080 @@ -294,7 +309,7 @@ TickerFontSize = 11.25 TickerFlash = 0 'False TickerPlaySound = 0 'False - TickerScrollX = 55 + TickerScrollX = 282 BalloonTipIcon = 0 BalloonTipText = "No Messages" End @@ -328,7 +343,7 @@ Begin VB.Frame fraRegStatus Caption = "Status" Height = 2655 - Left = 120 + Left = -74880 TabIndex = 11 Top = 480 Width = 7695 @@ -387,7 +402,7 @@ Begin VB.Frame fraReg Caption = "Register" Height = 2895 - Left = 120 + Left = -74880 TabIndex = 7 Top = 3240 Width = 7695 @@ -459,8 +474,8 @@ Begin VB.ComboBox cmbLicClass Height = 315 ItemData = "frmMain.frx":0136 - Left = -73680 - List = "frmMain.frx":0140 + Left = 1320 + List = "frmMain.frx":0146 Style = 2 'Dropdown List TabIndex = 4 Top = 2730 @@ -470,7 +485,7 @@ Caption = "&Generate" Enabled = 0 'False Height = 255 - Left = -68520 + Left = 6480 TabIndex = 2 Top = 1560 Width = 1215 @@ -478,7 +493,7 @@ Begin VB.Label Label14 Caption = "ActiveLock's MD5 Checksum:" Height = 375 - Left = -74880 + Left = 120 TabIndex = 54 Top = 480 Width = 1215 @@ -486,7 +501,7 @@ Begin VB.Label lblDays Caption = "days" Height = 255 - Left = -72360 + Left = 2640 TabIndex = 42 Top = 2490 Width = 1335 @@ -494,7 +509,7 @@ Begin VB.Label lblExpiry Caption = "Expires after:" Height = 255 - Left = -74880 + Left = 120 TabIndex = 41 Top = 2445 Width = 1335 @@ -502,7 +517,7 @@ Begin VB.Label Label10 Caption = " Version:" Height = 255 - Left = -74880 + Left = 120 TabIndex = 39 Top = 1320 Width = 1335 @@ -510,7 +525,7 @@ Begin VB.Label Label9 Caption = "Software Name:" Height = 255 - Left = -74880 + Left = 120 TabIndex = 37 Top = 1080 Width = 1335 @@ -518,7 +533,7 @@ Begin VB.Label Label3 Caption = "License Class:" Height = 255 - Left = -74880 + Left = 120 TabIndex = 6 Top = 2730 Width = 1335 @@ -526,7 +541,7 @@ Begin VB.Label Label2 Caption = "License Type:" Height = 255 - Left = -74880 + Left = 120 TabIndex = 5 Top = 2160 Width = 1335 @@ -534,7 +549,7 @@ Begin VB.Label Label1 Caption = " Code:" Height = 255 - Left = -74880 + Left = 120 TabIndex = 1 Top = 1560 Width = 1335 @@ -598,6 +613,7 @@ ' /////////////////////////////////////////////////////////////////////// ' ' 07.31.03 - th2tran - Now performing checksum on ActiveLock2.dll. +' 08.01.03 - wizzardme2000 - LockTypes other than MAC are now supported ' ' /////////////////////////////////////////////////////////////////////// ' / MODULE CODE BEGINS BELOW THIS LINE / @@ -642,6 +658,10 @@ MyActiveLock.LockType = lockMAC ElseIf cmbLicClass = "Class 2 - Lock To Windows Serial" Then MyActiveLock.LockType = lockWindows + ElseIf cmbLicClass = "Class 3 - Lock To Computer Name" Then + MyActiveLock.LockType = lockComp + ElseIf cmbLicClass = "Class 4 - Lock To Hard Drive Serial" Then + MyActiveLock.LockType = lockHD End If End Sub @@ -683,8 +703,8 @@ Dim strReq As String strReq = ActiveLock2.Base64Decode(txtReqCodeIn) ' strReq now contains the {MAC + vbLf + User} string - Dim strMAC$, strUser$ - GetMACAndUserFromRequestCode strReq, strMAC, strUser + Dim strLock$, strUser$ + GetLockAndUserFromRequestCode strReq, strLock, strUser Dim strExpire$ strExpire = GetExpirationDate() @@ -724,17 +744,18 @@ End If End Function -Private Sub GetMACAndUserFromRequestCode(ByVal strReq As String, strMAC As String, strUser As String) +Private Sub GetLockAndUserFromRequestCode(ByVal strReq As String, strLock As String, strUser As String) Dim Index% Index = InStr(1, strReq, vbLf) If Index <= 0 Then Exit Sub - strMAC = Left(strReq, Index - 1) + strLock = Left(strReq, Index - 1) strUser = Mid$(strReq, Index + 1) strUser = TrimNulls(strUser) End Sub Private Function IndexOf(Str As String, char As Byte) As Integer + 'Dan asks: What is this for????? It's not used anywhere in the program... IndexOf = -1 On Error GoTo errHandler Dim arrBytes() As Byte @@ -755,8 +776,7 @@ ' Key Request and Registration Functionalities ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Private Sub cmdReqGen_Click() - ' Generate Request code to MAC Address - ' TODO: Handle other possibilities (Windows serial, etc...) + ' Generate Request code to Lock Dim strReq As String, strLock As String strLock = MyActiveLock.LockCode() ' combine with user name @@ -857,8 +877,18 @@ cboSpeed = cboSpeed.List(2) txtSoftwareCodePriv = modMain.PRIV_KEY txtSoftwareCodePub = modMain.PUB_KEY - cmbLicType = "Periodic" - cmbLicClass = "Class 1 - Lock To MAC" + + 'These MUST to be set BEFORE you generate the reg code + 'or the app will fail to register properly on the next run + 'I am going to add lots of comments here so that people + ' will find it because it messed me up for hours. + ' + '****************************************************************** + '* Don't Forget This!!!!!!!! * + '****************************************************************** + + cmbLicType = "Permanent" + cmbLicClass = "Class 4 - Lock To Hard Drive Serial" ' Check registration status On Error GoTo NotRegistered Index: frmMain.frx =================================================================== RCS file: /cvsroot/activelock/activelock2/test/frmMain.frx,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 Binary files /tmp/cvsugCOHQ and /tmp/cvsuiHJex differ |
From: Thanh H. T. <th...@sy...> - 2003-08-01 21:34:06
|
Hi Dan, > Private Function GetClassString(LockType As ActiveLock2.ALLockTypes) As String > + 'TODO: Decide the class numbers. > + ' lockMAC should probably be last, > + ' like it is in the enum. (IActivelock.cls) > If LockType = lockMAC Then > GetClassString = "Class1" > ElseIf LockType = lockWindows Then > GetClassString = "Class2" > - Else > - 'TODO: Handle the rest > + ElseIf LockType = lockComp Then > + GetClassString = "Class3" > + ElseIf LockType = lockHD Then > + GetClassString = "Class4" > End If > End Function Suggestion..... >Private Function GetClassString(LockType As ActiveLock2.ALLockTypes) As String GetClassString = "Class" & LockType > End Function BTW, I'm still waiting for your update on making these changes available in the TestApp. Thanh. ----- Original Message ----- From: "Dan" <wiz...@us...> To: <act...@li...> Sent: Tuesday, July 29, 2003 2:49 PM Subject: [ActiveLock-Development] CVS: activelock2/src ActiveLock.cls,1.6,1.7 ActiveLock2.dll,1.2,1.3 ActiveLock2.vbp,1.7,1.8 Globals.cls,1.7,1.8 > Update of /cvsroot/activelock/activelock2/src > In directory sc8-pr-cvs1:/tmp/cvs-serv8475/src > > Modified Files: > ActiveLock.cls ActiveLock2.dll ActiveLock2.vbp Globals.cls > Log Message: > Added support for locks other than MAC. Hopefully a new test app will follow shortly. > > - Dan > > Index: ActiveLock.cls > =================================================================== > RCS file: /cvsroot/activelock/activelock2/src/ActiveLock.cls,v > retrieving revision 1.6 > retrieving revision 1.7 > diff -u -d -r1.6 -r1.7 > --- ActiveLock.cls 28 Jul 2003 06:35:30 -0000 1.6 > +++ ActiveLock.cls 29 Jul 2003 18:49:42 -0000 1.7 > @@ -55,7 +55,6 @@ > ' / MODULE TO DO LIST / > ' /////////////////////////////////////////////////////////////////////// > ' > -' [ ] Implement IActiveLock_GetLockString() for locktypes other than MAC > ' [ ] IActiveLock_Acquire: Check if license has not expired > ' [ ] Implement IActiveLock_Release > ' [ ] Implement IActiveLock_Transfer > @@ -63,8 +62,9 @@ > ' / MODULE CHANGE LOG / > ' /////////////////////////////////////////////////////////////////////// > ' > -' 07.07.03 - mcrute - Updated the header comments for this file. > -' 07.28.03 - th2tran - Using RSA signature for license key. > +' 07.07.03 - mcrute - Updated the header comments for this file. > +' 07.28.03 - th2tran - Using RSA signature for license key. > +' 07.28.03 - wizzardme2000 - Implemented lockComp, lockHD, and lockWindows > ' > ' /////////////////////////////////////////////////////////////////////// > ' / MODULE CODE BEGINS BELOW THIS LINE / > @@ -286,13 +286,13 @@ > strLock = strLock & modMACAddress.GetMACAddress() > End If > If mLockTypes And lockComp Then > - ' TODO: strLock = strLock & GetComputerName() > + strLock = strLock & modComputerName.GetComputerName() > End If > If mLockTypes And lockHD Then > - ' TODO: strLock = strLock & GetComputerName() > + strLock = strLock & modHDSerial.GetHDSerial("C:\") > End If > If mLockTypes And lockWindows Then > - ' TODO: strLock = strLock & GetWindowSerial() > + strLock = strLock & modWindowsSerial.GetWindowsSerial() > End If > If Lic Is Nothing Then > IActiveLock_LockCode = strLock > > Index: ActiveLock2.dll > =================================================================== > RCS file: /cvsroot/activelock/activelock2/src/ActiveLock2.dll,v > retrieving revision 1.2 > retrieving revision 1.3 > diff -u -d -r1.2 -r1.3 > Binary files /tmp/cvsEbKVXy and /tmp/cvsayEYT0 differ > > Index: ActiveLock2.vbp > =================================================================== > RCS file: /cvsroot/activelock/activelock2/src/ActiveLock2.vbp,v > retrieving revision 1.7 > retrieving revision 1.8 > diff -u -d -r1.7 -r1.8 > --- ActiveLock2.vbp 28 Jul 2003 06:35:30 -0000 1.7 > +++ ActiveLock2.vbp 29 Jul 2003 18:49:42 -0000 1.8 > @@ -1,5 +1,5 @@ > Type=OleDll > -Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\Syst em32\stdole2.tlb#OLE Automation > +Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\.. \..\WINNT\System32\stdole2.tlb#OLE Automation > Class=ActiveLock; ActiveLock.cls > Class=IActiveLock; IActiveLock.cls > Class=Globals; Globals.cls > @@ -17,6 +17,9 @@ > Class=ActiveLockEventNotifier; ActiveLockEventNotifier.cls > Module=modActiveLock; modActiveLock.bas > Module=modBase64; modBase64.bas > +Module=modHDSerial; modHDSerial.bas > +Module=modWindowsSerial; modWindowsSerial.bas > +Module=modComputerName; modComputerName.bas > Startup="(None)" > HelpFile="" > Title="ActiveLock2" > > Index: Globals.cls > =================================================================== > RCS file: /cvsroot/activelock/activelock2/src/Globals.cls,v > retrieving revision 1.7 > retrieving revision 1.8 > diff -u -d -r1.7 -r1.8 > --- Globals.cls 28 Jul 2003 06:35:30 -0000 1.7 > +++ Globals.cls 29 Jul 2003 18:49:42 -0000 1.8 > @@ -53,7 +53,6 @@ > ' / MODULE TO DO LIST / > ' /////////////////////////////////////////////////////////////////////// > ' > -' [ ] GetClassString() - handle the rest of the LockTypes > ' [ ] GetLicTypeString() - implement this > ' > ' /////////////////////////////////////////////////////////////////////// > @@ -63,6 +62,7 @@ > ' 07.07.03 - mcrute - Updated the header comments for this file. > ' 07.21.03 - th2tran - Added ActiveLockErrCodeConstants to contain > ' a list of error code constants raised by ActiveLock. > +' 07.28.03 - wizzardme2000 - Implemented lockComp, lockHD, and lockWindows > ' > ' /////////////////////////////////////////////////////////////////////// > ' / MODULE CODE BEGINS BELOW THIS LINE / > @@ -146,12 +146,17 @@ > End Function > > Private Function GetClassString(LockType As ActiveLock2.ALLockTypes) As String > + 'TODO: Decide the class numbers. > + ' lockMAC should probably be last, > + ' like it is in the enum. (IActivelock.cls) > If LockType = lockMAC Then > GetClassString = "Class1" > ElseIf LockType = lockWindows Then > GetClassString = "Class2" > - Else > - 'TODO: Handle the rest > + ElseIf LockType = lockComp Then > + GetClassString = "Class3" > + ElseIf LockType = lockHD Then > + GetClassString = "Class4" > End If > End Function > > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > _______________________________________________ > Activelock-Development mailing list > Act...@li... > https://lists.sourceforge.net/lists/listinfo/activelock-development |
From: Thanh H. T. <th...@sy...> - 2003-08-01 21:24:56
|
Are .icls supported in VB6?=20 We just need some .ico files that we can attach to VB forms and = projects. No need to get too fancy. We've got much more important work = to do than icons, like making sure all the implemented features work = smoothly, for instance. :-) ----- Original Message -----=20 From: Dan=20 To: act...@li...=20 Sent: Friday, August 01, 2003 4:22 PM Subject: Re: [ActiveLock-Development] XP Icons A .icl is an Icon Library. .ico has problems if the more than one same = size at the same color-depth is in the same file. Maybe I should make a = dll instead. ----- Original Message -----=20 From: Thanh Hai Tran=20 To: act...@li...=20 Sent: Friday, August 01, 2003 11:53 AM Subject: Re: [ActiveLock-Development] XP Icons Dan, I saw your commits for some .icl files. What are icls? Why not = .ico? ----- Original Message -----=20 From: Dan=20 To: act...@li...=20 Sent: Friday, August 01, 2003 2:37 PM Subject: [ActiveLock-Development] XP Icons I put up some icons of ActiveLock2, but the libraries are huge = because my program won't properly import png transparency, so I had to = manually turn transparency on and off. This means that I had to put up 5 = copies of each icon so that one exists for most background colors. Does = anyone know of a good, free icon editor that'll import png = transparencies? Or, if you own a program that will do that, I could just = send the png's to you. Thanks, Dan |