activelock-development Mailing List for ActiveLock (Page 12)
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...@sy...> - 2003-10-04 14:59:32
|
The proposed time is 9PM Eastern (our usual slot). That's 8PM Central, = 7PM Mountain, 6PM Pacific. If any of you can't make this time, we're willing to entertain = suggestions on an alternate time. Please confirm whether or not you can = attend. - Thanh ----- Original Message -----=20 From: AJcompany AJcompany=20 To: act...@li...=20 Sent: Saturday, October 04, 2003 9:44 AM Subject: Re: [family] Re: [ActiveLock-Development] Meeting Call - = Sunday, Oct. 5, 2003 yeah, but which timezone? (I'm in central: GMT -6:00) ----- Original Message -----=20 From: Thanh Hai Tran=20 To: act...@li...=20 Sent: Friday, October 03, 2003 4:42 PM Subject: Re: [family] Re: [ActiveLock-Development] Meeting Call - = Sunday, Oct. 5, 2003 Please read the subject line. ----- Original Message -----=20 From: AJcompany AJcompany=20 To: act...@li...=20 Sent: Friday, October 03, 2003 5:28 PM Subject: Re: [family] Re: [ActiveLock-Development] Meeting Call - = Sunday, Oct. 5, 2003 9PM when? ----- Original Message -----=20 From: Michael E. Crute=20 To: act...@li...=20 Sent: Friday, October 03, 2003 10:19 AM Subject: [family] Re: [ActiveLock-Development] Meeting Call - = Sunday, Oct. 5, 2003 I can be there at about 9PM -Mike Thanh Hai Tran wrote: Team, We need everyone to get together this Sunday to discuss = planning and activities to get Alpha 2 released, targeted for Oct. 13. Please suggest an appropriate time that suits each of you. Thank you. - Thanh --=20 **************************************** Michael E. Crute Senior Applications Developer SoftGroup Development Corporation mc...@so... |
From: AJcompany A. <ajc...@ya...> - 2003-10-04 13:44:02
|
yeah, but which timezone? (I'm in central: GMT -6:00) ----- Original Message ----- From: Thanh Hai Tran To: act...@li... Sent: Friday, October 03, 2003 4:42 PM Subject: Re: [family] Re: [ActiveLock-Development] Meeting Call - Sunday, Oct. 5, 2003 Please read the subject line. ----- Original Message ----- From: AJcompany AJcompany To: act...@li... Sent: Friday, October 03, 2003 5:28 PM Subject: Re: [family] Re: [ActiveLock-Development] Meeting Call - Sunday, Oct. 5, 2003 9PM when? ----- Original Message ----- From: Michael E. Crute To: act...@li... Sent: Friday, October 03, 2003 10:19 AM Subject: [family] Re: [ActiveLock-Development] Meeting Call - Sunday, Oct. 5, 2003 I can be there at about 9PM -Mike Thanh Hai Tran wrote: Team, We need everyone to get together this Sunday to discuss planning and activities to get Alpha 2 released, targeted for Oct. 13. Please suggest an appropriate time that suits each of you. Thank you. - Thanh -- ****************************************Michael E. CruteSenior Applications DeveloperSoftGroup Development Cor...@so... ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Activelock-Development mailing list Act...@li... https://lists.sourceforge.net/lists/listinfo/activelock-development --------------------------------- Do you Yahoo!? The New Yahoo! Shopping - with improved product search --------------------------------- Do you Yahoo!? The New Yahoo! Shopping - with improved product search |
From: Thanh H. T. <th...@sy...> - 2003-10-03 21:42:31
|
Please read the subject line. ----- Original Message -----=20 From: AJcompany AJcompany=20 To: act...@li...=20 Sent: Friday, October 03, 2003 5:28 PM Subject: Re: [family] Re: [ActiveLock-Development] Meeting Call - = Sunday, Oct. 5, 2003 9PM when? ----- Original Message -----=20 From: Michael E. Crute=20 To: act...@li...=20 Sent: Friday, October 03, 2003 10:19 AM Subject: [family] Re: [ActiveLock-Development] Meeting Call - = Sunday, Oct. 5, 2003 I can be there at about 9PM -Mike Thanh Hai Tran wrote: Team, We need everyone to get together this Sunday to discuss planning = and activities to get Alpha 2 released, targeted for Oct. 13. Please suggest an appropriate time that suits each of you. Thank you. - Thanh --=20 **************************************** Michael E. Crute Senior Applications Developer SoftGroup Development Corporation mc...@so...-------------------------------------------------= ------ This sf.net email is sponsored by:ThinkGeek Welcome to geek = heaven. http://thinkgeek.com/sf = _______________________________________________ Activelock-Development = mailing list Act...@li... = https://lists.sourceforge.net/lists/listinfo/activelock-development -------------------------------------------------------------------------= ----- Do you Yahoo!? The New Yahoo! Shopping - with improved product search |
From: AJcompany A. <ajc...@ya...> - 2003-10-03 21:28:18
|
9PM when? ----- Original Message ----- From: Michael E. Crute To: act...@li... Sent: Friday, October 03, 2003 10:19 AM Subject: [family] Re: [ActiveLock-Development] Meeting Call - Sunday, Oct. 5, 2003 I can be there at about 9PM -Mike Thanh Hai Tran wrote: Team, We need everyone to get together this Sunday to discuss planning and activities to get Alpha 2 released, targeted for Oct. 13. Please suggest an appropriate time that suits each of you. Thank you. - Thanh -- ****************************************Michael E. CruteSenior Applications DeveloperSoftGroup Development Cor...@so... ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Activelock-Development mailing list Act...@li... https://lists.sourceforge.net/lists/listinfo/activelock-development --------------------------------- Do you Yahoo!? The New Yahoo! Shopping - with improved product search |
From: Michael E. C. <mc...@so...> - 2003-10-03 15:19:40
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title></title> </head> <body text="#3333ff" bgcolor="#ffffff"> <font size="-1"><span style="font-family: verdana;">I can be there at about 9PM<br> <br> -Mike<br> </span></font><br> Thanh Hai Tran wrote:<br> <blockquote type="cite" cite="mid03be01c389b9$db1f4300$750...@ka..."> <title></title> <meta content="text/html;charset=UTF-8" http-equiv="Content-Type"> <meta name="GENERATOR" content="MSHTML 6.00.2800.1226"> <style></style> <div><font size="2" color="#000000">Team,</font></div> <div><font size="2" color="#000000">We need everyone to get together this Sunday to discuss planning and activities to get Alpha 2 released, targeted for Oct. 13.</font></div> <div><font size="2" color="#000000">Please suggest an appropriate time that suits each of you.</font></div> <div><font size="2" color="#000000">Thank you.</font></div> <div><font size="2" color="#000000">- Thanh</font></div> <div> </div> <div> </div> </blockquote> <br> <pre cols="72" class="moz-signature">-- **************************************** Michael E. Crute Senior Applications Developer SoftGroup Development Corporation <a class="moz-txt-link-abbreviated" href="mailto:mc...@so...">mc...@so...</a></pre> </body> </html> |
From: Thanh H. T. <th...@sy...> - 2003-10-03 14:23:06
|
Team, We need everyone to get together this Sunday to discuss planning and = activities to get Alpha 2 released, targeted for Oct. 13. Please suggest an appropriate time that suits each of you. Thank you. - Thanh |
From: Thanh H. T. <th...@us...> - 2003-09-22 04:03:56
|
Update of /cvsroot/activelock/activelock/examples/example1 In directory sc8-pr-cvs1:/tmp/cvs-serv20218 Modified Files: frmMain.frm ALTestApp.exe frmMain.frx Log Message: - Removed Admin tab - set an icon for the EXE Index: frmMain.frm =================================================================== RCS file: /cvsroot/activelock/activelock/examples/example1/frmMain.frm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- frmMain.frm 22 Sep 2003 03:05:00 -0000 1.2 +++ frmMain.frm 22 Sep 2003 04:03:52 -0000 1.3 @@ -8,6 +8,7 @@ ClientLeft = 45 ClientTop = 330 ClientWidth = 8025 + Icon = "frmMain.frx":0000 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False @@ -18,7 +19,7 @@ Align = 2 'Align Bottom Height = 255 Left = 0 - TabIndex = 41 + TabIndex = 0 Top = 6360 Width = 8025 _ExtentX = 14155 @@ -37,102 +38,94 @@ Begin TabDlg.SSTab SSTab1 Height = 6255 Left = 0 - TabIndex = 0 + TabIndex = 3 Top = 0 Width = 7935 _ExtentX = 13996 _ExtentY = 11033 _Version = 393216 - Tab = 1 + Tabs = 2 + TabsPerRow = 2 TabHeight = 520 - TabCaption(0) = "Admin" - TabPicture(0) = "frmMain.frx":0000 - Tab(0).ControlEnabled= 0 'False - Tab(0).Control(0)= "Label1" - Tab(0).Control(1)= "Label9" - Tab(0).Control(2)= "Label10" - Tab(0).Control(3)= "Label14" - Tab(0).Control(4)= "Label15" - Tab(0).Control(5)= "txtName" - Tab(0).Control(6)= "txtVersion" - Tab(0).Control(7)= "txtSoftwareCodePub" - Tab(0).Control(8)= "txtChecksum" - Tab(0).Control(9)= "Text1" - Tab(0).ControlCount= 10 - 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).ControlCount= 2 - TabCaption(2) = "Sample App" - TabPicture(2) = "frmMain.frx":0038 - Tab(2).ControlEnabled= 0 'False - Tab(2).Control(0)= "fraTicker" - Tab(2).Control(1)= "fraViewport" - Tab(2).Control(2)= "Frame1" - Tab(2).ControlCount= 3 - Begin VB.TextBox Text1 - BackColor = &H80000011& - Height = 1455 - Left = -74880 - MultiLine = -1 'True - TabIndex = 42 - Text = "frmMain.frx":0054 - Top = 4680 - Width = 7695 - End - Begin VB.TextBox txtChecksum - BackColor = &H80000011& - Height = 285 - Left = -73680 - Locked = -1 'True - TabIndex = 40 - Top = 600 - Width = 5055 - End - Begin VB.TextBox txtSoftwareCodePub - BackColor = &H80000011& - Height = 285 - Left = -73680 - Locked = -1 'True - TabIndex = 29 - Top = 1560 - Width = 5055 + TabCaption(0) = "Registration" + TabPicture(0) = "frmMain.frx":0CCA + Tab(0).ControlEnabled= -1 'True + Tab(0).Control(0)= "fraRegStatus" + Tab(0).Control(0).Enabled= 0 'False + Tab(0).Control(1)= "fraReg" + Tab(0).Control(1).Enabled= 0 'False + Tab(0).ControlCount= 2 + TabCaption(1) = "Sample App" + TabPicture(1) = "frmMain.frx":0CE6 + Tab(1).ControlEnabled= 0 'False + Tab(1).Control(0)= "Frame1" + Tab(1).Control(1)= "fraTicker" + Tab(1).Control(2)= "fraViewport" + Tab(1).ControlCount= 3 + Begin VB.Frame fraViewport + BorderStyle = 0 'None + Height = 400 + Left = -74950 + TabIndex = 35 + Top = 5510 + Width = 7850 + Begin ALTestApp.atViewPort atViewPort1 + Height = 375 + Left = 0 + Top = 0 + Width = 7845 + _ExtentX = 13838 + _ExtentY = 661 + TickerScaleHeight= 21 + TickerScaleWidth= 519 + TickerFontBold = -1 'True + TickerFontSize = 11.25 + TickerFlash = 0 'False + TickerPlaySound = 0 'False + TickerScrollX = 473 + BalloonTipIcon = 0 + BalloonTipText = "No Messages" + End End - Begin VB.TextBox txtVersion - BackColor = &H80000011& - Height = 285 - Left = -73680 - Locked = -1 'True + Begin VB.Frame fraTicker + Caption = "Message" + Height = 1890 + Left = -74880 TabIndex = 32 - Top = 1320 - Width = 5055 - End - Begin VB.TextBox txtName - BackColor = &H80000011& - Height = 285 - Left = -73680 - Locked = -1 'True - TabIndex = 30 - Top = 1080 - Width = 5055 + Top = 420 + Width = 7575 + Begin VB.TextBox txtTicker + Height = 1200 + Left = 30 + MultiLine = -1 'True + ScrollBars = 2 'Vertical + TabIndex = 34 + Text = "frmMain.frx":0D02 + Top = 240 + Width = 7425 + End + Begin VB.CommandButton cmdTest + Caption = "&Update Ticker" + Height = 315 + Left = 5730 + TabIndex = 33 + Top = 1475 + Width = 1710 + End End Begin VB.Frame Frame1 BorderStyle = 0 'None Height = 2775 - Left = -74895 - TabIndex = 17 - Top = 2520 + Left = -74865 + TabIndex = 20 + Top = 2580 Width = 6615 Begin VB.OptionButton optForm Caption = "System Tray" Height = 225 Index = 1 Left = 2040 - TabIndex = 26 + TabIndex = 29 Top = 1245 Width = 1395 End @@ -141,18 +134,18 @@ Height = 225 Index = 0 Left = 2040 - TabIndex = 25 + TabIndex = 28 Top = 960 Value = -1 'True Width = 1395 End Begin VB.ComboBox cboSpeed Height = 315 - ItemData = "frmMain.frx":01CA + ItemData = "frmMain.frx":0D74 Left = 2070 - List = "frmMain.frx":01DD + List = "frmMain.frx":0D87 Style = 2 'Dropdown List - TabIndex = 24 + TabIndex = 27 Top = 270 Width = 1635 End @@ -160,7 +153,7 @@ Caption = "Black Out Ticker" Height = 420 Left = 0 - TabIndex = 20 + TabIndex = 26 Top = 645 Width = 1590 End @@ -168,7 +161,7 @@ Caption = "Play Sound On New Message" Height = 495 Left = 0 - TabIndex = 22 + TabIndex = 25 Top = 1590 Width = 1470 End @@ -176,7 +169,7 @@ Caption = "Pause Ticker" Height = 315 Left = 0 - TabIndex = 19 + TabIndex = 24 Top = 300 Width = 1365 End @@ -184,7 +177,7 @@ Caption = "Flash Ticker On New Message" Height = 495 Left = 0 - TabIndex = 21 + TabIndex = 23 Top = 1080 Width = 1470 End @@ -192,7 +185,7 @@ Caption = "Scroll Ticker" Height = 225 Left = 15 - TabIndex = 18 + TabIndex = 22 Top = 0 Value = 1 'Checked Width = 1275 @@ -201,7 +194,7 @@ Caption = "Enable Balloon Tooltip" Height = 495 Left = 15 - TabIndex = 23 + TabIndex = 21 Top = 2115 Width = 1755 End @@ -209,7 +202,7 @@ Caption = "Ticker Host:" Height = 255 Left = 2055 - TabIndex = 28 + TabIndex = 31 Top = 705 Width = 990 End @@ -217,131 +210,22 @@ Caption = "Scroll Speed:" Height = 255 Left = 2070 - TabIndex = 27 + TabIndex = 30 Top = 15 Width = 1245 End End - Begin VB.Frame fraViewport - Height = 400 - Left = -75000 - TabIndex = 15 - Top = 5790 - Width = 7850 - Begin ALTestApp.atViewPort atViewPort1 - Height = 375 - 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 = 473 - BalloonTipIcon = 0 - BalloonTipText = "No Messages" - End - End - Begin VB.Frame fraTicker - Caption = "Message" - Height = 1890 - Left = -74895 - TabIndex = 13 - Top = 480 - Width = 7575 - Begin VB.TextBox txtTicker - Height = 1200 - Left = 30 - MultiLine = -1 'True - ScrollBars = 2 'Vertical - TabIndex = 14 - Text = "frmMain.frx":0207 - Top = 240 - Width = 7425 - End - Begin VB.CommandButton cmdTest - Caption = "&Update Ticker" - Height = 315 - Left = 5730 - TabIndex = 16 - Top = 1475 - Width = 1710 - End - End - Begin VB.Frame fraRegStatus - Caption = "Status" - Height = 2175 - Left = 120 - TabIndex = 6 - Top = 480 - Width = 7695 - Begin VB.TextBox txtExpiration - BackColor = &H80000013& - Height = 285 - Left = 1560 - Locked = -1 'True - TabIndex = 12 - Top = 720 - Width = 4335 - End - Begin VB.TextBox txtUsedDays - BackColor = &H80000013& - Height = 285 - Left = 1560 - Locked = -1 'True - TabIndex = 10 - Top = 480 - Width = 4335 - End - Begin VB.TextBox txtRegStatus - BackColor = &H80000013& - Height = 285 - Left = 1560 - Locked = -1 'True - TabIndex = 8 - Top = 240 - Width = 4335 - End - Begin VB.Label Label8 - Caption = "Expiry Date:" - Height = 255 - Left = 120 - TabIndex = 11 - Top = 720 - Width = 975 - End - Begin VB.Label Label7 - Caption = "Days Used:" - Height = 255 - Left = 120 - TabIndex = 9 - Top = 480 - Width = 975 - End - Begin VB.Label Label6 - Caption = "Registered:" - Height = 255 - Left = 120 - TabIndex = 7 - Top = 240 - Width = 975 - End - End Begin VB.Frame fraReg Caption = "Register" - Height = 2895 + Height = 3255 Left = 120 - TabIndex = 2 - Top = 3240 + TabIndex = 11 + Top = 2580 Width = 7695 Begin VB.TextBox txtUser Height = 285 Left = 1320 - TabIndex = 37 + TabIndex = 16 Text = "Thanh Tran" Top = 240 Width = 5055 @@ -350,7 +234,7 @@ Caption = "&Generate" Height = 255 Left = 6480 - TabIndex = 36 + TabIndex = 15 Top = 600 Width = 1095 End @@ -359,7 +243,7 @@ Height = 285 Left = 1320 Locked = -1 'True - TabIndex = 34 + TabIndex = 14 Top = 600 Width = 5055 End @@ -368,14 +252,14 @@ Enabled = 0 'False Height = 255 Left = 6480 - TabIndex = 5 + TabIndex = 13 Top = 960 Width = 1095 End Begin VB.TextBox txtLibKeyIn Height = 285 Left = 1320 - TabIndex = 4 + TabIndex = 12 Top = 960 Width = 5055 End @@ -383,7 +267,7 @@ Caption = "User Name:" Height = 255 Left = 120 - TabIndex = 38 + TabIndex = 19 Top = 240 Width = 1335 End @@ -391,7 +275,7 @@ Caption = "Request Code:" Height = 255 Left = 120 - TabIndex = 35 + TabIndex = 18 Top = 600 Width = 1335 End @@ -399,50 +283,105 @@ Caption = "Liberation Key:" Height = 255 Left = 120 - TabIndex = 3 + TabIndex = 17 Top = 960 Width = 1335 End End - Begin VB.Label Label15 - Caption = "Instructions:" - Height = 495 - Left = -74880 - TabIndex = 43 - Top = 4440 - Width = 1935 - End - Begin VB.Label Label14 - Caption = "ActiveLock's Checksum:" - Height = 375 - Left = -74880 - TabIndex = 39 - Top = 480 - Width = 1215 - End - Begin VB.Label Label10 - Caption = " Version:" - Height = 255 - Left = -74880 - TabIndex = 33 - Top = 1320 - Width = 1335 - End - Begin VB.Label Label9 - Caption = "Software Name:" - Height = 255 - Left = -74880 - TabIndex = 31 - Top = 1080 - Width = 1335 - End - Begin VB.Label Label1 - Caption = " Code:" - Height = 255 - Left = -74880 - TabIndex = 1 - Top = 1560 - Width = 1335 + Begin VB.Frame fraRegStatus + Caption = "Status" + Height = 2055 + Left = 120 + TabIndex = 4 + Top = 420 + Width = 7695 + Begin VB.TextBox txtVersion + BackColor = &H80000013& + Height = 285 + Left = 1560 + Locked = -1 'True + TabIndex = 2 + Text = "1.0" + Top = 480 + Width = 4335 + End + Begin VB.TextBox txtName + BackColor = &H80000013& + Height = 285 + Left = 1560 + Locked = -1 'True + TabIndex = 1 + Text = "TestApp" + Top = 240 + Width = 4335 + End + Begin VB.TextBox txtExpiration + BackColor = &H80000013& + Height = 285 + Left = 1560 + Locked = -1 'True + TabIndex = 7 + Top = 1320 + Width = 4335 + End + Begin VB.TextBox txtUsedDays + BackColor = &H80000013& + Height = 285 + Left = 1560 + Locked = -1 'True + TabIndex = 6 + Top = 1080 + Width = 4335 + End + Begin VB.TextBox txtRegStatus + BackColor = &H80000013& + Height = 285 + Left = 1560 + Locked = -1 'True + TabIndex = 5 + Top = 840 + Width = 4335 + End + Begin VB.Label Label2 + Caption = "App Version:" + Height = 255 + Left = 120 + TabIndex = 37 + Top = 480 + Width = 975 + End + Begin VB.Label Label1 + Caption = "App Name:" + Height = 255 + Left = 120 + TabIndex = 36 + Top = 240 + Width = 975 + End + Begin VB.Label Label8 + Caption = "Expiry Date:" + Height = 255 + Left = 120 + TabIndex = 10 + Top = 1320 + Width = 975 + End + Begin VB.Label Label7 + Caption = "Days Used:" + Height = 255 + Left = 120 + TabIndex = 9 + Top = 1080 + Width = 975 + End + Begin VB.Label Label6 + Caption = "Registered:" + Height = 255 + Left = 120 + TabIndex = 8 + Top = 840 + Width = 975 + End End End End @@ -526,7 +465,12 @@ FunctionalitiesEnabled = False ' Disable functionalities by default ' Initialize AL Set MyActiveLock = ActiveLock2.NewInstance() - MyActiveLock.LockType = lockHD + With MyActiveLock + .SoftwareName = "TestApp" + .SoftwareVersion = "1.0" + .SoftwareCode = PUB_KEY + .LockType = lockHD + End With ' Verify AL's authenticity ' VerifyActiveLockdll requires a public-creatable object to be passed in so that it can @@ -553,10 +497,8 @@ .TickerPlaySound = chkSound .TickerScroll = chkScroll End With - txtName = "TestApp" 'App.EXEName txtVersion = App.Major & "." & App.Minor & "." & App.Revision cboSpeed = cboSpeed.List(2) - 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 @@ -703,10 +645,6 @@ Private Sub txtName_Change() MyActiveLock.SoftwareName = txtName -End Sub - -Private Sub txtSoftwareCodePub_Change() - MyActiveLock.SoftwareCode = txtSoftwareCodePub End Sub Private Sub txtVersion_Change() Index: ALTestApp.exe =================================================================== RCS file: /cvsroot/activelock/activelock/examples/example1/ALTestApp.exe,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsaYBhe3 and /tmp/cvs0uhHoV differ Index: frmMain.frx =================================================================== RCS file: /cvsroot/activelock/activelock/examples/example1/frmMain.frx,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 Binary files /tmp/cvsTEYbC6 and /tmp/cvs0LSh02 differ |
From: Thanh H. T. <th...@us...> - 2003-09-22 03:09:21
|
Update of /cvsroot/activelock/activelock/examples/example1 In directory sc8-pr-cvs1:/tmp/cvs-serv12412 Modified Files: ALTestApp.vbp Log Message: Added conditional compilation flag for easy debugging. Need to remember to take this flag off for the release build. Index: ALTestApp.vbp =================================================================== RCS file: /cvsroot/activelock/activelock/examples/example1/ALTestApp.vbp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ALTestApp.vbp 15 Aug 2003 18:56:09 -0000 1.1 +++ ALTestApp.vbp 22 Sep 2003 03:09:18 -0000 1.2 @@ -6,8 +6,8 @@ UserControl=atViewPort.ctl Module=modMain; modMain.bas Module=modActiveLock; ..\..\src\modActiveLock.bas -ResFile32="atDisplay.RES" Object={6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0; COMCTL32.OCX +ResFile32="atDisplay.RES" IconForm="frmMain" Startup="frmMain" HelpFile="" @@ -23,6 +23,7 @@ AutoIncrementVer=0 ServerSupportFiles=0 VersionCompanyName="The ActiveLock Software Group" +CondComp="AL_DEBUG = 1" CompilationType=0 OptimizationType=0 FavorPentiumPro(tm)=0 |
From: Thanh H. T. <th...@us...> - 2003-09-22 03:06:12
|
Update of /cvsroot/activelock/activelock/examples/example1 In directory sc8-pr-cvs1:/tmp/cvs-serv12046 Modified Files: al.lic Log Message: Updated license, generated by ALUGEN. Index: al.lic =================================================================== RCS file: /cvsroot/activelock/activelock/examples/example1/al.lic,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- al.lic 15 Aug 2003 18:56:09 -0000 1.1 +++ al.lic 22 Sep 2003 03:06:06 -0000 1.2 @@ -0,0 +1,11 @@ +[TestApp] +ProductKey=AAAAB3NzaC1yc2EAAAABJQAAAIBmyH+sZ9eXI33MbVFWR85fsHLXndX2WaNokSaqxYltluQx2sX4T81r7jazTFxcczllwuMEauhL1rTqXCma0uA6xAQGajRorXeLcrW5OHIut7+HprXy9MTUp0SwsVFJJjDaRmodPaCBTUPD006lG7LNN5/jO/Cj8dNf6lVHy+VnIQ== +ProductVersion=1.0 +LicenseType=Single +LicenseClass=Class1 +Licensee=Thanh Tran +LicenseKey=AAAAB3NzaC1yc2EAAACAEQw711E3i6aMxicVhpH9EhBFVzGSGGzYrI8uCvLOh6SFmy1/WFI+uJX0iM/Qajxa5LwNWIZtcX+NHCBrg70mwS5NbiMIrg6KaUUumdj5We9tCTyRox5OflfhJWZrXQYv2Bl1LAsvGviZRKgMAjcXYt32Urq6ES3O42F3pgXdgQM +RegisteredDate=2003/09/21 +LastUsed=2003/09/21 21:37:14 +Hash1=391f3f633cd0b5c36bec98078414f49c +Expiration=2003/10/21 |
From: Thanh H. T. <th...@us...> - 2003-09-22 03:05:13
|
Update of /cvsroot/activelock/activelock/examples/example1 In directory sc8-pr-cvs1:/tmp/cvs-serv11839 Modified Files: frmMain.frm modMain.bas frmMain.frx Log Message: Removed Key Generator functionality. This part is now handled by ALUGEN. Index: frmMain.frm =================================================================== RCS file: /cvsroot/activelock/activelock/examples/example1/frmMain.frm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- frmMain.frm 15 Aug 2003 18:56:09 -0000 1.1 +++ frmMain.frm 22 Sep 2003 03:05:00 -0000 1.2 @@ -18,7 +18,7 @@ Align = 2 'Align Bottom Height = 255 Left = 0 - TabIndex = 56 + TabIndex = 41 Top = 6360 Width = 8025 _ExtentX = 14155 @@ -43,70 +43,43 @@ _ExtentX = 13996 _ExtentY = 11033 _Version = 393216 + Tab = 1 TabHeight = 520 TabCaption(0) = "Admin" TabPicture(0) = "frmMain.frx":0000 - Tab(0).ControlEnabled= -1 'True + Tab(0).ControlEnabled= 0 'False 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)= "Label15" - Tab(0).Control(8).Enabled= 0 'False - Tab(0).Control(9)= "cmdSoftwareCodeGen" - Tab(0).Control(9).Enabled= 0 'False - Tab(0).Control(10)= "cmbLicClass" - Tab(0).Control(10).Enabled= 0 'False - Tab(0).Control(11)= "txtName" - Tab(0).Control(11).Enabled= 0 'False - Tab(0).Control(12)= "txtVersion" - Tab(0).Control(12).Enabled= 0 'False - Tab(0).Control(13)= "txtSoftwareCodePriv" - Tab(0).Control(13).Enabled= 0 'False - Tab(0).Control(14)= "txtSoftwareCodePub" - Tab(0).Control(14).Enabled= 0 'False - Tab(0).Control(15)= "cmbLicType" - Tab(0).Control(15).Enabled= 0 'False - Tab(0).Control(16)= "txtDays" - Tab(0).Control(16).Enabled= 0 'False - Tab(0).Control(17)= "fraKeyGen" - Tab(0).Control(17).Enabled= 0 'False - Tab(0).Control(18)= "txtChecksum" - Tab(0).Control(18).Enabled= 0 'False - Tab(0).Control(19)= "Text1" - Tab(0).Control(19).Enabled= 0 'False - Tab(0).ControlCount= 20 + Tab(0).Control(1)= "Label9" + Tab(0).Control(2)= "Label10" + Tab(0).Control(3)= "Label14" + Tab(0).Control(4)= "Label15" + Tab(0).Control(5)= "txtName" + Tab(0).Control(6)= "txtVersion" + Tab(0).Control(7)= "txtSoftwareCodePub" + Tab(0).Control(8)= "txtChecksum" + Tab(0).Control(9)= "Text1" + Tab(0).ControlCount= 10 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).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).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 Text1 BackColor = &H80000011& Height = 1455 - Left = 120 + Left = -74880 MultiLine = -1 'True - TabIndex = 57 + TabIndex = 42 Text = "frmMain.frx":0054 Top = 4680 Width = 7695 @@ -114,114 +87,36 @@ Begin VB.TextBox txtChecksum BackColor = &H80000011& Height = 285 - Left = 1320 - Locked = -1 'True - TabIndex = 55 - Top = 600 - Width = 5055 - End - Begin VB.Frame fraKeyGen - Caption = "Key Generator" - Height = 1335 - Left = 120 - TabIndex = 43 - Top = 3000 - Width = 7455 - Begin VB.TextBox txtReqCodeIn - Height = 285 - Left = 1320 - TabIndex = 50 - Top = 240 - Width = 4935 - End - Begin VB.TextBox txtLibKey - BackColor = &H80000011& - Height = 285 - Left = 1320 - TabIndex = 45 - Top = 600 - Width = 4935 - End - Begin VB.CommandButton cmdKeyGen - Caption = "Generat&e" - Enabled = 0 'False - Height = 255 - Left = 6360 - TabIndex = 44 - ToolTipText = "Generate liberation key for the above request code (which should not be blank)." - Top = 600 - Width = 975 - End - Begin VB.Label Label5 - Caption = "Request Code:" - Height = 255 - Left = 120 - TabIndex = 51 - Top = 240 - Width = 1335 - End - Begin VB.Label Label12 - Caption = "Liberation Key:" - Height = 255 - Left = 120 - TabIndex = 46 - Top = 600 - Width = 1335 - End - End - Begin VB.TextBox txtDays - BackColor = &H80000011& - Height = 285 - Left = 1320 + Left = -73680 Locked = -1 'True TabIndex = 40 - Text = "30" - Top = 2325 - Width = 1215 - End - Begin VB.ComboBox cmbLicType - Height = 315 - ItemData = "frmMain.frx":01CA - Left = 1320 - List = "frmMain.frx":01D7 - Style = 2 'Dropdown List - TabIndex = 3 - Top = 2040 + Top = 600 Width = 5055 End Begin VB.TextBox txtSoftwareCodePub BackColor = &H80000011& Height = 285 - Left = 3840 - Locked = -1 'True - TabIndex = 34 - Top = 1560 - Width = 2535 - End - Begin VB.TextBox txtSoftwareCodePriv - BackColor = &H80000011& - Height = 285 - Left = 1320 + Left = -73680 Locked = -1 'True - TabIndex = 35 + TabIndex = 29 Top = 1560 - Width = 2535 + Width = 5055 End Begin VB.TextBox txtVersion BackColor = &H80000011& Height = 285 - Left = 1320 + Left = -73680 Locked = -1 'True - TabIndex = 38 + TabIndex = 32 Top = 1320 Width = 5055 End Begin VB.TextBox txtName BackColor = &H80000011& Height = 285 - Left = 1320 + Left = -73680 Locked = -1 'True - TabIndex = 36 + TabIndex = 30 Top = 1080 Width = 5055 End @@ -229,7 +124,7 @@ BorderStyle = 0 'None Height = 2775 Left = -74895 - TabIndex = 22 + TabIndex = 17 Top = 2520 Width = 6615 Begin VB.OptionButton optForm @@ -237,7 +132,7 @@ Height = 225 Index = 1 Left = 2040 - TabIndex = 31 + TabIndex = 26 Top = 1245 Width = 1395 End @@ -246,18 +141,18 @@ Height = 225 Index = 0 Left = 2040 - TabIndex = 30 + TabIndex = 25 Top = 960 Value = -1 'True Width = 1395 End Begin VB.ComboBox cboSpeed Height = 315 - ItemData = "frmMain.frx":01FD + ItemData = "frmMain.frx":01CA Left = 2070 - List = "frmMain.frx":0210 + List = "frmMain.frx":01DD Style = 2 'Dropdown List - TabIndex = 29 + TabIndex = 24 Top = 270 Width = 1635 End @@ -265,7 +160,7 @@ Caption = "Black Out Ticker" Height = 420 Left = 0 - TabIndex = 25 + TabIndex = 20 Top = 645 Width = 1590 End @@ -273,7 +168,7 @@ Caption = "Play Sound On New Message" Height = 495 Left = 0 - TabIndex = 27 + TabIndex = 22 Top = 1590 Width = 1470 End @@ -281,7 +176,7 @@ Caption = "Pause Ticker" Height = 315 Left = 0 - TabIndex = 24 + TabIndex = 19 Top = 300 Width = 1365 End @@ -289,7 +184,7 @@ Caption = "Flash Ticker On New Message" Height = 495 Left = 0 - TabIndex = 26 + TabIndex = 21 Top = 1080 Width = 1470 End @@ -297,7 +192,7 @@ Caption = "Scroll Ticker" Height = 225 Left = 15 - TabIndex = 23 + TabIndex = 18 Top = 0 Value = 1 'Checked Width = 1275 @@ -306,7 +201,7 @@ Caption = "Enable Balloon Tooltip" Height = 495 Left = 15 - TabIndex = 28 + TabIndex = 23 Top = 2115 Width = 1755 End @@ -314,7 +209,7 @@ Caption = "Ticker Host:" Height = 255 Left = 2055 - TabIndex = 33 + TabIndex = 28 Top = 705 Width = 990 End @@ -322,7 +217,7 @@ Caption = "Scroll Speed:" Height = 255 Left = 2070 - TabIndex = 32 + TabIndex = 27 Top = 15 Width = 1245 End @@ -330,7 +225,7 @@ Begin VB.Frame fraViewport Height = 400 Left = -75000 - TabIndex = 20 + TabIndex = 15 Top = 5790 Width = 7850 Begin ALTestApp.atViewPort atViewPort1 @@ -355,7 +250,7 @@ Caption = "Message" Height = 1890 Left = -74895 - TabIndex = 18 + TabIndex = 13 Top = 480 Width = 7575 Begin VB.TextBox txtTicker @@ -363,8 +258,8 @@ Left = 30 MultiLine = -1 'True ScrollBars = 2 'Vertical - TabIndex = 19 - Text = "frmMain.frx":023A + TabIndex = 14 + Text = "frmMain.frx":0207 Top = 240 Width = 7425 End @@ -372,7 +267,7 @@ Caption = "&Update Ticker" Height = 315 Left = 5730 - TabIndex = 21 + TabIndex = 16 Top = 1475 Width = 1710 End @@ -380,8 +275,8 @@ Begin VB.Frame fraRegStatus Caption = "Status" Height = 2175 - Left = -74880 - TabIndex = 11 + Left = 120 + TabIndex = 6 Top = 480 Width = 7695 Begin VB.TextBox txtExpiration @@ -389,7 +284,7 @@ Height = 285 Left = 1560 Locked = -1 'True - TabIndex = 17 + TabIndex = 12 Top = 720 Width = 4335 End @@ -398,7 +293,7 @@ Height = 285 Left = 1560 Locked = -1 'True - TabIndex = 15 + TabIndex = 10 Top = 480 Width = 4335 End @@ -407,7 +302,7 @@ Height = 285 Left = 1560 Locked = -1 'True - TabIndex = 13 + TabIndex = 8 Top = 240 Width = 4335 End @@ -415,7 +310,7 @@ Caption = "Expiry Date:" Height = 255 Left = 120 - TabIndex = 16 + TabIndex = 11 Top = 720 Width = 975 End @@ -423,7 +318,7 @@ Caption = "Days Used:" Height = 255 Left = 120 - TabIndex = 14 + TabIndex = 9 Top = 480 Width = 975 End @@ -431,7 +326,7 @@ Caption = "Registered:" Height = 255 Left = 120 - TabIndex = 12 + TabIndex = 7 Top = 240 Width = 975 End @@ -439,14 +334,14 @@ Begin VB.Frame fraReg Caption = "Register" Height = 2895 - Left = -74880 - TabIndex = 7 + Left = 120 + TabIndex = 2 Top = 3240 Width = 7695 Begin VB.TextBox txtUser Height = 285 Left = 1320 - TabIndex = 52 + TabIndex = 37 Text = "Thanh Tran" Top = 240 Width = 5055 @@ -455,7 +350,7 @@ Caption = "&Generate" Height = 255 Left = 6480 - TabIndex = 49 + TabIndex = 36 Top = 600 Width = 1095 End @@ -464,7 +359,7 @@ Height = 285 Left = 1320 Locked = -1 'True - TabIndex = 47 + TabIndex = 34 Top = 600 Width = 5055 End @@ -473,14 +368,14 @@ Enabled = 0 'False Height = 255 Left = 6480 - TabIndex = 10 + TabIndex = 5 Top = 960 Width = 1095 End Begin VB.TextBox txtLibKeyIn Height = 285 Left = 1320 - TabIndex = 9 + TabIndex = 4 Top = 960 Width = 5055 End @@ -488,7 +383,7 @@ Caption = "User Name:" Height = 255 Left = 120 - TabIndex = 53 + TabIndex = 38 Top = 240 Width = 1335 End @@ -496,7 +391,7 @@ Caption = "Request Code:" Height = 255 Left = 120 - TabIndex = 48 + TabIndex = 35 Top = 600 Width = 1335 End @@ -504,98 +399,47 @@ Caption = "Liberation Key:" Height = 255 Left = 120 - TabIndex = 8 + TabIndex = 3 Top = 960 Width = 1335 End End - Begin VB.ComboBox cmbLicClass - Height = 315 - ItemData = "frmMain.frx":02AC - Left = 1320 - List = "frmMain.frx":02BC - Style = 2 'Dropdown List - TabIndex = 4 - Top = 2610 - Width = 5055 - End - Begin VB.CommandButton cmdSoftwareCodeGen - Caption = "&Generate" - Height = 255 - Left = 6480 - TabIndex = 2 - ToolTipText = $"frmMain.frx":033F - Top = 1560 - Width = 1335 - End Begin VB.Label Label15 Caption = "Instructions:" Height = 495 - Left = 120 - TabIndex = 58 + Left = -74880 + TabIndex = 43 Top = 4440 Width = 1935 End Begin VB.Label Label14 Caption = "ActiveLock's Checksum:" Height = 375 - Left = 120 - TabIndex = 54 + Left = -74880 + TabIndex = 39 Top = 480 Width = 1215 End - Begin VB.Label lblDays - Caption = "days" - Height = 255 - Left = 2640 - TabIndex = 42 - Top = 2370 - Width = 1335 - End - Begin VB.Label lblExpiry - Caption = "Expires after:" - Height = 255 - Left = 120 - TabIndex = 41 - Top = 2325 - Width = 1335 - End Begin VB.Label Label10 Caption = " Version:" Height = 255 - Left = 120 - TabIndex = 39 + Left = -74880 + TabIndex = 33 Top = 1320 Width = 1335 End Begin VB.Label Label9 Caption = "Software Name:" Height = 255 - Left = 120 - TabIndex = 37 + Left = -74880 + TabIndex = 31 Top = 1080 Width = 1335 End - Begin VB.Label Label3 - Caption = "License Class:" - Height = 255 - Left = 120 - TabIndex = 6 - Top = 2610 - Width = 1335 - End - Begin VB.Label Label2 - Caption = "License Type:" - Height = 255 - Left = 120 - TabIndex = 5 - Top = 2040 - Width = 1335 - End Begin VB.Label Label1 Caption = " Code:" Height = 255 - Left = 120 + Left = -74880 TabIndex = 1 Top = 1560 Width = 1335 @@ -658,9 +502,11 @@ ' / MODULE CHANGE LOG / ' /////////////////////////////////////////////////////////////////////// ' -' 07.31.03 - th2tran - Now performing checksum on ActiveLock2.dll. +' 07.31.03 - th2tran - Now performing checksum on ActiveLock2.dll. ' 08.01.03 - wizzardme2000 - LockTypes other than MAC are now supported -' 08.03.03 - th2tran - Added SoftwareCode generator and usage instructions. +' 08.03.03 - th2tran - Added SoftwareCode generator and usage instructions. +' 09.14.03 - th2tran - Removed Key Generator functionality. This is now handled +' by ALUGEN. ' ' /////////////////////////////////////////////////////////////////////// ' / MODULE CODE BEGINS BELOW THIS LINE / @@ -673,55 +519,6 @@ Attribute ActiveLockEventSink.VB_VarHelpID = -1 -Private Sub cmdSoftwareCodeGen_Click() - Screen.MousePointer = vbHourglass - txtSoftwareCodePub = "" - txtSoftwareCodePriv = "" - Enabled = False - DoEvents - On Error GoTo Done - Dim Key As RSAKey - Dim progress As ProgressType - ' generate the key - modActiveLock.rsa_generate Key, 1024, AddressOf ProgressUpdate, VarPtr(progress) - ' extract private and public key blobs - Dim strBlob As String - Dim blobLen As Long - rsa_public_key_blob Key, vbNullString, blobLen - If blobLen > 0 Then - strBlob = String(blobLen, 0) - rsa_public_key_blob Key, strBlob, blobLen - Debug.Print "Public blob: " & strBlob - txtSoftwareCodePub = strBlob - End If - - modActiveLock.rsa_private_key_blob Key, vbNullString, blobLen - If blobLen > 0 Then - strBlob = String(blobLen, 0) - modActiveLock.rsa_private_key_blob Key, strBlob, blobLen - Debug.Print "Private blob: " & strBlob - txtSoftwareCodePriv = strBlob - End If - ' done with the key - throw it away - modActiveLock.rsa_freekey Key - - ' Test generated key for correctness by recreating it from the blobs - ' Note: - ' ==== - ' Due to an outstanding bug in ALCrypto.dll, sometimes this step will crash the app because - ' the generated keyset is bad. - ' The work-around for the time being is to keep regenerating the keyset until eventually - ' you'll get a valid keyset that no longer crashes. - Dim strData$: strData = "This is a test string to be encrypted." - modActiveLock.rsa_createkey txtSoftwareCodePub, Len(txtSoftwareCodePub), _ - txtSoftwareCodePriv, Len(txtSoftwareCodePriv), Key - ' It worked! We're all set to go. - modActiveLock.rsa_freekey Key -Done: - Screen.MousePointer = vbDefault - Enabled = True -End Sub - ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' ActiveLock Initialization ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' @@ -729,12 +526,17 @@ FunctionalitiesEnabled = False ' Disable functionalities by default ' Initialize AL Set MyActiveLock = ActiveLock2.NewInstance() + MyActiveLock.LockType = lockHD + ' 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. +' Bypass verification if DEBUG switch is set +#If AL_DEBUG <> 1 Then txtChecksum = modMain.VerifyActiveLockdll(New ActiveLock2.Globals) +#End If ' Initialize the keystore. We use a File keystore in this case. MyActiveLock.KeyStoreType = alsFile @@ -751,10 +553,9 @@ .TickerPlaySound = chkSound .TickerScroll = chkScroll End With - txtName = App.EXEName + txtName = "TestApp" '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 @@ -766,9 +567,6 @@ '* Don't Forget This!!!!!!!! * '****************************************************************** - cmbLicType = "Permanent" - cmbLicClass = "Class 4 - Lock To Hard Drive Serial" - ' Check registration status On Error GoTo NotRegistered MyActiveLock.Acquire @@ -794,138 +592,9 @@ ' 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 - -''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -' Key Generator Functionalities -''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -Private Sub cmbLicClass_Click() - If cmbLicClass = "Class 1 - Lock To MAC" Then - 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 - -Private Sub cmbLicType_Click() - With MyActiveLock - If cmbLicType = "Periodic" Then - .LicenseType = allicPeriodic - ElseIf cmbLicType = "Permanent" Then - .LicenseType = allicPermanent - ElseIf cmbLicType = "Time Locked" Then - .LicenseType = allicTimeLocked - Else - .LicenseType = allicNone - End If - ' enable the days edit box - If cmbLicType = "Periodic" Or cmbLicType = "Time Locked" Then - txtDays.Locked = False - txtDays.BackColor = &H80000005 - Else - txtDays.Locked = True - txtDays.BackColor = &H80000011 - End If - If cmbLicType = "Time Locked" Then - lblExpiry = "Expires on date:" - txtDays = Format$(Now() + 30, "YYYY/MM/DD") - lblDays = "YYYY/MM/DD" - Else - lblExpiry = "Expires after:" - txtDays = "30" - lblDays = "Day(s)" - End If - End With -End Sub - -'' -' Generate liberation key -Private Sub cmdKeyGen_Click() - ' Take request code and decrypt it. - Dim strReq As String - strReq = ActiveLock2.Base64Decode(txtReqCodeIn) - ' strReq now contains the {MAC + vbLf + User} string - Dim strLock$, strUser$ - GetLockAndUserFromRequestCode strReq, strLock, strUser - Dim strExpire$ - strExpire = GetExpirationDate() - - ' registration date - Dim strRegDate As String - strRegDate = Format(Now(), "yyyy/mm/dd") - Dim strEncrypted As String - ActiveLockEventSink_ValidateValue strRegDate, strEncrypted - ' hash it - strEncrypted = ActiveLock2.MD5Hash(strEncrypted) - - Dim Lic As ProductLicense - Set Lic = ActiveLock2.CreateProductLicense(txtName, txtSoftwareCodePub, _ - txtVersion, MyActiveLock.LockType, MyActiveLock.LicenseType, strUser, strExpire, , strRegDate, strEncrypted) - Dim strLic As String - ' encrypt Product license using the MAC - strLic = MyActiveLock.LockCode(Lic) - ' sign it - Dim strSig As String - strSig = ActiveLock2.RSASign(PUB_KEY, PRIV_KEY, strLic) - ' Create liberation key. This will be a base-64 encoded string of the whole license. - Dim strLicKey As String - strLicKey = ActiveLock2.Base64Encode(strSig) - ' update Lic with license key - Lic.LicenseKey = strLicKey - ' serialize it into a formatted string - Dim strLibKey As String - Lic.Save strLibKey - txtLibKey = strLibKey -End Sub - -Private Function GetExpirationDate() As String - If cmbLicType = "Time Locked" Then - GetExpirationDate = txtDays - Else - GetExpirationDate = Format$(Now + CInt(txtDays), "YYYY/MM/DD") - End If -End Function - -Private Sub GetLockAndUserFromRequestCode(ByVal strReq As String, strLock As String, strUser As String) - Dim Index%, i - - For i = 1 To Len(strReq) - If Mid(strReq, i, 1) = vbLf Then Index = i - Next i - - Index = InStr(1, strReq, vbLf) - - - If Index <= 0 Then Exit Sub - - strLock = Left(strReq, Index - 1) - strUser = Mid$(strReq, Index + 1) - strUser = TrimNulls(strUser) + Result = Value ' modMain.Encrypt(Value) 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 - arrBytes = StrConv(Str, vbFromUnicode) - Dim i% - For i = LBound(arrBytes) To UBound(arrBytes) - If arrBytes(i) = char Then - IndexOf = i - Exit Function - End If - Next - Exit Function -errHandler: - ' return -1 -End Function - ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Key Request and Registration Functionalities ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' @@ -944,9 +613,7 @@ Private Sub cmdRegister_Click() On Error GoTo errHandler ' Register this key - Dim Lic As New ActiveLock2.ProductLicense - Lic.Load txtLibKey - MyActiveLock.Register Lic + MyActiveLock.Register txtLibKeyIn MsgBox "Registration successful!" Exit Sub errHandler: @@ -1036,10 +703,6 @@ Private Sub txtName_Change() MyActiveLock.SoftwareName = txtName -End Sub - -Private Sub txtReqCodeIn_Change() - cmdKeyGen.Enabled = CBool(Trim$(txtReqCodeIn.Text) <> "") End Sub Private Sub txtSoftwareCodePub_Change() Index: modMain.bas =================================================================== RCS file: /cvsroot/activelock/activelock/examples/example1/modMain.bas,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- modMain.bas 16 Aug 2003 03:38:46 -0000 1.2 +++ modMain.bas 22 Sep 2003 03:05:01 -0000 1.3 @@ -35,7 +35,7 @@ ' between ActiveLock and the client application. ' ' @author th2tran -' @version 2.0.0 +' @version 2.0.2 ' @date 20030715 ' '* /////////////////////////////////////////////////////////////////////// @@ -52,8 +52,8 @@ ' 07.15.03 - th2tran - Created ' 08.15.03 - th2tran - Value() - Following vbclassicforever's suggestion: ' Compute the expected CRC instead leaving it as a plain -' value to make it more difficult to spot in a hex -' editor +' value to make it more difficult to spot in a hex editor. +' 09.21.03 - th2tran - Dumped PRIV_KEY. PRIV_KEY should only be accessible to ALUGEN. ' </pre> ' /////////////////////////////////////////////////////////////////////// @@ -265,31 +265,34 @@ ' !!!WARNING!!! ' It is alright to use these same keys for testing your application. But it is highly recommended ' 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==" -Public Function Encrypt(strData As String) As String - Dim Key As RSAKey - ' create the key from the key blobs - ' NOTE: I'm being lazy here. We can (and should) use a different keyset for data encryption. - ' PUB_KEY and PRIV_KEY should only used for license key signing and verification. - ' i.e. PRIV_KEY should only be accessible from the Key Generator and only PUB_KEY is - ' available in the deployed application. - ' Also, we can't encrypt using public key because public key is openly visible in the license - ' file and should only be used for verification, not encryption. - modActiveLock.rsa_createkey PUB_KEY, Len(PUB_KEY), PRIV_KEY, Len(PRIV_KEY), 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 - ' done with the key - throw it away - modActiveLock.rsa_freekey Key - - Dim strOut As String - strOut = Left$(strEnc, dLen) - Encrypt = strOut -End Function +'Public Const PRIV_KEY$ = "???" +Public Const PUB_KEY$ = "AAAAB3NzaC1yc2EAAAABJQAAAIBmyH+sZ9eXI33MbVFWR85fsHLXndX2WaNokSaqxYltluQx2sX4T81r7jazTFxcczllwuMEauhL1rTqXCma0uA6xAQGajRorXeLcrW5OHIut7+HprXy9MTUp0SwsVFJJjDaRmodPaCBTUPD006lG7LNN5/jO/Cj8dNf6lVHy+VnIQ==" + +'Commented out Encrypt() for now. Have to think about using some other means, +' because PRIV_KEY is no longer accessible to us. +'Public Function Encrypt(strData As String) As String +' Dim Key As RSAKey +' ' create the key from the key blobs +' ' NOTE: I'm being lazy here. We can (and should) use a different keyset for data encryption. +' ' PUB_KEY and PRIV_KEY should only used for license key signing and verification. +' ' i.e. PRIV_KEY should only be accessible from the Key Generator and only PUB_KEY is +' ' available in the deployed application. +' ' Also, we can't encrypt using public key because public key is openly visible in the license +' ' file and should only be used for verification, not encryption. +' modActiveLock.rsa_createkey PUB_KEY, Len(PUB_KEY), PRIV_KEY, Len(PRIV_KEY), 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 +' ' done with the key - throw it away +' modActiveLock.rsa_freekey Key +' +' Dim strOut As String +' strOut = Left$(strEnc, dLen) +' Encrypt = strOut +'End Function '' ' Verifies the checksum of the typelib containing the specified object. Index: frmMain.frx =================================================================== RCS file: /cvsroot/activelock/activelock/examples/example1/frmMain.frx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsX4jOWW and /tmp/cvsWvd9GJ differ |
From: Thanh H. T. <th...@us...> - 2003-09-22 02:53:54
|
Update of /cvsroot/activelock/alugen/app In directory sc8-pr-cvs1:/tmp/cvs-serv10097 Modified Files: ALUGEN.vbp frmMain.frm products.ini frmMain.frx Log Message: Finished first pass of implementation. ALUGEN is now able to create product codes and liberation keys. Index: ALUGEN.vbp =================================================================== RCS file: /cvsroot/activelock/alugen/app/ALUGEN.vbp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ALUGEN.vbp 24 Aug 2003 18:10:22 -0000 1.1 +++ ALUGEN.vbp 22 Sep 2003 02:53:49 -0000 1.2 @@ -1,6 +1,7 @@ Type=Exe -Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#stdole2.tlb#OLE Automation +Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\System32\stdole2.tlb#OLE Automation Reference=*\G{D073A961-5725-46E8-B51F-B76EB02685B5}#1.0#0#..\lib\alugen.dll#ActiveLock Universal Generator Library +Reference=*\G{C3B56087-6690-42ED-8914-633AA166AB41}#1.0#0#..\..\activelock\src\ActiveLock2.dll#ActiveLock2 Object={5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0; MSFLXGRD.OCX Object={BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0; TABCTL32.OCX Form=frmMain.frm @@ -17,8 +18,8 @@ CompatibleMode="1" MajorVer=2 MinorVer=0 -RevisionVer=1 -AutoIncrementVer=1 +RevisionVer=2 +AutoIncrementVer=0 ServerSupportFiles=0 VersionCompanyName="The ActiveLock Software Group" VersionLegalCopyright="Copyright © 2003" Index: frmMain.frm =================================================================== RCS file: /cvsroot/activelock/alugen/app/frmMain.frm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- frmMain.frm 24 Aug 2003 18:10:22 -0000 1.1 +++ frmMain.frm 22 Sep 2003 02:53:49 -0000 1.2 @@ -43,8 +43,11 @@ TabPicture(1) = "frmMain.frx":0CE6 Tab(1).ControlEnabled= 0 'False Tab(1).Control(0)= "cmbProds" + Tab(1).Control(0).Enabled= 0 'False Tab(1).Control(1)= "frmKeyGen" + Tab(1).Control(1).Enabled= 0 'False Tab(1).Control(2)= "Label8" + Tab(1).Control(2).Enabled= 0 'False Tab(1).ControlCount= 3 Begin VB.CommandButton cmdRemove Caption = "&Remove" @@ -69,35 +72,36 @@ TabIndex = 13 Top = 1080 Width = 8175 - Begin VB.TextBox txtDays - BackColor = &H8000000F& + Begin VB.ComboBox cmbLicClass Height = 315 + ItemData = "frmMain.frx":0D02 Left = 1320 - Locked = -1 'True - TabIndex = 19 - Text = "30" - Top = 285 - Width = 1215 + List = "frmMain.frx":0D12 + Style = 2 'Dropdown List + TabIndex = 17 + Top = 585 + Width = 5655 End Begin VB.ComboBox cmbLicType Height = 315 - ItemData = "frmMain.frx":0D02 + ItemData = "frmMain.frx":0D95 Left = 1320 - List = "frmMain.frx":0D0F + List = "frmMain.frx":0DA2 Style = 2 'Dropdown List TabIndex = 18 Top = 0 Width = 5655 End - Begin VB.ComboBox cmbLicClass + Begin VB.TextBox txtDays + Alignment = 1 'Right Justify + BackColor = &H8000000F& Height = 315 - ItemData = "frmMain.frx":0D35 Left = 1320 - List = "frmMain.frx":0D45 - Style = 2 'Dropdown List - TabIndex = 17 - Top = 585 - Width = 5655 + Locked = -1 'True + TabIndex = 19 + Text = "30" + Top = 285 + Width = 1215 End Begin VB.TextBox txtReqCodeIn Height = 315 @@ -169,7 +173,7 @@ Height = 255 Left = 2640 TabIndex = 20 - Top = 285 + Top = 315 Width = 1335 End End @@ -337,14 +341,14 @@ ' ALUGEN Executable Main Form ' ' @author th...@us... -' @version 2.0.0 +' @version 2.0.2 ' @date 20030815 ' '* /////////////////////////////////////////////////////////////////////// ' / MODULE TO DO LIST / ' /////////////////////////////////////////////////////////////////////// ' -' @todo Form_Activate() - load products from INI file +' @todo TODO1 ' ' @@ -353,7 +357,9 @@ ' /////////////////////////////////////////////////////////////////////// ' @history ' <pre> -' 08.15.03 - th2tran - Created +' 08.15.03 - th2tran - Created +' 09.21.03 - th2tran - Finished first pass of implementation. +' ALUGEN is now able to create product codes and liberation keys. ' ' </pre> @@ -361,7 +367,9 @@ ' / MODULE CODE BEGINS BELOW THIS LINE / ' /////////////////////////////////////////////////////////////////////// Option Explicit -Private GeneratorInstance As ALUGenLib.IALUGenerator +Private GeneratorInstance As ALUGENLib.IALUGenerator +Private fDisableNotifications As Boolean +Private ActiveLock As ActiveLock2.IActiveLock Private Sub gridProds_CellDataChanged(Row As Long, Col As Long, OldValue As Variant, NewValue As Variant) Dim nRow As Integer @@ -377,6 +385,53 @@ Debug.Print "gridProds_CellDataChanged" End Sub +Private Sub cmbLicClass_Click() + If cmbLicClass = "Class 1 - Lock To MAC" Then + ActiveLock.LockType = lockMAC + ElseIf cmbLicClass = "Class 2 - Lock To Windows Serial" Then + ActiveLock.LockType = lockWindows + ElseIf cmbLicClass = "Class 3 - Lock To Computer Name" Then + ActiveLock.LockType = lockComp + ElseIf cmbLicClass = "Class 4 - Lock To Hard Drive Serial" Then + ActiveLock.LockType = lockHD + End If +End Sub + +Private Sub cmbLicType_Click() + With ActiveLock + If cmbLicType = "Periodic" Then + .LicenseType = allicPeriodic + ElseIf cmbLicType = "Permanent" Then + .LicenseType = allicPermanent + ElseIf cmbLicType = "Time Locked" Then + .LicenseType = allicTimeLocked + Else + .LicenseType = allicNone + End If + ' enable the days edit box + If cmbLicType = "Periodic" Or cmbLicType = "Time Locked" Then + txtDays.Locked = False + txtDays.BackColor = &H80000005 + Else + txtDays.Locked = True + txtDays.BackColor = &H80000011 + End If + If cmbLicType = "Time Locked" Then + lblExpiry = "Expires on date:" + txtDays = Format$(Now() + 30, "YYYY/MM/DD") + lblDays = "YYYY/MM/DD" + Else + lblExpiry = "Expires after:" + txtDays = "30" + lblDays = "Day(s)" + End If + End With +End Sub + +Private Sub cmbProds_Click() + ' TODO +End Sub + Private Sub cmdAdd_Click() AddRow txtName, txtVer, txtCode1, txtCode2 cmdAdd.Enabled = False ' disallow repeated clicking of Add button @@ -386,8 +441,10 @@ Private Sub cmdCodeGen_Click() Screen.MousePointer = vbHourglass + fDisableNotifications = True txtCode1 = "" txtCode2 = "" + fDisableNotifications = False Enabled = False DoEvents On Error GoTo Done @@ -442,11 +499,15 @@ Dim strName$, strVer$ strName = Trim$(arrProdVer(0)) strVer = Trim$(arrProdVer(1)) + With ActiveLock + .SoftwareName = strName + .SoftwareVersion = strVer + End With Dim strExpire$ strExpire = GetExpirationDate() Dim strLibKey As String - strLibKey = GeneratorInstance.GenKey(strName, strVer, txtReqCodeIn, 0, strExpire) + strLibKey = GeneratorInstance.GenKey(ActiveLock, txtReqCodeIn, strExpire) txtLibKey = strLibKey End Sub @@ -472,13 +533,13 @@ SelStart = .RowSel SelEnd = .Row End If - Dim i% - For i = SelEnd To SelStart Step -1 - strName = .TextMatrix(i, 0) + Dim I% + For I = SelEnd To SelStart Step -1 + strName = .TextMatrix(I, 0) If txtName = strName Then fEnableAdd = True End If - RemoveRow i + RemoveRow I Next .RowSel = .Row ' negate current selections End With @@ -495,13 +556,16 @@ End Sub Private Sub Form_Activate() - Set GeneratorInstance = ALUGenLib.GeneratorInstance() - GeneratorInstance.StoragePath = App.Path & "\products.ini" - '@todo Populate Product List on Product Code Generator tab and Key Gen tab with product info from products.ini txtName.SetFocus End Sub Private Sub Form_Load() + ' Initialize AL + Set ActiveLock = ActiveLock2.NewInstance() + ' Initialize Generator + Set GeneratorInstance = ALUGENLib.GeneratorInstance() + GeneratorInstance.StoragePath = App.Path & "\products.ini" + ' Initialize GUI InitUI End Sub @@ -520,15 +584,20 @@ gridProds.BackColorSel = &H8000000D ' navy blue gridProds.ForeColorSel = &H80000005 ' white End If - + fDisableNotifications = True txtName = gridProds.TextMatrix(gridProds.Row, 0) txtVer = gridProds.TextMatrix(gridProds.Row, 1) txtCode1 = gridProds.TextMatrix(gridProds.Row, 2) txtCode2 = gridProds.TextMatrix(gridProds.Row, 3) cmdRemove.Enabled = True + fDisableNotifications = False End Sub -Private Sub AddRow(Name As String, Ver As String, Code1 As String, Code2 As String) +'' +' Add a Product Row to the GUI. +' If fUpdateStore is True, then product info is also saved to the store. +' +Private Sub AddRow(Name As String, Ver As String, Code1 As String, Code2 As String, Optional fUpdateStore As Boolean = True) ' Update the view With gridProds .Rows = .Rows + 1 @@ -542,9 +611,11 @@ ' .SetFocus ' show selected row End With ' Call ALUGENLib.IALUGenerator to add product - Dim ProdInfo As ALUGenLib.ProductInfo - Set ProdInfo = ALUGenLib.CreateProductInfo(Name, Ver, Code1, Code2) - Call GeneratorInstance.SaveProduct(ProdInfo) + Dim ProdInfo As ALUGENLib.ProductInfo + Set ProdInfo = ALUGENLib.CreateProductInfo(Name, Ver, Code1, Code2) + If fUpdateStore Then + Call GeneratorInstance.SaveProduct(ProdInfo) + End If cmbProds.AddItem Name & " - " & Ver cmdRemove.Enabled = True End Sub @@ -572,7 +643,7 @@ .TextMatrix(Row, 3) = Code2 End With ' update the store file - GeneratorInstance.SaveProduct ALUGenLib.CreateProductInfo(strName, strVer, Code1, Code2) + GeneratorInstance.SaveProduct ALUGENLib.CreateProductInfo(strName, strVer, Code1, Code2) End Sub Private Sub gridProds_RowColChange() @@ -587,7 +658,9 @@ If txtReqCodeIn = "" Then cmdKeyGen.Enabled = False Else - cmdKeyGen.Enabled = True + If cmbProds <> "" Then + cmdKeyGen.Enabled = True + End If End If End Sub @@ -599,6 +672,7 @@ Private Sub txtCode1_Change() UpdateAddButtonStatus + If fDisableNotifications Then Exit Sub With gridProds If .Rows = 1 Then Exit Sub ' update current row @@ -607,6 +681,7 @@ End Sub Private Sub txtCode2_Change() + If fDisableNotifications Then Exit Sub With gridProds If .Rows = 1 Then Exit Sub ' update current row @@ -638,10 +713,10 @@ ' Private Function CheckDuplicate(Name As String, Ver As String) As Boolean CheckDuplicate = False - Dim i% - For i = 0 To gridProds.Rows - 1 - If gridProds.TextMatrix(i, 0) = Name Then - If gridProds.TextMatrix(i, 1) = Ver Then + Dim I% + For I = 0 To gridProds.Rows - 1 + If gridProds.TextMatrix(I, 0) = Name Then + If gridProds.TextMatrix(I, 1) = Ver Then CheckDuplicate = True Exit Function End If @@ -653,6 +728,9 @@ ' Initialize the GUI with the proper grid headings and alignments ' Private Sub InitUI() + ' Init Default license class + cmbLicType = "Time Locked" + cmbLicClass = "Class 1 - Lock To MAC" With gridProds .Clear .Rows = 1 @@ -662,5 +740,31 @@ .ColAlignment(2) = flexAlignLeftCenter .ColAlignment(3) = flexAlignLeftCenter End With + ' Populate Product List on Product Code Generator tab + ' and Key Gen tab with product info from products.ini + Dim arrProdInfos() As ProductInfo + arrProdInfos = GeneratorInstance.RetrieveProducts() + If IsArrayEmpty(arrProdInfos) Then Exit Sub + + Dim I% + For I = LBound(arrProdInfos) To UBound(arrProdInfos) + PopulateUI arrProdInfos(I) + Next gridProds_Click +End Sub +Private Function IsArrayEmpty(arrVar As Variant) As Boolean + IsArrayEmpty = True + On Error GoTo ErrHandler + Dim lb As Long + lb = UBound(arrVar, 1) ' this will raise an error if the array is empty + IsArrayEmpty = False ' If we managed to get to here, then it's not empty + Exit Function +ErrHandler: + ' return false +End Function + +Private Sub PopulateUI(ProdInfo As ALUGENLib.ProductInfo) + With ProdInfo + AddRow .Name, .Version, .Code1, .Code2, False + End With End Sub Index: products.ini =================================================================== RCS file: /cvsroot/activelock/alugen/app/products.ini,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- products.ini 24 Aug 2003 18:10:22 -0000 1.1 +++ products.ini 22 Sep 2003 02:53:49 -0000 1.2 @@ -1,8 +1,5 @@ [TestApp 1.0] +Name=TestApp Version=1.0 -Code1=AAAAB3NzaC1yc2EAAAABJQAAAIByliy2wJR4Rx10Vpm8OinIqKRSnn3naIBKeVvju69tSV+AF4KEHlUyeM+3JnTW5qnmQRSQ6KYaVB8UOm78H6a1VqGnV2juJkYH078A8IA3kleiEmb6OsDnNXaEUodu41IItQOWF2KeoSwc91kYXhJxZzBeDzkwMn+sGBFGXuN39w== -Code2=AAAAgGABSA69BsWjXd4DXjXrisq2zt1wCJ9Jt5hX113wRt8GH5TVbVnv5oQ7tPNlaM+6Vv8vm5wBMTinWE834HJftS77VJ4ve1J0S4506KDQsOqT7NhFW5ZX332mHZ3s5J5KvdpYOj2iivd1ujjbYA0qan6Rubw32iAVXnIBlBuipC0tAAAAQQDjjJkJnqOxUztx3wAyMt6weVe6xS2vlgxqNxG0Bl1yRD+c2PqFbiKAB34/HlqtPGaSDLSCnz2uqkcFAeYzaUDBAAAAQQCA6d3jkfBNPceDwheDJ5u9sxaqAu/PtMCyZmvOFVzFQ/YJs4vP88hjFM54lozx0s6a0l2MAPWDGljfoKqKY663AAAAQQCYsD6OnR6zJ1hWNCjJ3jlf3beBkf2Szvre5WlKKmUPPLv1bZnwldlAVOttq9F1nORqMpNQQcwZuv53Up/LDa/F -[a 1.0] -Version=1.0 -Code1=AAAAB3NzaC1yc2EAAAABJQAAAIB+RLq5dEDFYxGUObGQOfuIoIuv0lp99jGQ2KsxqTgZ/QAu24cB6XsseQACGiXnKSjFIYJyYfFMYAYDn8kGIpNMEaWZcVMp3tVQZEchENQdgHVG6R8JlB7x3qIp4y/F/mudSHC7Mum4scLnR+QfuiWxyyNQJCB8ruK5ptZ5s5rIvQ== -Code2=AAAAgDMwnrnjBYB0RWWa2UhO25hBFgkCQFyUPZuWG+OzThhfpiDVicKBP8Xr3Wii0RiGTsx1XmW5APVzCVtqSpPI0+3TDqq33UNLewMXAEsQx5k28bhcoD99xlnhyWCemoHH8/tCr/8GGy4kFkv3cOHlJPMKz85IlQgIiRgeJ5wLbD1BAAAAQQDdgnwhktJnBOtPrh064Kp8I+CRkegL4F6sqzWl2j7ydQrUx1g05qklhqLnSChKWprFcbhpTdbuKIA3I58zeoSLAAAAQQCR7d6bSToB5TtTVAZoS198yfTqimLJd3E4OWxPtkbri681kNzd4iZESYj+QUGyCYxRbL0HyW/NznVplWqoN2jXAAAAQQDQHxsUhcRLmxm0wOZAlRqmzwaLaqoC6zvAj+nLuYCFFolb7+EjOvEbpuDN0UC3Jh/od4wiOutK3lhir/mxMTnn +Code1=AAAAB3NzaC1yc2EAAAABJQAAAIBmyH+sZ9eXI33MbVFWR85fsHLXndX2WaNokSaqxYltluQx2sX4T81r7jazTFxcczllwuMEauhL1rTqXCma0uA6xAQGajRorXeLcrW5OHIut7+HprXy9MTUp0SwsVFJJjDaRmodPaCBTUPD006lG7LNN5/jO/Cj8dNf6lVHy+VnIQ== +Code2=AAAAgGE6M5U/omxf190NdnQ2Fj7XV+C35hKMJPQ2RyvrSqXvmZbxitYh+atJHvyiLdrpiVJsPoejZh45zbsY6RXqEl/k1Hm1bT1IggEgHCb7oSnNoiiRLT+b9Y+ffKbbURevs2bbLIcG/yfEuamRlHYj1jIwF0OFEsO7XfP4M8hruZ8JAAAAQLiaDLpPqlhoNTlTMps3k8/Cbl3gJqICKzZIITO268ZRo0FK+5r+9QTupf+ZOXR2LbIincI/Wg+3cYOMsb992g8AAABAjolbxDa/YC4h1ZyJShPjviXJ0+8bXW6clS+klcD7MRo/UJ+aNNWkEfc+rtalnpwEENJkf0z+n7FLk5kokzWbzwAAAEBohtMIkBT9z5BB/HhS2LhJJUqaD5F1fHtIZRZxQExTYvNdFG8sT0ApP/BY8fCfT7JavHwWDSM/inUvOFRGRVMG Index: frmMain.frx =================================================================== RCS file: /cvsroot/activelock/alugen/app/frmMain.frx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvskWQCUh and /tmp/cvsIBMgBp differ |
From: Thanh H. T. <th...@us...> - 2003-09-22 02:46:29
|
Update of /cvsroot/activelock/alugen/lib In directory sc8-pr-cvs1:/tmp/cvs-serv8615 Modified Files: ALUGENLib.vbp Generator.cls IALUGenerator.cls ProductInfo.cls alugen.dll Log Message: ALUGENLib is now able to generate a valid license key. Limited testing has been done; will do more when I have more free time. Index: ALUGENLib.vbp =================================================================== RCS file: /cvsroot/activelock/alugen/lib/ALUGENLib.vbp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ALUGENLib.vbp 24 Aug 2003 18:06:36 -0000 1.1 +++ ALUGENLib.vbp 22 Sep 2003 02:46:02 -0000 1.2 @@ -20,7 +20,7 @@ VersionCompatible32="1" MajorVer=2 MinorVer=0 -RevisionVer=1 +RevisionVer=2 AutoIncrementVer=0 ServerSupportFiles=0 VersionCompanyName="The ActiveLock Software Group" Index: Generator.cls =================================================================== RCS file: /cvsroot/activelock/alugen/lib/Generator.cls,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Generator.cls 24 Aug 2003 18:06:36 -0000 1.1 +++ Generator.cls 22 Sep 2003 02:46:02 -0000 1.2 @@ -46,7 +46,7 @@ ' This is a concrete implementation of the IALUGenerator interface. ' ' @author th...@us... -' @version 2.0.0 +' @version 2.0.2 ' @date 20030815 ' '* /////////////////////////////////////////////////////////////////////// @@ -61,7 +61,10 @@ ' /////////////////////////////////////////////////////////////////////// ' @history ' <pre> -' 08.15.03 - th2tran - Created +' 08.15.03 - th2tran - Created +' 09.21.03 - th2tran - Implemented IALUGenerator_RetrieveProduct() +' - Finished implementing IALUGenerator_GenKey() +' - Dumped ActiveLockEventNotifier. Don't neeed it here. ' ' </pre> @@ -69,18 +72,11 @@ ' / MODULE CODE BEGINS BELOW THIS LINE / ' /////////////////////////////////////////////////////////////////////// Option Explicit +Option Base 0 Implements IALUGenerator Private MyActiveLock As ActiveLock2.IActiveLock Private MyIniFile As New ActiveLockUtil.INIFile -Private WithEvents ActiveLockEventSink As ActiveLockEventNotifier -Attribute ActiveLockEventSink.VB_VarHelpID = -1 - -Private Sub ActiveLockEventSink_ValidateValue(ByVal Value As String, Result As String) - '@todo Encrypt Value using the private key of the product specified in MyActiveLock's IActiveLock_SoftwareName and IActiveLock_SoftwareVersion - ' By now, MyActiveLock is currently set with a current ProductName and ProductVer - ' We need to retrieve the private key for it from MyIniFile and use that key to encrypt -End Sub '' ' Returns IActiveLock interface @@ -93,13 +89,20 @@ Private Sub Class_Initialize() ' Initialize AL Set MyActiveLock = ActiveLock2.NewInstance() - ' Obtain the EventNotifier so that we can receive notifications from AL. - Set ActiveLockEventSink = MyActiveLock.EventNotifier End Sub -Private Function IALUGenerator_RetrieveProducts() As ProductInfo() - '@todo Retrieve all product information from INI. Return as an array. -End Function +'' +' Loads Product Info from the specified INI section. +' +Private Sub LoadProdInfo(Section As String, ProdInfo As ProductInfo) + With MyIniFile + .Section = Section + ProdInfo.Name = .Values("Name") + ProdInfo.Version = .Values("Version") + ProdInfo.Code1 = .Values("Code1") + ProdInfo.Code2 = .Values("Code2") + End With +End Sub ''' ' IALUGenerator Interface implementations @@ -108,12 +111,28 @@ With MyIniFile ' Section name has to contain ProdName and ProdVer in order to be unique .Section = ProdInfo.Name & " " & ProdInfo.Version + .Values("Name") = ProdInfo.Name .Values("Version") = ProdInfo.Version .Values("Code1") = ProdInfo.Code1 '@todo Encrypt code1 and code2, possibly using something as simple as modCrypto.bas .Values("Code2") = ProdInfo.Code2 End With End Sub +Private Function IALUGenerator_RetrieveProducts() As ProductInfo() + ' Retrieve all product information from INI. Return as an array. + Dim arrProdInfos() As ProductInfo + Dim Count%: Count = 0 + Dim iniCount% + Dim arrSections() As String + iniCount = MyIniFile.EnumSections(arrSections) + For Count = 0 To iniCount - 1 + ReDim Preserve arrProdInfos(Count) + Set arrProdInfos(Count) = New ProductInfo + LoadProdInfo arrSections(Count), arrProdInfos(Count) + Next + IALUGenerator_RetrieveProducts = arrProdInfos +End Function + Private Function IALUGenerator_RetrieveProduct(ByVal Name As String, ByVal Ver As String) As ProductInfo '@todo Error Handling - Need to return Nothing if store file doesn't contain the product Dim ProdInfo As New ProductInfo @@ -136,7 +155,7 @@ MyIniFile.File = RHS End Property -Private Function IALUGenerator_GenKey(ByVal Name As String, ByVal Ver As String, ByVal ReqCode As String, LicType As Long, ExpireDate As String) As String +Private Function IALUGenerator_GenKey(ActiveLock As ActiveLock2.IActiveLock, ByVal ReqCode As String, ExpireDate As String) As String ' Take request code and decrypt it. Dim strReq As String strReq = ActiveLock2.Base64Decode(ReqCode) @@ -148,31 +167,49 @@ Dim strRegDate As String strRegDate = Format(Now(), "yyyy/mm/dd") Dim strEncrypted As String - ActiveLockEventSink_ValidateValue strRegDate, strEncrypted + ' @todo Rethink this bit about encrypting the dates. + ' We need to keep in mind that the app does not have access to the private key, so and any decryption that requires private key + ' would not be possible. + ' Perhaps instead of encrypting, we could do MD5 hash of (regdate+lockcode)? + 'ActiveLockEventSink_ValidateValue strRegDate, strEncrypted ' hash it - strEncrypted = ActiveLock2.MD5Hash(strEncrypted) + 'strEncrypted = ActiveLock2.MD5Hash(strEncrypted) + strEncrypted = strRegDate ' get software codes Dim ProdInfo As ProductInfo - Set ProdInfo = IALUGenerator_RetrieveProduct(Name, Ver) + Set ProdInfo = IALUGenerator_RetrieveProduct(ActiveLock.SoftwareName, ActiveLock.SoftwareVersion) '@todo Check for "ProdInfo Is Nothing" and handle appropriately Dim Lic As ProductLicense - Set Lic = ActiveLock2.CreateProductLicense(Name, ProdInfo.Code1, _ - Ver, MyActiveLock.LockType, MyActiveLock.LicenseType, strUser, ExpireDate, , strRegDate, strEncrypted) + With ActiveLock + Set Lic = ActiveLock2.CreateProductLicense(ProdInfo.Name, ProdInfo.Code1, _ + ProdInfo.Version, .LockType, .LicenseType, strUser, ExpireDate, , strRegDate, strEncrypted) + End With Dim strLic As String ' encrypt Product license using the MAC - strLic = MyActiveLock.LockCode(Lic) + strLic = MyActiveLock.LockCode(Lic) & vbLf & strLock +Debug.Print "strLic: " & vbCrLf & strLic ' sign it Dim strSig As String strSig = ActiveLock2.RSASign(ProdInfo.Code1, ProdInfo.Code2, strLic) + ' Create liberation key. This will be a base-64 encoded string of the whole license. Dim strLicKey As String strLicKey = ActiveLock2.Base64Encode(strSig) ' update Lic with license key Lic.LicenseKey = strLicKey - ' serialize it into a formatted string +' Print some info for debugging purposes +Debug.Print "Code1: " & ProdInfo.Code1 +Debug.Print "Lic: " & strLic +Debug.Print "Lic hash: " & ActiveLock2.MD5Hash(strLic) +Debug.Print "LicKey: " & strLicKey +Debug.Print "Sig: " & strSig +Debug.Print "Verify: " & ActiveLock2.RSAVerify(ProdInfo.Code1, strLic, ActiveLock2.Base64Decode(strLicKey)) +Debug.Print "====================================================" + + ' Serialize it into a formatted string Dim strLibKey As String Lic.Save strLibKey IALUGenerator_GenKey = strLibKey Index: IALUGenerator.cls =================================================================== RCS file: /cvsroot/activelock/alugen/lib/IALUGenerator.cls,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- IALUGenerator.cls 24 Aug 2003 18:06:36 -0000 1.1 +++ IALUGenerator.cls 22 Sep 2003 02:46:02 -0000 1.2 @@ -46,7 +46,7 @@ ' Interface for the ActiveLock Universal Generator (ALUGEN) ' ' @author th...@us... -' @version 2.0.0 +' @version 2.0.2 ' @date 20030815 ' '* /////////////////////////////////////////////////////////////////////// @@ -63,6 +63,10 @@ ' @history ' <pre> ' 08.15.03 - th2tran - Created +' 09.21.03 - th2tran - Changed GenKey() interface signature from +' GenKey(ByVal Name As String, ByVal Ver As String, ByVal ReqCode As String, LicType As Long, ExpireDate As String) +' to +' GenKey(objActiveLock As IActiveLock, ByVal ReqCode As String, ExpireDate As String) ' ' </pre> @@ -116,12 +120,10 @@ '' ' Generates liberation key for the specified product. ' -' @param Name Product Name -' @param Ver Product Version -' @param ReqCode Key Request Code -' @param LicType License Type -' @param ExpDate Expiration Date +' @param objActiveLock ActiveLock object. Needed for software name, version, code, etc... +' @param ReqCode Key Request Code +' @param ExpireDate Expiration Date ' -Public Function GenKey(ByVal Name As String, ByVal Ver As String, ByVal ReqCode As String, LicType As Long, ExpireDate As String) As String +Public Function GenKey(objActiveLock As IActiveLock, ByVal ReqCode As String, ExpireDate As String) As String End Function Index: ProductInfo.cls =================================================================== RCS file: /cvsroot/activelock/alugen/lib/ProductInfo.cls,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ProductInfo.cls 24 Aug 2003 18:06:36 -0000 1.1 +++ ProductInfo.cls 22 Sep 2003 02:46:02 -0000 1.2 @@ -46,7 +46,7 @@ ' This class encapsulates information about a product maintained by ALUGEN. ' ' @author th...@us... -' @version 2.0.0 +' @version 2.0.2 ' @date 20030815 ' '* /////////////////////////////////////////////////////////////////////// @@ -62,6 +62,8 @@ ' @history ' <pre> ' 08.15.03 - th2tran - Created +' 09.21.03 - th2tran - Fixed bug: Name() property wasn't implemented. +' Originally, the methods were there but had no code. ' ' </pre> @@ -79,10 +81,10 @@ ' Product Name ' Public Property Get Name() As String - + Name = mstrName End Property Friend Property Let Name(ByVal sName As String) - + mstrName = sName End Property '' Index: alugen.dll =================================================================== RCS file: /cvsroot/activelock/alugen/lib/alugen.dll,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsOVsCkV and /tmp/cvsM33SxI differ |
From: Thanh H. T. <th...@us...> - 2003-09-22 02:14:18
|
Update of /cvsroot/activelock/activelock/src In directory sc8-pr-cvs1:/tmp/cvs-serv2628 Modified Files: ActiveLock2.vbp Log Message: - Rev'd version to 2.0.2 - Added conditional compilation flag for easy debugging. Need to remember to take this flag off for the release build. Index: ActiveLock2.vbp =================================================================== RCS file: /cvsroot/activelock/activelock/src/ActiveLock2.vbp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ActiveLock2.vbp 7 Aug 2003 17:30:59 -0000 1.1 +++ ActiveLock2.vbp 22 Sep 2003 02:14:14 -0000 1.2 @@ -20,7 +20,7 @@ Module=modWindowsSerial; modWindowsSerial.bas Module=modComputerName; modComputerName.bas Startup="(None)" -HelpFile="" +HelpFile="ActiveLock2.chm" Title="ActiveLock2" ExeName32="ActiveLock2.dll" Command32="" @@ -31,12 +31,13 @@ VersionCompatible32="1" MajorVer=2 MinorVer=0 -RevisionVer=0 +RevisionVer=2 AutoIncrementVer=0 ServerSupportFiles=0 VersionCompanyName="The ActiveLock Software Group" VersionLegalCopyright="Copyright © 2003" VersionProductName="ActiveLock" +CondComp="AL_DEBUG = 1" CompilationType=0 OptimizationType=0 FavorPentiumPro(tm)=0 |
From: Thanh H. T. <th...@us...> - 2003-09-22 02:11:25
|
Update of /cvsroot/activelock/activelock/src In directory sc8-pr-cvs1:/tmp/cvs-serv2007 Modified Files: ActiveLock.cls IActiveLock.cls ActiveLock2.dll Log Message: Required Changes to support ALUGEN. Index: ActiveLock.cls =================================================================== RCS file: /cvsroot/activelock/activelock/src/ActiveLock.cls,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ActiveLock.cls 7 Aug 2003 17:30:59 -0000 1.1 +++ ActiveLock.cls 22 Sep 2003 02:11:21 -0000 1.2 @@ -69,6 +69,9 @@ ' 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. +' 08.21.03 - th2tran - Added #If directive in IActiveLock_Init() to bypass dll authentication when +' running from inside VB. This makes debugging a bit easier. +' - Refactored IActiveLock_LockCode() ' </pre> ' /////////////////////////////////////////////////////////////////////// @@ -108,14 +111,19 @@ End Property Private Sub IActiveLock_Init(Arg1 As Variant, ParamArray OtherArgs() As Variant) +' If running in Debug mode, don't bother with dll authentication +#If AL_DEBUG = 1 Then + GoTo Done +#End If ' Checksum ALCrypto.dll - Const ALCRYPTO_MD5$ = "e30f9189d9feb4eb222386c7c294f45e" + Const ALCRYPTO_MD5$ = "67874c0aabab26ec19f5a2cad84595ef" 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 +Done: mfInit = True End Sub @@ -158,9 +166,21 @@ strPubKey = mSoftwareCode Dim strSig As String Dim strLic As String + Dim strLicKey As String + strLic = IActiveLock_LockCode(Lic) + strLicKey = Lic.LicenseKey + ' decode the license key - strSig = MyGlobals.Base64Decode(Lic.LicenseKey) + strSig = MyGlobals.Base64Decode(strLicKey) +' Print out some info for debugging purposes +Debug.Print "Code1: " & strPubKey +Debug.Print "Lic: " & strLic +Debug.Print "Lic hash: " & MyGlobals.MD5Hash(strLic) +Debug.Print "LicKey: " & strLicKey +Debug.Print "Sig: " & strSig +Debug.Print "Verify: " & MyGlobals.RSAVerify(strPubKey, strLic, strSig) +Debug.Print "====================================================" ' validate the key Dim rc& rc = MyGlobals.RSAVerify(strPubKey, strLic, strSig) @@ -269,7 +289,10 @@ End Property -Private Sub IActiveLock_Register(Lic As ProductLicense) +Private Sub IActiveLock_Register(ByVal LibKey As String) + Dim Lic As New ActiveLock2.ProductLicense + Lic.Load LibKey + ' Validate that the license key. ' - registered user ' - expiry date @@ -309,26 +332,36 @@ Dim strLock As String If (mLockTypes And lockMAC) = lockMAC Then - strLock = strLock & vbLf & modMACAddress.GetMACAddress() + AppendLockString strLock, modMACAddress.GetMACAddress() End If If mLockTypes And lockComp Then - strLock = strLock & vbLf & modComputerName.GetComputerName() + AppendLockString strLock, modComputerName.GetComputerName() End If If mLockTypes And lockHD Then - strLock = strLock & vbLf & modHDSerial.GetHDSerial() + AppendLockString strLock, modHDSerial.GetHDSerial() End If If mLockTypes And lockWindows Then - strLock = strLock & vbLf & modWindowsSerial.GetWindowsSerial() + AppendLockString strLock, modWindowsSerial.GetWindowsSerial() End If If Left(strLock, 1) = vbLf Then strLock = Mid(strLock, 2) If Lic Is Nothing Then IActiveLock_LockCode = strLock + ElseIf strLock <> "" Then + IActiveLock_LockCode = Lic.ToString() & vbLf & strLock Else - IActiveLock_LockCode = Lic.ToString() & vbCrLf & strLock + IActiveLock_LockCode = Lic.ToString() End If End Function + +Private Sub AppendLockString(ByRef strLock As String, ByVal NewSubString As String) + If strLock = "" Then + strLock = NewSubString + Else + strLock = strLock & vbLf & NewSubString + End If +End Sub Private Property Let IActiveLock_SoftwareVersion(RHS As String) mSoftwareVer = RHS Index: IActiveLock.cls =================================================================== RCS file: /cvsroot/activelock/activelock/src/IActiveLock.cls,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- IActiveLock.cls 7 Aug 2003 17:30:59 -0000 1.1 +++ IActiveLock.cls 22 Sep 2003 02:11:21 -0000 1.2 @@ -263,6 +263,7 @@ ' 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. +' 09.21.03 - th2tran - Changed Register(Lic As ProductLicense) subroutine to Register(ByVal LibKey As String) ' ' </pre> @@ -428,8 +429,8 @@ '' ' Registers the following product license. -' @param Lic Product License with which to register. -Public Sub Register(Lic As ProductLicense) +' @param LibKey Liberation Key. +Public Sub Register(ByVal LibKey As String) End Sub Index: ActiveLock2.dll =================================================================== RCS file: /cvsroot/activelock/activelock/src/ActiveLock2.dll,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsW8CGfM and /tmp/cvsMtQnZq differ |
From: Thanh H. T. <th...@us...> - 2003-09-18 03:48:46
|
Update of /cvsroot/activelock/activelock/src In directory sc8-pr-cvs1:/tmp/cvs-serv21419 Modified Files: ALCrypto.dll Log Message: Fixed bug in byte count calculation for key blob generation that resulted in crashing when the blobs are used to recreate the key Index: ALCrypto.dll =================================================================== RCS file: /cvsroot/activelock/activelock/src/ALCrypto.dll,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvslQmsJl and /tmp/cvsm3yuVw differ |
From: Thanh H. T. <th...@us...> - 2003-09-18 03:47:46
|
Update of /cvsroot/activelock/alcrypto In directory sc8-pr-cvs1:/tmp/cvs-serv21323 Modified Files: Version.rc Log Message: Bumped version up to 2.0.2 for Alpha 2. Index: Version.rc =================================================================== RCS file: /cvsroot/activelock/alcrypto/Version.rc,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Version.rc 7 Aug 2003 17:30:32 -0000 1.1 +++ Version.rc 18 Sep 2003 03:47:42 -0000 1.2 @@ -28,8 +28,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,1,0,0 - PRODUCTVERSION 2,0,0,0 + FILEVERSION 2,0,2,0 + PRODUCTVERSION 2,0,2,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x21L @@ -54,8 +54,8 @@ VALUE "OriginalFilename", "ALCrypto.dll\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "ActiveLock\0" - VALUE "ProductVersion", "2.0.0\0" - VALUE "SpecialBuild", "alpha1\0" + VALUE "ProductVersion", "2.0.2\0" + VALUE "SpecialBuild", "alpha2\0" END END BLOCK "VarFileInfo" @@ -73,18 +73,18 @@ // TEXTINCLUDE // -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE DISCARDABLE BEGIN "resource.h\0" END -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE DISCARDABLE BEGIN "#include ""afxres.h""\r\n" "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE DISCARDABLE BEGIN "\r\n" "\0" |
From: Thanh H. T. <th...@us...> - 2003-09-18 03:47:05
|
Update of /cvsroot/activelock/alcrypto In directory sc8-pr-cvs1:/tmp/cvs-serv21234 Modified Files: RSA.C Log Message: Fixed bug in byte count calculation for key blob generation that resulted in crashing when the blobs are used to recreate the key Index: RSA.C =================================================================== RCS file: /cvsroot/activelock/alcrypto/RSA.C,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- RSA.C 7 Aug 2003 17:30:32 -0000 1.1 +++ RSA.C 18 Sep 2003 03:46:59 -0000 1.2 @@ -32,30 +32,30 @@ * PuTTY License * ============= * - * PuTTY is copyright 1997-2001 Simon Tatham. + * PuTTY is copyright 1997-2001 Simon Tatham. * - * Portions copyright Robert de Bath, Joris van Rantwijk, Delian - * Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry, - * Justin Bradford, and CORE SDI S.A. + * Portions copyright Robert de Bath, Joris van Rantwijk, Delian + * Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry, + * Justin Bradford, and CORE SDI S.A. * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation files - * (the "Software"), to deal in the Software without restriction, - * including without limitation the rights to use, copy, modify, merge, - * publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation files + * (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE - * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF - * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE + * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ @@ -71,9 +71,11 @@ * Change Log * ========== * - * Date (MM/DD/YY) Author Description + * Date (MM/DD/YY) Author Description * --------------- ----------- -------------------------------------------------------------- - * 07/27/03 th2tran Adapted from PuTTY project for used by the ActiveLock project. + * 07/27/03 th2tran Adapted from PuTTY project for used by the ActiveLock project. + * 09/14/03 th2tran Fixed bug in byte count calculation for key blob generation that + * resulted in crashing when the blobs are used to recreate the key. * ***********************************************************************************************/ @@ -105,17 +107,17 @@ (cp)[3] = (unsigned char)(value); } int makekey(unsigned char *data, struct RSAKey *result, - unsigned char **keystr, int order) + unsigned char **keystr, int order) { unsigned char *p = data; int i; if (result) { - result->bits = 0; - for (i = 0; i < 4; i++) - result->bits = (result->bits << 8) + *p++; + result->bits = 0; + for (i = 0; i < 4; i++) + result->bits = (result->bits << 8) + *p++; } else - p += 4; + p += 4; /* * order=0 means exponent then modulus (the keys sent by the @@ -124,14 +126,14 @@ */ if (order == 0) - p += ssh1_read_bignum(p, result ? &result->exponent : NULL); + p += ssh1_read_bignum(p, result ? &result->exponent : NULL); if (result) - result->bytes = (((p[0] << 8) + p[1]) + 7) / 8; + result->bytes = (((p[0] << 8) + p[1]) + 7) / 8; if (keystr) - *keystr = p + 2; + *keystr = p + 2; p += ssh1_read_bignum(p, result ? &result->modulus : NULL); if (order == 1) - p += ssh1_read_bignum(p, result ? &result->exponent : NULL); + p += ssh1_read_bignum(p, result ? &result->exponent : NULL); return p - data; } @@ -152,9 +154,9 @@ data[1] = 2; for (i = 2; i < key->bytes - length - 1; i++) { - do { - data[i] = random_byte(); - } while (data[i] == 0); + do { + data[i] = random_byte(); + } while (data[i] == 0); } */ /* data[key->bytes - *length - 1] = '\0'; */ @@ -164,11 +166,11 @@ #ifdef _DEBUG diagbn("un-encrypted bn: ", b1); #endif - if (type == 0) - /* public encrypt */ - b2 = modpow(b1, key->exponent, key->modulus); - else /* private encrypt */ - b2 = modpow(b1, key->private_exponent, key->modulus); + if (type == 0) + /* public encrypt */ + b2 = modpow(b1, key->exponent, key->modulus); + else /* private encrypt */ + b2 = modpow(b1, key->private_exponent, key->modulus); #ifdef _DEBUG diagbn("encrypted bn: ", b2); @@ -177,11 +179,11 @@ p = data; for (i = key->bytes; i--;) { - *p++ = bignum_byte(b2, i); + *p++ = bignum_byte(b2, i); } - /* calculate encrypted length */ - *length = (bignum_bitcount(b2) + 8)/8; + /* calculate encrypted length */ + *length = (bignum_bitcount(b2) + 8)/8; freebn(b1); freebn(b2); @@ -194,11 +196,11 @@ diagbn("encrypted input: ", input); debug(("encrypted input bitcount: %d\n", bignum_bitcount(input))); #endif - if (type == 0) - /* public decrypt */ - ret = modpow(input, key->exponent, key->modulus); - else - ret = modpow(input, key->private_exponent, key->modulus); + if (type == 0) + /* public decrypt */ + ret = modpow(input, key->exponent, key->modulus); + else + ret = modpow(input, key->private_exponent, key->modulus); #ifdef _DEBUG diagbn("decrypted bn: ", ret); #endif @@ -230,17 +232,17 @@ nibbles = (3 + bignum_bitcount(ex)) / 4; if (nibbles < 1) - nibbles = 1; + nibbles = 1; for (i = nibbles; i--;) - str[len++] = hex[(bignum_byte(ex, i / 2) >> (4 * (i % 2))) & 0xF]; + str[len++] = hex[(bignum_byte(ex, i / 2) >> (4 * (i % 2))) & 0xF]; len += sprintf(str + len, ",0x"); nibbles = (3 + bignum_bitcount(md)) / 4; if (nibbles < 1) - nibbles = 1; + nibbles = 1; for (i = nibbles; i--;) - str[len++] = hex[(bignum_byte(md, i / 2) >> (4 * (i % 2))) & 0xF]; + str[len++] = hex[(bignum_byte(md, i / 2) >> (4 * (i % 2))) & 0xF]; str[len] = '\0'; } @@ -259,27 +261,27 @@ MD5Init(&md5c); numlen = ssh1_bignum_length(key->modulus) - 2; for (i = numlen; i--;) { - unsigned char c = bignum_byte(key->modulus, i); - MD5Update(&md5c, &c, 1); + unsigned char c = bignum_byte(key->modulus, i); + MD5Update(&md5c, &c, 1); } numlen = ssh1_bignum_length(key->exponent) - 2; for (i = numlen; i--;) { - unsigned char c = bignum_byte(key->exponent, i); - MD5Update(&md5c, &c, 1); + unsigned char c = bignum_byte(key->exponent, i); + MD5Update(&md5c, &c, 1); } MD5Final(digest, &md5c); sprintf(buffer, "%d ", bignum_bitcount(key->modulus)); for (i = 0; i < 16; i++) - sprintf(buffer + strlen(buffer), "%s%02x", i ? ":" : "", - digest[i]); + sprintf(buffer + strlen(buffer), "%s%02x", i ? ":" : "", + digest[i]); strncpy(str, buffer, len); str[len - 1] = '\0'; slen = strlen(str); if (key->comment && slen < len - 1) { - str[slen] = ' '; - strncpy(str + slen + 1, key->comment, len - slen - 1); - str[len - 1] = '\0'; + str[slen] = ' '; + strncpy(str + slen + 1, key->comment, len - slen - 1); + str[len - 1] = '\0'; } } @@ -298,7 +300,7 @@ cmp = bignum_cmp(n, key->modulus); freebn(n); if (cmp != 0) - return 0; + return 0; /* e * d must be congruent to 1, modulo (p-1) and modulo (q-1). */ pm1 = copybn(key->p); @@ -307,7 +309,7 @@ cmp = bignum_cmp(ed, One); sfree(ed); if (cmp != 0) - return 0; + return 0; qm1 = copybn(key->q); decbn(qm1); @@ -315,13 +317,13 @@ cmp = bignum_cmp(ed, One); sfree(ed); if (cmp != 0) - return 0; + return 0; /* * Ensure p > q. */ if (bignum_cmp(key->p, key->q) <= 0) - return 0; + return 0; /* * Ensure iqmp * q is congruent to 1, modulo p. @@ -330,7 +332,7 @@ cmp = bignum_cmp(n, One); sfree(n); if (cmp != 0) - return 0; + return 0; return 1; } @@ -342,7 +344,7 @@ unsigned char *ret; length = (ssh1_bignum_length(key->modulus) + - ssh1_bignum_length(key->exponent) + 4); + ssh1_bignum_length(key->exponent) + 4); ret = smalloc(length); PUT_32BIT(ret, bignum_bitcount(key->modulus)); @@ -359,7 +361,7 @@ { unsigned char *p = (unsigned char *)data; - p += 4; /* length word */ + p += 4; /* length word */ p += ssh1_read_bignum(p, NULL); /* exponent */ p += ssh1_read_bignum(p, NULL); /* modulus */ @@ -369,29 +371,29 @@ void freersakey(struct RSAKey *key) { if (key->modulus) - freebn(key->modulus); + freebn(key->modulus); if (key->exponent) - freebn(key->exponent); + freebn(key->exponent); if (key->private_exponent) - freebn(key->private_exponent); + freebn(key->private_exponent); if (key->comment) - sfree(key->comment); + sfree(key->comment); } /* ---------------------------------------------------------------------- - * Implementation of the ssh-rsa signing key type. + * Implementation of the ssh-rsa signing key type. */ static void getstring(char **data, int *datalen, char **p, int *length) { *p = NULL; if (*datalen < 4) - return; + return; *length = GET_32BIT(*data); *datalen -= 4; *data += 4; if (*datalen < *length) - return; + return; *p = *data; *data += *length; *datalen -= *length; @@ -404,7 +406,7 @@ getstring(data, datalen, &p, &length); if (!p) - return NULL; + return NULL; b = bignum_from_bytes(p, length); return b; } @@ -417,19 +419,19 @@ rsa = smalloc(sizeof(struct RSAKey)); if (!rsa) - return NULL; + return NULL; getstring(&data, &len, &p, &slen); if (!p || slen != 7 || memcmp(p, "ssh-rsa", 7)) { - sfree(rsa); - return NULL; + sfree(rsa); + return NULL; } rsa->exponent = getmp(&data, &len); rsa->modulus = getmp(&data, &len); rsa->private_exponent = NULL; rsa->comment = NULL; - rsa->bits = bignum_bitcount(rsa->modulus)+1; - rsa->bytes = rsa->bits/8; + rsa->bits = bignum_bitcount(rsa->modulus)+1; + rsa->bytes = rsa->bits/8; return rsa; } @@ -459,8 +461,8 @@ int i; unsigned char *p; - elen = (bignum_bitcount(rsa->exponent) + 8) / 8; - mlen = (bignum_bitcount(rsa->modulus) + 8) / 8; + elen = (bignum_bitcount(rsa->exponent) + 7) / 8; + mlen = (bignum_bitcount(rsa->modulus) + 7) / 8; /* * string "ssh-rsa", mpint exp, mpint mod. Total 19+elen+mlen. @@ -476,56 +478,56 @@ PUT_32BIT(p, elen); p += 4; for (i = elen; i--;) - *p++ = bignum_byte(rsa->exponent, i); + *p++ = bignum_byte(rsa->exponent, i); PUT_32BIT(p, mlen); p += 4; for (i = mlen; i--;) - *p++ = bignum_byte(rsa->modulus, i); + *p++ = bignum_byte(rsa->modulus, i); assert(p == blob + bloblen); } void base64_encode_blob(unsigned char *in, unsigned char *out, int blobLen) { - char *p; - int i; - i = 0; - p = (char *)out; - while (i < blobLen) { - int n = (blobLen - i < 3 ? blobLen - i : 3); - base64_encode_atom(in + i, n, p); - i += n; - p += 4; - } + char *p; + int i; + i = 0; + p = (char *)out; + while (i < blobLen) { + int n = (blobLen - i < 3 ? blobLen - i : 3); + base64_encode_atom(in + i, n, p); + i += n; + p += 4; + } } void base64_decode_blob(unsigned char *in, unsigned char *out, int len) { - int i=0, j, k; + int i=0, j, k; unsigned char *blob; - blob = out; - for (j = 0; j < len; j += 4) - { - k = base64_decode_atom(in + j, blob + i); - i += k; - if (!k) return; /* invalid */ - } + blob = out; + for (j = 0; j < len; j += 4) + { + k = base64_decode_atom(in + j, blob + i); + i += k; + if (!k) return; /* invalid */ + } } void rsa2_public_blob(void *key, unsigned char *blob) { - int blobLen; - unsigned char *buffer; /* holds the public key blob */ - unsigned char *buffer2; - /* calculate the blob length */ - blobLen = rsa2_public_blob_len(key); + int blobLen; + unsigned char *buffer; /* holds the public key blob */ + unsigned char *buffer2; + /* calculate the blob length */ + blobLen = rsa2_public_blob_len(key); - buffer = (unsigned char *)smalloc(blobLen); - buffer2 = (unsigned char *)smalloc(blobLen); - rsa2_public_blob_internal(key, buffer); + buffer = (unsigned char *)smalloc(blobLen); + buffer2 = (unsigned char *)smalloc(blobLen); + rsa2_public_blob_internal(key, buffer); - /* base-64 encode the blob */ + /* base-64 encode the blob */ base64_encode_blob(buffer, blob, blobLen); - base64_decode_blob(blob, buffer2, blobLen); - sfree(buffer); - sfree(buffer2); + base64_decode_blob(blob, buffer2, blobLen); + sfree(buffer); + sfree(buffer2); } @@ -534,15 +536,15 @@ struct RSAKey *rsa = (struct RSAKey *) key; int elen, mlen, bloblen; - elen = (bignum_bitcount(rsa->exponent) + 8) / 8; - mlen = (bignum_bitcount(rsa->modulus) + 8) / 8; + elen = (bignum_bitcount(rsa->exponent) + 7) / 8; + mlen = (bignum_bitcount(rsa->modulus) + 7) / 8; /* * string "ssh-rsa", mpint exp, mpint mod. Total 19+elen+mlen. * (three length fields, 12+7=19). */ bloblen = 19 + elen + mlen; - return bloblen; + return bloblen; } void rsa2_private_blob_internal(void *key, unsigned char *blob) @@ -553,9 +555,9 @@ unsigned char *p; dlen = (bignum_bitcount(rsa->private_exponent) + 8) / 8; - plen = (bignum_bitcount(rsa->p) + 8) / 8; - qlen = (bignum_bitcount(rsa->q) + 8) / 8; - ulen = (bignum_bitcount(rsa->iqmp) + 8) / 8; + plen = (bignum_bitcount(rsa->p) + 7) / 8; + qlen = (bignum_bitcount(rsa->q) + 7) / 8; + ulen = (bignum_bitcount(rsa->iqmp) + 7) / 8; /* * mpint private_exp, mpint p, mpint q, mpint iqmp. Total 16 + @@ -567,35 +569,35 @@ PUT_32BIT(p, dlen); p += 4; for (i = dlen; i--;) - *p++ = bignum_byte(rsa->private_exponent, i); + *p++ = bignum_byte(rsa->private_exponent, i); PUT_32BIT(p, plen); p += 4; for (i = plen; i--;) - *p++ = bignum_byte(rsa->p, i); + *p++ = bignum_byte(rsa->p, i); PUT_32BIT(p, qlen); p += 4; for (i = qlen; i--;) - *p++ = bignum_byte(rsa->q, i); + *p++ = bignum_byte(rsa->q, i); PUT_32BIT(p, ulen); p += 4; for (i = ulen; i--;) - *p++ = bignum_byte(rsa->iqmp, i); + *p++ = bignum_byte(rsa->iqmp, i); assert(p == blob + bloblen); } void rsa2_private_blob(void *key, unsigned char *blob) { - int blobLen; - unsigned char *buffer; /* holds the private key blob */ - /* calculate the blob length */ - blobLen = rsa2_private_blob_len(key); + int blobLen; + unsigned char *buffer; /* holds the private key blob */ + /* calculate the blob length */ + blobLen = rsa2_private_blob_len(key); - buffer = (unsigned char *)smalloc(blobLen); - rsa2_private_blob_internal(key, buffer); + buffer = (unsigned char *)smalloc(blobLen); + rsa2_private_blob_internal(key, buffer); - /* base-64 encode the blob */ + /* base-64 encode the blob */ base64_encode_blob(buffer, blob, blobLen); - sfree(buffer); + sfree(buffer); } int rsa2_private_blob_len(void *key) @@ -603,77 +605,77 @@ struct RSAKey *rsa = (struct RSAKey *) key; int dlen, plen, qlen, ulen, bloblen; - dlen = (bignum_bitcount(rsa->private_exponent) + 8) / 8; - plen = (bignum_bitcount(rsa->p) + 8) / 8; - qlen = (bignum_bitcount(rsa->q) + 8) / 8; - ulen = (bignum_bitcount(rsa->iqmp) + 8) / 8; + dlen = (bignum_bitcount(rsa->private_exponent) + 7) / 8; + plen = (bignum_bitcount(rsa->p) + 7) / 8; + qlen = (bignum_bitcount(rsa->q) + 7) / 8; + ulen = (bignum_bitcount(rsa->iqmp) + 7) / 8; /* * mpint private_exp, mpint p, mpint q, mpint iqmp. Total 16 + * sum of lengths. */ bloblen = 16 + dlen + plen + qlen + ulen; - return bloblen; + return bloblen; } static void *rsa2_createkey_internal(unsigned char *pub_blob, int pub_len, - unsigned char *priv_blob, int priv_len) + unsigned char *priv_blob, int priv_len) { struct RSAKey *rsa; unsigned char *pb = priv_blob; rsa = rsa2_newkey(pub_blob, pub_len); #ifdef _DEBUG - diagbn("exponent: ", rsa->exponent); - diagbn("modulus: ", rsa->modulus); + diagbn("exponent: ", rsa->exponent); + diagbn("modulus: ", rsa->modulus); #endif - if (pb != NULL) { - rsa->private_exponent = getmp(&pb, &priv_len); - } + if (pb != NULL) { + rsa->private_exponent = getmp(&pb, &priv_len); + } /* rsa->p = getmp(&pb, &priv_len); rsa->q = getmp(&pb, &priv_len); rsa->iqmp = getmp(&pb, &priv_len); if (!rsa_verify(rsa)) { - rsa2_freekey(rsa); - return NULL; + rsa2_freekey(rsa); + return NULL; } */ return rsa; } void rsa2_createkey(unsigned char *pub_blob, int pub_len, - unsigned char *priv_blob, int priv_len, struct RSAKey *key) + unsigned char *priv_blob, int priv_len, struct RSAKey *key) { - /* base64-decode the blobs */ - unsigned char *pub_blob_decoded = NULL, *priv_blob_decoded = NULL; /* holds the private key blob */ - int pub_decoded_len, priv_decoded_len; - struct RSAKey *key2; + /* base64-decode the blobs */ + unsigned char *pub_blob_decoded = NULL, *priv_blob_decoded = NULL; /* holds the private key blob */ + int pub_decoded_len, priv_decoded_len; + struct RSAKey *key2; - /* calculate the blob length */ - /* encoded_length = 4 * ((decoded_length + 2) / 3) */ - if (pub_blob != NULL) - { - pub_decoded_len = (pub_len * 3)/4 - 2; - pub_blob_decoded = (unsigned char *)smalloc(pub_decoded_len); - /* decode the blob */ - base64_decode_blob(pub_blob, pub_blob_decoded, pub_len); - } - if (priv_blob != NULL) - { - priv_decoded_len = (priv_len * 3)/4 - 2; - priv_blob_decoded = (unsigned char *)smalloc(priv_decoded_len); - /* decode the blob */ - base64_decode_blob(priv_blob, priv_blob_decoded, priv_decoded_len); - } - - key2 = (struct RSAKey *)rsa2_createkey_internal(pub_blob_decoded, pub_decoded_len, priv_blob_decoded, priv_decoded_len); - memcpy((void *)key, (void *)key2, sizeof(struct RSAKey)); - /* release temp memory */ - sfree((void *)key2); - sfree(pub_blob_decoded); - sfree(priv_blob_decoded); + /* calculate the blob length */ + /* encoded_length = 4 * ((decoded_length + 2) / 3) */ + if (pub_blob != NULL) + { + pub_decoded_len = (pub_len * 3)/4 - 2; + pub_blob_decoded = (unsigned char *)smalloc(pub_decoded_len); + /* decode the blob */ + base64_decode_blob(pub_blob, pub_blob_decoded, pub_len); + } + if (priv_blob != NULL) + { + priv_decoded_len = (priv_len * 3)/4 - 2; + priv_blob_decoded = (unsigned char *)smalloc(priv_decoded_len); + /* decode the blob */ + base64_decode_blob(priv_blob, priv_blob_decoded, priv_decoded_len); + } + + key2 = (struct RSAKey *)rsa2_createkey_internal(pub_blob_decoded, pub_decoded_len, priv_blob_decoded, priv_decoded_len); + memcpy((void *)key, (void *)key2, sizeof(struct RSAKey)); + /* release temp memory */ + sfree((void *)key2); + sfree(pub_blob_decoded); + sfree(priv_blob_decoded); } static void *rsa2_openssh_createkey(unsigned char **blob, int *len) @@ -683,7 +685,7 @@ rsa = smalloc(sizeof(struct RSAKey)); if (!rsa) - return NULL; + return NULL; rsa->comment = NULL; rsa->modulus = getmp(b, len); @@ -694,15 +696,15 @@ rsa->q = getmp(b, len); if (!rsa->modulus || !rsa->exponent || !rsa->private_exponent || - !rsa->iqmp || !rsa->p || !rsa->q) { - sfree(rsa->modulus); - sfree(rsa->exponent); - sfree(rsa->private_exponent); - sfree(rsa->iqmp); - sfree(rsa->p); - sfree(rsa->q); - sfree(rsa); - return NULL; + !rsa->iqmp || !rsa->p || !rsa->q) { + sfree(rsa->modulus); + sfree(rsa->exponent); + sfree(rsa->private_exponent); + sfree(rsa->iqmp); + sfree(rsa->p); + sfree(rsa->q); + sfree(rsa); + return NULL; } return rsa; @@ -735,11 +737,11 @@ sprintf(buffer, "ssh-rsa %d ", bignum_bitcount(rsa->modulus)); for (i = 0; i < 16; i++) - sprintf(buffer + strlen(buffer), "%s%02x", i ? ":" : "", - digest[i]); + sprintf(buffer + strlen(buffer), "%s%02x", i ? ":" : "", + digest[i]); ret = smalloc(strlen(buffer) + 1); if (ret) - strcpy(ret, buffer); + strcpy(ret, buffer); return ret; } @@ -747,9 +749,9 @@ * This is the magic ASN.1/DER prefix that goes in the decoded * signature, between the string of FFs and the actual SHA hash * value. The meaning of it is: - * + * * 00 -- this marks the end of the FFs; not part of the ASN.1 bit itself - * + * * 30 21 -- a constructed SEQUENCE of length 0x21 * 30 09 -- a constructed sub-SEQUENCE of length 9 * 06 05 -- an object identifier, length 5 @@ -758,11 +760,11 @@ * 05 00 -- NULL * 04 14 -- a primitive OCTET STRING of length 0x14 * [0x14 bytes of hash data follows] - * + * * The object id in the middle there is listed as `id-sha1' in * ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1d2.asn (the * ASN module for PKCS #1) and its expanded form is as follows: - * + * * id-sha1 OBJECT IDENTIFIER ::= { * iso(1) identified-organization(3) oiw(14) secsig(3) * algorithms(2) 26 } @@ -779,7 +781,7 @@ * Returns 0 if verification passes; 1 otherwise. */ static int rsa2_verifysig(void *key, char *sig, int siglen, - char *data, int datalen) + char *data, int datalen) { struct RSAKey *rsa = (struct RSAKey *) key; Bignum in, out; @@ -790,7 +792,7 @@ getstring(&sig, &siglen, &p, &slen); if (!p || slen != 7 || memcmp(p, "ssh-rsa", 7)) { - return 1; + return 1; } in = getmp(&sig, &siglen); out = modpow(in, rsa->exponent, rsa->modulus); @@ -805,21 +807,21 @@ if (bignum_byte(out, bytes - 2) != 1) goto exit_label; /* Most of the rest should be FF. */ for (i = bytes - 3; i >= 20 + ASN1_LEN; i--) { - if (bignum_byte(out, i) != 0xFF) goto exit_label; + if (bignum_byte(out, i) != 0xFF) goto exit_label; } /* Then we expect to see the asn1_weird_stuff. */ for (i = 20 + ASN1_LEN - 1, j = 0; i >= 20; i--, j++) { - if (bignum_byte(out, i) != asn1_weird_stuff[j]) goto exit_label; + if (bignum_byte(out, i) != asn1_weird_stuff[j]) goto exit_label; } /* Finally, we expect to see the SHA-1 hash of the signed data. */ SHA_Simple(data, datalen, hash); for (i = 19, j = 0; i >= 0; i--, j++) { - if (bignum_byte(out, i) != hash[j]) goto exit_label; + if (bignum_byte(out, i) != hash[j]) goto exit_label; } - /* all invalid possibilities exhausted. Return success! */ - ret = 0; + /* all invalid possibilities exhausted. Return success! */ + ret = 0; exit_label: - freebn(out); + freebn(out); return ret; } @@ -840,11 +842,11 @@ bytes[0] = 1; for (i = 1; i < nbytes - 20 - ASN1_LEN; i++) - bytes[i] = 0xFF; + bytes[i] = 0xFF; for (i = nbytes - 20 - ASN1_LEN, j = 0; i < nbytes - 20; i++, j++) - bytes[i] = asn1_weird_stuff[j]; + bytes[i] = asn1_weird_stuff[j]; for (i = nbytes - 20, j = 0; i < nbytes; i++, j++) - bytes[i] = hash[j]; + bytes[i] = hash[j]; in = bignum_from_bytes(bytes, nbytes); sfree(bytes); @@ -858,25 +860,25 @@ memcpy(bytes + 4, "ssh-rsa", 7); PUT_32BIT(bytes + 4 + 7, nbytes); for (i = 0; i < nbytes; i++) - bytes[4 + 7 + 4 + i] = bignum_byte(out, nbytes - 1 - i); + bytes[4 + 7 + 4 + i] = bignum_byte(out, nbytes - 1 - i); freebn(out); *siglen = 4 + 7 + 4 + nbytes; return bytes; } -BOOL APIENTRY DllMain( HANDLE hModule, - DWORD ul_reason_for_call, +BOOL APIENTRY DllMain( HANDLE hModule, + DWORD ul_reason_for_call, LPVOID lpReserved - ) -{ + ) +{ switch (ul_reason_for_call) - { - case DLL_PROCESS_ATTACH: - case DLL_THREAD_ATTACH: - case DLL_THREAD_DETACH: - case DLL_PROCESS_DETACH: - break; + { + case DLL_PROCESS_ATTACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: + break; } return TRUE; } @@ -888,88 +890,88 @@ // This is an example of an exported function. ALCRYPTO_API LRESULT WINAPI fnRSA(struct RSAKey *key, int p1, void* p2, struct t_progress *p3) { - return 42; + return 42; } /** * Retrieves the public key blob. */ ALCRYPTO_API LRESULT WINAPI rsa_get_public_blob(struct RSAKey *key, char *blob, int *len) { - unsigned char *public_blob; - public_blob = rsa_public_blob(key, len); - if (blob == NULL) return 0; - memcpy(blob, public_blob, *len); - sfree(public_blob); - return 0; + unsigned char *public_blob; + public_blob = rsa_public_blob(key, len); + if (blob == NULL) return 0; + memcpy(blob, public_blob, *len); + sfree(public_blob); + return 0; } ALCRYPTO_API LRESULT WINAPI rsa_encrypt(int type, unsigned char *data, int *len, struct RSAKey *key) { - rsaencrypt(type, data, len, key); - return 0; + rsaencrypt(type, data, len, key); + return 0; } ALCRYPTO_API LRESULT WINAPI rsa_decrypt(int type, unsigned char *data, int *outlen, struct RSAKey *key) { - Bignum input, output; + Bignum input, output; - input = bignum_from_bytes(data, key->bytes); - output = rsadecrypt(type, input, key); - bignum_to_bytes(output, data); - *outlen = strlen(data); + input = bignum_from_bytes(data, key->bytes); + output = rsadecrypt(type, input, key); + bignum_to_bytes(output, data); + *outlen = strlen(data); freebn(input); freebn(output); - return 0; + return 0; } ALCRYPTO_API LRESULT WINAPI rsa_public_key_blob(struct RSAKey *key, unsigned char *pub_blob, int *len) { - int blobLen; - if (pub_blob == NULL) { - /* calculate the blob length */ - blobLen = rsa2_public_blob_len(key); - /* calculate base-64 encoded length */ - *len = 4 * ((blobLen + 2) / 3); - return 0; - } - rsa2_public_blob(key, pub_blob); + int blobLen; + if (pub_blob == NULL) { + /* calculate the blob length */ + blobLen = rsa2_public_blob_len(key); + /* calculate base-64 encoded length */ + *len = 4 * ((blobLen + 2) / 3); + return 0; + } + rsa2_public_blob(key, pub_blob); - return 0; + return 0; } ALCRYPTO_API LRESULT WINAPI rsa_private_key_blob( struct RSAKey *key, unsigned char *priv_blob, int *len) { - int blobLen; - if (priv_blob == NULL) { - /* calculate the blob length */ - blobLen = rsa2_private_blob_len(key); - /* calculate base-64 encoded length */ - *len = 4 * ((blobLen + 2) / 3); - return 0; - } - rsa2_private_blob(key, priv_blob); - return 0; + int blobLen; + if (priv_blob == NULL) { + /* calculate the blob length */ + blobLen = rsa2_private_blob_len(key); + /* calculate base-64 encoded length */ + *len = 4 * ((blobLen + 2) / 3); + return 0; + } + rsa2_private_blob(key, priv_blob); + return 0; } ALCRYPTO_API LRESULT WINAPI rsa_createkey(unsigned char *pub_blob, int pub_len, unsigned char *priv_blob, int priv_len, struct RSAKey *key) { - rsa2_createkey(pub_blob, pub_len, priv_blob, priv_len, key); - return 0; + rsa2_createkey(pub_blob, pub_len, priv_blob, priv_len, key); + return 0; } ALCRYPTO_API LRESULT WINAPI rsa_freekey(struct RSAKey *key) { - freersakey(key); - return 0; + freersakey(key); + return 0; } ALCRYPTO_API LRESULT WINAPI rsa_sign(struct RSAKey *key, char *data, int datalen, char *sig, int *siglen) { - char *sigtemp; - sigtemp = rsa2_sign(key, data, datalen, siglen); - if (sig == NULL) { - sfree(sigtemp); - return 0; - } - memcpy(sig, sigtemp, *siglen); - sig[*siglen] = '\0'; - sfree((void *)sigtemp); - return 0; + char *sigtemp; + sigtemp = rsa2_sign(key, data, datalen, siglen); + if (sig == NULL) { + sfree(sigtemp); + return 0; + } + memcpy(sig, sigtemp, *siglen); + sig[*siglen] = '\0'; + sfree((void *)sigtemp); + return 0; } ALCRYPTO_API LRESULT WINAPI rsa_verifysig(void *key, char *sig, int siglen, char *data, int datalen) { - return rsa2_verifysig(key, sig, siglen, data, datalen); + return rsa2_verifysig(key, sig, siglen, data, datalen); } |
From: AJcompany A. <ajc...@ya...> - 2003-09-17 11:39:31
|
Me too. Add to that school and a half-broken ankle and I was out then. I'll try to make it next meeting! sorry. ----- Original Message ----- From: Dan Sanders To: act...@li... Sent: Tuesday, September 16, 2003 10:40 PM Subject: [family] [ActiveLock-Development] Meeting Transcript Sorry I missed the meeting - there's this nasty cold going around... Maybe I should sleep more... Nah! ----- Original Message ----- From: Thanh Hai Tran To: act...@li... Sent: Tuesday, September 16, 2003 8:32 PM Subject: [ActiveLock-Development] Meeting Transcript Posted - Sunday Sept. 14, 2003, Alpha 2 Dev Planning http://www.activelock.org/boards/index.php?showtopic=52 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software |
From: Dan S. <da...@fl...> - 2003-09-17 03:40:00
|
Sorry I missed the meeting - there's this nasty cold going around... = Maybe I should sleep more... Nah! ----- Original Message -----=20 From: Thanh Hai Tran=20 To: act...@li...=20 Sent: Tuesday, September 16, 2003 8:32 PM Subject: [ActiveLock-Development] Meeting Transcript Posted - Sunday = Sept. 14, 2003, Alpha 2 Dev Planning http://www.activelock.org/boards/index.php?showtopic=3D52 |
From: Thanh H. T. <th...@sy...> - 2003-09-17 03:32:11
|
http://www.activelock.org/boards/index.php?showtopic=3D52 |
From: SourceForge.net <no...@so...> - 2003-09-16 05:35:16
|
Task #85553 has been updated. Project: ActiveLock Subproject: ActiveLock 2.0 General Summary: lockToHD need to survive HD formats Complete: 0% Status: Open Authority : th2tran Assigned to: nobody Description: Investigate if it is feasible to use HD hardware serial# (manufacturer ID) instead of sof serial# (assigned by Windows upon format). ------------------------------------------------------- For more info, visit: http://sourceforge.net/pm/task.php?func=detailtask&project_task_id=85553&group_id=70007&group_project_id=29689 |
From: SourceForge.net <no...@so...> - 2003-09-15 17:15:35
|
Task #83282 has been updated. Project: ActiveLock Subproject: ActiveLock 2.0-alpha2 Summary: ActiveLock Universal Generator (ALUGEN) Complete: 60% Status: Open Authority : th2tran Assigned to: wizzardme2000, th2tran Description: Universal Key Generator allows the developer to generate/maintain product code and license keys for all of their products (not just one). More detailed specs to follow. Follow-Ups: ------------------------------------------------------- Date: 2003-09-15 17:15 By: th2tran Comment: Basic framework and GUI layout are there. Product key (i.e. SoftwareCode) generation and storage is working. Next: Need to work on license key generation. ------------------------------------------------------- Date: 2003-08-16 20:37 By: th2tran Comment: Moved to alpha2 task list. ------------------------------------------------------- Date: 2003-08-08 23:35 By: th2tran Comment: Functional spec added in: http://www.activelock.org/boards/index.php?showtopic=45 For implementation discussion (developers only), go to: http://www.activelock.org/boards/index.php?act=ST&f=13&t=46 ------------------------------------------------------- Date: 2003-08-06 23:16 By: th2tran Comment: Make that ALUGEN...sounds cooler. :-) ------------------------------------------------------- For more info, visit: http://sourceforge.net/pm/task.php?func=detailtask&project_task_id=83282&group_id=70007&group_project_id=31123 |
From: SourceForge.net <no...@so...> - 2003-09-15 17:12:05
|
Task #85537 has been updated. Project: ActiveLock Subproject: ActiveLock 2.0-alpha2 Summary: Fix bug 526385 Complete: 0% Status: Open Authority : th2tran Assigned to: th2tran Description: http://sourceforge.net/tracker/index.php?func=detail&aid=786272&group_id=70007&atid=526385 ------------------------------------------------------- For more info, visit: http://sourceforge.net/pm/task.php?func=detailtask&project_task_id=85537&group_id=70007&group_project_id=31123 |
From: SourceForge.net <no...@so...> - 2003-09-15 17:10:26
|
Task #83819 has been updated. Project: ActiveLock Subproject: ActiveLock 2.0 General Summary: Concurrent/Site Licensing Complete: 0% Status: Open Authority : th2tran Assigned to: th2tran Description: Implement Site/Concurrent licensing. See the following RFE for requirement: https://sourceforge.net/tracker/index.php?func=detail&aid=776088&group_id=70007&atid=526388 Follow-Ups: ------------------------------------------------------- Date: 2003-09-15 17:10 By: th2tran Comment: Moved out of alpha 2, due to limited resourcing. ------------------------------------------------------- For more info, visit: http://sourceforge.net/pm/task.php?func=detailtask&project_task_id=83819&group_id=70007&group_project_id=29689 |
From: Thanh H. T. <th...@sy...> - 2003-09-09 07:10:53
|
Hi everyone, I'm sorry I didn't send out an email in advance for the last weekly = status meeting. I guess with back-to-school, everyone's fighting for = time. Anyway, I just posted the meeting transcript on our message board = in case you're interested. http://www.activelock.org/boards/index.php?showtopic=3D51 Mike (and the rest of the team), With limited resources that we now have, we need to talk about reducing = the scope for Alpha 2 to just bug fixes + alugen. drop site/concurrent = licensing for later. Alpha 1 was just a proof-of-concept kinda thing. We = need to get to a release that's more usable in real life, and that means = alugen's a must. Let me know your thoughts. - Thanh |