Professional Documents
Culture Documents
www.safenet-inc.com
Patents
HASP hardware and/or software products described in this document are protected by one or more of the following Patents, and may be protected by other United States and/or foreign patents, or pending patent applications: US 5,359,495, US 5,898,777, US 6,189,097, US 6,073,256, US 6,272,636, US 6,009,525, US 6,044,469, US 6,055,503, US 6,334,213, US 6,434,532, US 6,285,985, US 6,334,214, US 6,009,401, US 6,243,692, US 6,363,356, US 7,149,928, US 7,065,652, US 6,915,425, US 6,898,555, US 7,065,650, US 7,225,336, US 7,191,325, EP 1220075, EP 1318451, EP 1271310, EP 1353259, EP 1387235 and EP 1439446.
Disclaimer
We have attempted to make this document complete, accurate, and useful, but we cannot guarantee it to be perfect. When we discover errors or omissions, or they are brought to our attention, we endeavor to correct them in succeeding releases of the product. SafeNet, Inc., Aladdin Knowledge Systems, Ltd., and the subsidiaries and affiliates of each, are not responsible for any direct or indirect damages or loss of business resulting from inaccuracies or omissions contained herein. The specifications contained in this document are subject to change without notice. Kindly be advised that the analyses provided herein are based on findings reached pursuant to research and investigation conducted by SafeNet, Inc., and/or Aladdin Knowledge Systems, Ltd., whilst using their own reasonable methods of investigation, and are provided to you on an "As-Is" basis, without any guarantee or warranty whatsoever. Neither SafeNet, Inc., nor Aladdin Knowledge Systems, Ltd., makes any representation as to the confirmation or endorsement of the analyses contained herein by any third party. January 2010 Version 5.0 Revision 1109-1
Contents
Introduction ........................................................................................... 5
Sentinel HASP Keys.................................................................................................. 6 Roles.......................................................................................................................... 6 Conventions............................................................................................................... 7 Lessons in This Tutorial............................................................................................. 7
2. Defining Features....................................................................................13
Defining a Feature for the Sample Bouncing Ball Program.................................... 15 Defining a Feature for the MyNotepad Program..................................................... 15
Contents
Introduction
ThankyouforchoosingSentinel HASPasthemethodtoprotectand licenseyoursoftwareagainstunauthorizeduse.InthisTutorial,you usetheSentinel HASPsystemtoprotect,license,anddistribute software. Thestrength,uniqueness,andflexibilityofSentinel HASPisbasedon twoprimaryprinciples: ProtectOnceDeliverMany,whichistheconceptofseparatingthe softwareengineeringandbusinessprocesses CrossLocking,whichisthetechnologythatsupportsthe Protect OnceDeliverManyconcept,enablingaprotected applicationtoworkwithaHASP HL(hardware)oraHASP SL (software)key Allcommercialdecisions,packagecreation,andlicensedefinitionsare executedbyproductormarketingmanagersaftertheprotectionhas beenimplemented. Thisworkflowmodelprovidesyouwithgreaterflexibilityand freedomwhendefiningnewsalesandlicensingmodels,including featurebasedandcomponentlicensing,evaluation,rental,floating, subscription,provisional(trial/grace),payperuse,andmore, enablingyoutofocusonrevenuegrowth.
Introduction
Note:
ThistutorialisgenerallynotapplicableforHASP HL Basickeys. HASP HL Basickeyscanbeusedonlytoprotectyourprograms.
Roles
TheSentinel HASPsystemisrolebased,andthetasksyoucan performdependontheuserrolesassignedtoyoubythe Sentinel HASPAdministrator. Inordertoenableyoutoexperiencethebroadfunctionalityofthe Sentinel HASPsysteminthistutorial,youwillhaveaccesstoallroles. Therolesyouassumeinthevariouslessonsinclude: Product Managementrole Theperson,usuallyaproductmanager,whodeterminesthe productcomponentstobeprotected(calledFeaturesin Sentinel HASP),howthesecomponentsareusedtodefine Products,andthelicensestructurefortheProducts Developmentrole Theperson,usuallyasoftwareengineer,whoprotectsthe softwareusingSentinel HASPEnvelopeortheSentinel HASP RuntimeAPI,andperformsotherdevelopmentrelatedtasks, suchasgeneratingtheSentinel HASPRuntimeInstaller Customer Services role ThepersonresponsibleforperformingmanualProductactivations
Conventions
Order Managementrole
Conventions
Eachofthelessonsinthistutorialbeginswithafocusedbreakdownof thelesson,suchasthefollowing: Objective Role in this lesson Applications used
A short description of the lesson objective The role or roles that you assume during the lesson Sentinel HASP applications you use in the lesson
Introduction Lesson 4Defining Products Inthislesson,youuseSentinel HASPBusinessStudiotodefine yourofferingbydefiningProductsbasedontheFeaturesyou alreadydefinedandprotected. Lesson 5Defining a Provisional Product Inthislesson,youuseSentinel HASPBusinessStudiotodefinea ProvisionalProductbasedononeoftheProductsyoudefined, enablingyoutodistributeatrialversionofyoursoftwarelater. Lesson 6Creating and Distributing a HASP SL-protected Software Order Inthislesson,youlockyourprotectedsoftwaretoaHASP SLkey forlaterdistribution.Youwillcreateanorder,defineacustomer, codetheHASP SLkey,andusethesoftwareasanenduser.You willalsolearnhowtoactivatealicense,inordertoconvertthe trialversionofaprogramtoafullyfeaturedprogram. Lesson 7Creating and Distributing a HASP HL-protected Software Order Inthislesson,youlockyourprotectedsoftwaretoaHASP HLkey forlaterdistribution.Youwillcreateanorder,defineacustomer, codetheHASP HLkey,andusethesoftwareasanenduser.You willalsolearnhowtocreatealicenseupdateforadeployed ProductthathasitslicenselockedtoaHASP HLkey. Lesson 8Using Sentinel HASP Run-time API Inthislesson,youlearnhowtoprogramthememoryon Sentinel HASPprotectionkeys. Werecommendthatyoufollowthelessonssequentiallytofamiliarize yourselfwiththeSentinel HASPsystemandtogainaclear understandingofthestrengthoftheProtectOnceDeliverMany model,andtheflexibilityitprovides.
Lesson 1
Preliminary Preparation
Objective Applications used
Prepare your computer and Sentinel HASP for the tutorial Installation DVD Sentinel HASP Vendor Suite
Theproceduresinthislessonarerequiredinorderforyoutobeable toimplementtheprocessesoutlinedinsubsequentlessonsofthis tutorial.They include: InstructionsforinstallingtheSentinel HASPsoftware,including Sentinel HASPBusinessStudioServer InstructionsforlaunchingSentinel HASPVendorSuite InstructionsforintroducingtheSentinel HASPVendorkeystothe Sentinel HASPsystem InstructionsforcustomizingtheOnlineActivationDemo
10
Preliminary Preparation
WARNING!
DonotconnectanyofyourSentinel HASPkeysbeforeinstallingthe Sentinel HASPsoftware! To install the Sentinel HASP software: 1. 2. 3. InserttheSentinel HASPDVDintoyourmachine. SelecttheStart the Sentinel HASP Setupmenuoption. FollowtheSentinel HASP Setupwizardinstructions.
Note:
Formoredetailedinstallationinstructions,refertotheSentinel HASP InstallationGuide.
11
2. 3. 4. 5. 6.
7.
8. 9.
12
Preliminary Preparation 10. ClickFinishtoclosethewizard.Thisprocessintroducesthedatain yourkeytotheSentinel HASPsystemandextractsyour companysuniqueconfidentialVendorCode. ForadditionalinformationonVendorCodes,seeUnderstanding Sentinel HASPSoftwareProtectionandLicensinginthe Sentinel HASPSoftwareProtectionandLicensingGuide.
Note:
Inareallifeenvironment,youusetheSentinel HASPActivationAPI todefineProductactivationforyourprogram.Foradditional information,refertotheSentinel HASPActivationAPIHelp,located inthefollowingfolder:\Program Files\Aladdin\HASP SRM\API\Activation. To customize the Online-Activation Demo file: 1. 2. 3.
\Program Files\Aladdin\HASP SRM\VendorTools\VendorSuite.
Navigatetothefollowingfolder:
..\..\Vendor Codes\demoma.hvc
withtheVendorCodefilepaththatyoumadeanoteofinthe previousprocedurewhenintroducingyourSentinel HASP Vendorkeys. 4. IftheSentinel HASPBusiness StudioServerdoesnotusethe defaulthostandport,intheBusiness Studio Serversection,replace thedefaultvalueswithyourhostandport. 5. Savetheactivationdemo.inifile. Youarenowreadytostartthetutorial.
Lesson 2
Defining Features
Objective Role in this lesson Applications used
Learn how to define Features Product Management Sentinel HASP Business Studio
Note:
ThislessonisnotapplicableforHASP HL Basickeys. AFeatureisanidentifiablefunctionalityofasoftwareapplicationthat canbeindependentlyprotectedorlicensed.InSentinel HASP,a Featuremaybeanentireapplication,amodule,oraspecific functionalitysuchasPrint,Save,orDraw. FeaturesaretypicallydefinedbytheProductManagerbasedon businessdecisions,andarethenimplementedbythecompanys softwareengineers. Inthislesson,youassumetheProductManagementroleanduse Sentinel HASPBusinessStudiotodefinetwoFeaturesforusein subsequentlessons. To launch Sentinel HASP Business Studio: 1. FromtheStartmenu,selectPrograms > Aladdin > HASP SRM > Vendor Suite. TheSentinel HASPVendorSuiteprogramselectionwindowis displayed. ClickBusiness Studio.The Log OntoBusinessStudiowindowis displayed. IntheUser NameandPasswordfields,typeHASP.
2. 3.
14
15
2.
3. 4. 5. 6. 7.
2. 3.
16
Note:
1. IftheSpecify Feature IDfieldisnotvisible,clickAdvancedto expandthewindow. 2. IfamessageisdisplayedinformingyouthatthisFeature ID is notavailable,donotuseadifferentFeature IDnumber. Close theNewFeaturewindow,andintheManageFeatures window,identifyFeature 10andnoteitsname.Forthe remainderofthistutorial,continuetouseFeature ID 10,with thenameyounoted(insteadofMyNotepad). 6. 7. ClickOK.TheNewFeaturewindowclosesandtheMyNotepad FeatureyoudefinedisdisplayedintheManageFeatureswindow. CloseBusinessStudio.
Lesson 3
Protect Once
Objective Role in this lesson Applications used
Learn how to apply Sentinel HASPs automatic protection functionality Development Sentinel HASP Envelope
Inthislesson,youuseSentinel HASPEnvelopetodefineprotection parametersfortwoprograms,usingthetwoFeaturesyoudefinedin Lesson 2DefiningFeatures. Sentinel HASPEnvelopeisaninnovative,advancedsolutionfor protectingsoftwareagainstillegalorunauthorizeduse.Thesolution detersillegalaccessandexecutionofprotectedapplications. AdeployedSentinel HASPprotectedprogramrequiresaccesstoa Sentinel HASPprotectionkeyinordertorun.Theprotectedprogram queriestheSentinel HASPprotectionkeyforpredefinedinformation. IftheSentinel HASPprotectionkeyisnotpresent,ortheinformation returnedisincorrect,theprogramdoesnotexecute,orstops functioning.
18
Protect Once
Project pane
Display pane
Log pane
Protecting the Sample Bouncing Ball Program To prepare for protection: 1. 2. ConnecttheSentinel HASPDeveloperkey. FromtheStartmenu,selectPrograms > Aladdin > HASP SRM > Vendor Suite.TheSentinel HASPVendorSuiteprogramselection windowisdisplayed. ClickEnvelopetolaunchSentinel HASPEnvelope.Thelogin windowisdisplayed. ClickWork Offline.TheSentinel HASPEnvelopemainwindowis displayed.
19
3. 4.
5.
20
Protect Once 6. IntherightpaneoftheSentinel HASPBatchCodewindow,select theUse Vendor Code from file option. BrowsetothelocationoftheBatchCode.Bydefault,BatchCodes arestoredin:
Note:
YourBatchCodefileisnamedaccordingtotheBatchCode labeledonyourSentinel HASPkeys.Forexample,ifyourkeysare labeledwiththeBatchCodeABCDE,yourBatchCodefileiscalled ABCDE.hvc. 7. SelectyourBatchCodefileandclickOpen.Thepathandfileare displayedintheUse Batch Code from filefield.
To protect the Bouncing Ball program: 1. 2. IntheSentinel HASPEnvelopeProjectpane,selectPrograms. ClickAdd ProgramsinthetoprightoftheProgramspane. TheAddProgramswindowisdisplayed,showingthecontentsof theVendorSuite\samplesfolder. SelectWin32_Bounce.exeandclickOpen.Win32_Bounceisnowlisted intheProgramspane. IntheProjectpane,underPrograms,select Win32_Bounce.The DisplaypaneliststheProtectionDetails. IntheFeature IDfield,type50(theFeaturedefinedfortheBounce programinLesson 2DefiningFeatures).
3. 4. 5.
Note:
IfyouareusingaHASP HL Basickey,select0intheFeature IDfield. 6. 7. IntheProjectpane,underDefault Protection Settings,selectWin32.The DisplaypanenowdisplaysWin32 - Default Protection Settings. IntheWin32DefaultProtectionSettingspane,decreasethe numberofPeriodic background checksfromthedefaultvalueto 5 seconds.Thismeansthatduringruntime,theprotected programwillcheckevery5secondstoensurethattherequired HASP HLkeyisconnected.
21
9.
Note:
ThissectionisnotapplicableforHASP HL Basickeys. To protect the MyNotepad program: 1. 2. 3. 4. LocatetheWindowsNotepadutility(usuallyunder\Windows). CreateacopyoftheNotepadutilityandrenameitMyNotepad.exe. VerifythatyourSentinel HASPDeveloperkeyisconnectedto yourcomputer. Ifitisnotalreadyopen,launchSentinel HASPEnvelope,andin theloginwindow,clickWork Offline.TheSentinel HASPEnvelope mainwindowisdisplayed. IntheSentinel HASPEnvelopeProjectpane,selectPrograms. ClickAdd ProgramsinthetoprightoftheProgramspane. TheAddProgramswindowisdisplayed. NavigatetothefolderwhereMyNotepad.exeislocated.Select the fileandclickOpen.NotethatanewMyNotepadentryisdisplayedin theProjectpaneunderPrograms. IntheProjectpane,underPrograms,selectMyNotepad.TheDisplay paneliststheProtectionDetails. IntheFeature IDfield,type10(theFeaturedefinedforthe MyNotepadprograminc).
5. 6. 7.
8. 9.
22
Protect Once 10. IntheProjectpane,underDefault Protection Settings,selectWin32.The DisplaypanenowdisplaysWin32 - Default Protection Settings. 11. IntheWin32DefaultProtectionSettingspane,movethe Encryption level slidertothefarright.Increasingtheencryptionlevel raisesthelevelofsecurityoftheprotectedprogram.Notethatthe increasedsecuritymaycauseaslightdelayinprogramloadtime becausedecryptionoftheprogramfilemaytakelongerto process. 12. Inanticipationofapossibledelayinprogramloadtime,inthe Projectpane,underPrograms,selectMyNotepad.IntheGeneraltabof theProtectionDetailspane,selecttheShow waitbox on start-upcheck boxtospecifythatawaitmessageisdisplayedtousersduring theprogramloadtime. 13. ClickProtect.AmessageinformsyouthattheSentinel HASP systemisprotectingtheprogram. 14. ClickClosewhenSentinel HASPEnvelopenotifiesyouthatthe protectionhascompleted.TheprotectedMyNotepadprogramis savedinthisfolder:
\Documents and Settings\[logged_in_user_name]\My Documents\ Aladdin\HASP SRM [version]\VendorTools\VendorSuite\Protected
15. CloseSentinel HASPEnvelope.Youarepromptedtosavethe changestothecurrentproject. 16. ClickSave.TheSaveAsdialogboxisdisplayed. 17. IntheFile Name field,typeTutorialandclickSave.Thedialogbox closesandtheprojectissaved.
Lesson 4
Defining Products
Objective Role in this lesson Applications used
Learn how to define the Products you want to license Product Management Sentinel HASP Business Studio
Note:
ThislessonisnotapplicableforHASP HL Basickeys. AProductisalicensingentitythatrepresentsoneofthevendors marketablesoftwareproducts.TheProductiscodedintothememory ofaHASPkeyandcontainsoneormoreFeatures.Licensetermsare definedforeachFeatureinaProduct. LikeFeatures,ProductsaredefinedusingSentinel HASPBusiness Studio.Typically,thisfunctionisperformedbytheProductManager, andimplementedbythesoftwareengineer.Inareallifeenvironment, anumberofProductsmightbedefinedandheldinreadinessfor inclusionincustomerorders.However,youcandefinenew ProductsmixingandmatchingFeaturesatanytime. Inthislesson,youdefineanumberofProducts.TheProductswill includelicensetermsfortheBounceandMyNotepadFeaturesyou definedinLesson 2DefiningFeatures.TheProductsthatyoudefine nowwillbeincludedintheordersyoudefineinlaterlessons.
24
Defining Products Inthislesson,youdefinethefollowingProducts: Bounce_LiteArentalProduct,inwhichthelicenseexpires afterthreeexecutions Bounce_FullAfullyfeaturedProduct,inwhichthelicense enablesunrestrictedaccesstoalltheFeaturesintheprogram.This ProductwillbecreatedbyduplicatingtherentalProductand modifyingthelicenseterms. MyNotepad_FullAfullyfeaturedProductthatenables unrestrictedaccesstoalltheFeaturesintheprogram
Note:
InLesson 6CreatingandDistributingaHASP SLprotectedSoftware Order,andLesson 7CreatingandDistributingaHASP HLprotected SoftwareOrderyouwillassumetheroleofanend user,andwillinstall licensesandruntheseProducts.
3. 4. 5. 6.
25
8.
9.
EnsurethattheClone Protectioncheckboxisselected.Thisoption ensuresthatwhenyoulockProductstoaHASP SLkeyinalater lesson,theFeaturesintheProductswillbeprotectedagainst cloning.(ThismeansthatiftheSentinel HASPRuntimedetects cloningattheendusersite,theProductwillbedisabled.) IntheFeatures & Memoryarea,intheAvailable Featureslist,select Feature50 (Bounce)andclicktherightarrow.The selectedFeature ismovedtotheFeatures In Productlist. IntheFeatures In Productlist,selectBounceandclickDefinetospecify thelicensetermsfortheFeature.TheDefineLicenseTerms windowisdisplayed. IntheLicense Typedropdownlist,selectExecutions. IntheNumber of Executionsfield,type3. ClickOK.TheDefineLicenseTermswindowclosesandthelicense termsaredisplayedintheFeatures in Productlist. ClickOK.ThenewBounce_LiteProductisdisplayedinthe ManageProductswindow.NotethatthestatusoftheBounce_Lite ProductisReady.
26
Defining Products To define the Bounce_Full Product: IntheFunctionpaneoftheBusinessStudiowindow,under LicensingPlan,selectManage Products.TheManageProducts windowisdisplayedintheMainpane. 2. VerifythatthecorrectBatchCodeisdisplayedintheBatch Code field. 3. IntheTaskpane,clickNew.TheNewProductwindowis displayed. 4. IntheGeneralarea,intheBase Product field,typeBounce_Full. 5. IntheAttributesarea,intheLocking Typedropdownlist,selectHASP HL or HASP SL.This optionenablesthelockingtypetobe determinedatthetimewheneachorderisdefined. 6. EnsurethattheClone Protectioncheckboxisselected.Thisoption ensuresthatifaProductthatislockedtoaHASP SLkey,the FeaturesintheProductswillbeprotectedagainstcloning.(This meansthatiftheSentinel HASPRuntimedetectscloningatthe endusersite,theProductwillbedisabled.) 7. IntheFeatures & Memoryarea,intheAvailable Featureslist,select Feature50 (Bounce)andclicktherightarrow.The selectedFeature ismovedtotheFeatures In Productlist. 8. IntheFeatures In Productlist,selectBounceandclickDefinetospecify thelicensetermsfortheFeature.TheDefineLicenseTerms windowisdisplayed. 9. IntheLicense Typefield,selectPerpetual. 10. ClickOK.TheDefineLicenseTermswindowclosesandthelicense termsaredisplayedintheFeaturesinProductlist. 11. ClickOK.TherearenowtwonewitemsintheManageProducts window:Bounce_LiteandBounce_Full.Notethatthestatusofthe Bounce_FullProductisReady. To define the MyNotepad_Full Product: 1. IntheFunctionpaneoftheBusinessStudiowindow,under LicensingPlan,selectManage Products.TheManageProducts windowisdisplayedintheMainpane. VerifythatthecorrectBatchCodeisdisplayedintheBatch Code field. IntheTaskpane,clickNew.TheNewProductwindowis displayed. 1.
2. 3.
27
6.
7.
8.
IntheGeneralarea,intheBase Product field,typeMyNotepad_Full. IntheAttributesarea,intheLocking Typedropdownlist,selectHASP HL or HASP SL.This optionenablesthelockingtypetobe determinedatthetimewheneachorderisdefined. EnsurethattheClone Protectioncheckboxisselected.Thisoption ensuresthatifaProductthatislockedtoaHASP SLkey,the FeaturesintheProductswillbeprotectedagainstcloning.(This meansthatiftheSentinel HASPRuntimedetectscloningatthe endusersite,theProductwillbedisabled.) IntheAvailable Featureslist,undertheID field,select 10(MyNotepad) andclicktherightarrow.TheMyNotepadFeatureismovedtothe Features In Productlist. Todefinememorydata,intheFeatures & Memoryarea,clicktheDefine Memory Datatab,thendothefollowing: a. ClickNew.TheNewMemorySegmentwindowisdisplayed. b. IntheOffsetfield,type0.Thefieldcontentautomatically changesto0x0. c. IntheLengthfield,type50. d. ClickOK.Thewindowclosesandtheareaatthebottomofthe Define Memory Datatabishighlighted. e. Atthefirstdotontherightofthehighlightedarea,type Hello World.
9.
28
Defining Products
Lesson 5
Note:
ThislessonisnotapplicableforHASP HL Basickeys. Inthislesson,stillintheProductionManagementrole,youdefinethe MyNotepad_EvaluationProductasatrialversionofthe MyNotepad_FullProductyoudefinedinLesson 4DefiningProducts. YouthenassumetheDevelopmentroletopreparetheProductfor distributionbycreatingacustomizedSentinel HASPRuntime EnvironmentInstallerexecutablefile. AProvisionalProductistypicallyusedforevaluationpurposes,to enabletheprovisionofagraceperiod,orforsuperdistribution. A ProvisionalProductcanbeusedonanycomputerwithouta Sentinel HASPprotectionkeyforalimitedtimeperiodonly.After theallottedperiodexpires,thesoftwarenolongerruns,untilitis activatedwithaSentinel HASPprotectionkey.
30
3.
4. 5. 6.
7.
31
Note:
Inthisprocedure,youareonlyaddingasingleProvisional ProductMyNotepad_EvaluationtotheProvisionalProduct bundle. 6. 7. 8. ClickProduce Now.TheProduceBundleofProvisionalProducts windowisdisplayed. InFile Type,selecttheV2C (VendortoCustomer) option. IntheFile Locationfield,clickthebrowsebutton.TheBrowseFor Folderwindowisdisplayed,pointingtothedefaultfolder:
\Documents and Settings\[logged_in_user_name]\My Documents\ Aladdin\HASP SRM [version]\VendorTools\VendorSuite\v2c ClickOK.ThepathisdisplayedintheFile Locationfield.
32
4.
5. 6. 7.
Doubleclickthev2cfiledisplayedinthislocation.Thepathtothe fileisdisplayedintheV2C File LocationfieldoftheGenerate RuntimeEnvironmentInstallerwindow. IntheFile Typefield,ensurethattheApplication (EXE)optionis selected. IntheOutput File Location field,clickthebrowsebuttonandcreatea foldercalledEvaluationProductsonyourdesktop. ClickOK.ThepathisdisplayedintheOutput File Location fieldofthe GenerateRuntimeEnvironmentInstallerwindow.
33
WARNING!
Donotexecutethegeneratedfileatthistime!Youwillinstallthis bundleinLesson 6CreatingandDistributingaHASP SLprotected SoftwareOrder. YouarenowreadytoshipyourProductwithitslicenselockedto eitheraHASP SLkeyasdescribedinLesson 6Creatingand DistributingaHASP SLprotectedSoftwareOrder,oraHASP HLkeyas describedinLesson 7CreatingandDistributingaHASP HLprotected SoftwareOrder.
34
Lesson 6
Order Management, Production, End User Sentinel HASP Business Studio Sentinel HASP Remote Update System utility Admin Control Center
Note:
ThislessonisnotapplicableforHASP HL Basickeys. Inthislesson,youassumetheOrderManagementroleanddefinean order.Theorderprocessalsoentailsdefiningthecustomerand producingtheordersothatitisreadyforshipment. TheorderyoudefineisbasedontheMyNotepad_FullProductthat youdefinedinLesson 4DefiningProducts.Thelicenseislockedtoa HASP SLkeythatwillbeactivatedontheendusersmachineto convertthetrialMyNotepadsoftwaretoafullyfeaturedproduct. WhenyoudefinedtheProducts,youspecifiedthelicensetermsfor theFeaturesincludedwithinthoseProductsatthattime.Notethat insteadofspecifyingthelicensetermswhenyoudefinedtheProduct, youcouldhaveenabledthefunctionalityforspecifyingthelicense termsatthisstageaspartoforderprocessing.
36
Creating and Distributing a HASP SL-protected Software Order Inthislesson,youwillalsoassumetheenduserroletoinstallanduse theProduct.YouwillthenusetheHASP SLProductKeyreceived fromthevendortoconvertatrialversionofthesoftwaretoafully featuredprogram.
Note:
WhenacustomerwantstopurchaseadditionalFeaturesortoextend thecurrentlicenseforaProductthathasitslicenselockedtoa HASP SLkey,youcanupdatethedeployedlicense,asdescribedin CreatinganUpdateforaLicenseintheFieldon(page 45).
2. 3. 4. 5.
6. 7. 8. 9.
37
10. IntheFile Locationfield,clickthebrowsebuttonandcreateafolder namedProductKeysonyourdesktop.Thisfolderwillstoreyour generatedProductKey. 11. AdefaultnameisprovidedintheFile Namefield. 12. ClickGenerate File.Thefileisproducedandasuccessmessageis displayed. 13. ClickNotoclosethedialogbox.Theorderisdisplayedinthe Manage Orderswindow.
5.
38
Creating and Distributing a HASP SL-protected Software Order To check the license status of the trial Product: 1. 2. 3. 4.
\Documents and Settings\[logged_in_user_name]\My Documents\ Aladdin\HASP SRM [version]\VendorTools\VendorSuite\Protected).
Navigatetothefollowingfolder:
DoubleclickMyNotepad.exe. Whiletheapplicationisrunning,fromtheStartmenu,select Programs > Aladdin > HASP SRM > Tools > Admin Control Center. IntheAdministrationOptionspane,selectHASP Keys.Allthe Sentinel HASPprotectionkeysthatareaccessibleonthe HASP LicenseManageraredisplayed.
5.
6.
2.
39
CopytheProductKeyandpasteitintotheProduct Keyfield. ClickActivate.Amessageboxisdisplayedindicatingthatthe activationsimulationhasbeensuccessful. ClickOK.Themessageboxcloses. OpenSentinel HASPAdminControlCentertoseethatyounow haveaPerpetual licenseforFeature ID 10.
40
Lesson 7
Order Management, Production, End User Sentinel HASP Business Studio Sentinel HASP Remote Update System utility Admin Control Center
Note:
ThislessonisnotapplicableforHASP HL Basickeys. Inthislesson,youassumetheOrderManagementroleanddefinetwo differentorders.Theorderprocessentailsyoudefiningtheorder, defininganewcustomer,andproducingtheordersothatitisreadyfor shipment.Youalsoassumetheenduserroletotestdifferenttypesof Sentinel HASPprotectionkeysandlicenses. WhenacustomerwantstopurchaseadditionalFeatures,ortoextend thecurrentlicenseforyourprotectedprogram,youcanupdatethe deployedlicensewithouthavingtorecallorredeploykeys. Inthislesson,youwillalsoassumetheOrderManagementroleand learnhowtoupdatethedeployedlicense.
42
Creating and Distributing a HASP HL-protected Software Order TheordersyoudefinearebasedontheProductsthatyoudefinedin Lesson 4DefiningProducts,andinclude: AnorderfortheBounce_LiteProduct. AnorderfortheBounce_FullProduct.Thisorderwillbeused toupdatethelicenseontheHASP HLkeyprovidedtothe end userwiththeBounce_LiteProduct.Youwilllearnhowto convertitsfunctionalityfromBounce_LitetoBounce_Fullinthe field. WhenyoudefinedtheProducts,youspecifiedthelicensetermsfor theFeaturesincludedwithinthoseProductsatthattime.Notethat insteadofspecifyingthelicensetermswhenyoudefinedtheProduct, youcouldhaveenabledthefunctionalityforspecifyingthelicense termsatthisstageaspartoforderprocessing.
2. 3. 4. 5. 6.
7. 8.
Using an Application With a HASP HL Key To lock the license to a HASP HL key: 1. 2. 3. 4. 5.
43
6.
IntheOrder Detailsarea,selecttheHASP HL Keysoption. IntheNumber of keysfield,type1. ClickProduce Now.TheProduceHASP HLKeys windowis displayed. ConnecttheHASP HLkey,towhichyouwanttoburntheorder, toyourcomputer. ClickBurn Now.Abarisdisplayedshowingtheprogressoftheburn process.Whentheburnprocessiscomplete,theprogressbar closesandtheBurnedfieldintheProduceHASP HLKeyswindow indicatesthatonekeyhasbeenburned. ClickDonetoclosetheProduceHASP HLKeyswindow.
Note:
ThisprocedurecouldalsobeperformedbyapersonintheProduction role,whoisauthorizedtouseSentinel HASPBusinessStudioonlyfor thispurposeanddoesnothaveaccesstootherfunctions.
44
Creating and Distributing a HASP HL-protected Software Order To activate a Product protected with a HASP HL key: 1. ConnecttheHASP HLkeyonwhichyouburnedtheordertoyour computer.TherequiredlicensinginformationforBounce_Liteis contained,inencryptedformat,in thekey.Aslongasthelicenseis valid,theprotectedapplicationcanrun. FromtheStartmenu,selectPrograms > Aladdin > HASP SRM > Tools > Admin Control Center.Sentinel HASPAdminControlCenteris displayed.Thisinterfaceenablescustomerstotrackthestatusand usageoftheirSentinel HASPlicenses. IntheAdministrationOptionspane,selectHASP Keys. All the Sentinel HASPprotectionkeysthatareaccessibleonthe HASP LicenseManageraredisplayed.
2.
3.
4.
5. 6.
LocatetheentryforyourHASP HLkeyandclicktheFeatures buttonintheActionscolumn.TheFeaturesthatarelicensedin yourkeyaredisplayed. NotethattheRestrictionsfieldforFeature ID 50displays Executions 3 left,indicatingthattheremainingnumberoflogins permittedbythelicenseis3. Navigatetothefollowingfolder:
\Documents and Settings\[logged_in_user_name]\My Documents\ Aladdin\HASP SRM [version]\VendorTools\VendorSuite\Protected.
DoubleclickWin32_Bounce.exe.TheBouncingBallprogram launches. 7. ClosetheBouncesoftware. 8. Repeatstep 6andstep 7twice,toconsumeallthepermitted executions. 9. Repeatstep 6.Bouncefailstoopenandamessageisdisplayed indicatingthattheFeaturehasexpired. 10. InSentinel HASPAdminControlCenter,intheAdministration Optionspane,selectHASP Keys.AlltheSentinel HASPprotection keysthatareaccessibleontheHASP LicenseManagerare displayed.
Creating an Update for a License in the Field 11. LocatetheentryforyourHASP HLkeyandclicktheFeatures buttonintheActionscolumn.
45
Note:
Ifyouarenotsurewhichentryrelatestoyourspecifickey,click theBlink onbuttonandidentifythekeyonwhichtheLEDis blinking. NotethattheRestrictionsfieldforFeature ID 50displaysExpired, meaningthatthenumberofallowedloginsdefinedinthelicense hasbeenexhausted.
Note:
TherearemanywaystousetheSentinel HASPRemoteUpdate System(RUS)whenyousendlicenseupdatestoyourcustomers.For moreinformation,seeChapter12,Sentinel HASPRemoteUpdate SystemintheSentinel HASPSoftwareProtectionandLicensingGuide. Toproduceanorderforalicenseupdate: 1. IntheFunctionpaneoftheBusinessStudiowindow,under Production,selectManage Orders.TheManageOrderswindowis displayedintheMainpane. IntheTaskpane,clickNew.TheNewProductionOrderwindowis displayed. IntheCustomerarea,clickSearch.TheLocateCustomerwindowis displayed. IntheNamedropdownlist,selectJohn Smith Ltd. ClickOK.TheLocateCustomerwindowclosesand John Smith Ltd.isdisplayedintheCustomer Namefieldofthe ProductionOrderwindow.
2. 3. 4. 5.
46
Creating and Distributing a HASP HL-protected Software Order 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. ClickAdd.TheProductswindowisdisplayed. SelectBounce_FullandclickAdd.TheBounce_FullProductisadded totheOrderItemslist. IntheOrder Detailsarea,selecttheHASP Update option. ClickLocateTheLocateHASPKeyswindowisdisplayed. ClickLocate.Thekeyinformationisdisplayedintheuppertable. IntheHASP IDfield,notetheHASPIDnumberforJohn Smiths HASP HLkey. ClickAdd to List.TheinformationisaddedtotheHASP Keys to Update table. ClickOK.TheLocateHASPKeyswindowcloses. ClickProduce Now.TheProduceHASPUpdatewindowis displayed. InFile Type,selecttheV2C option. IntheFile Locationfield,clickthebrowsebutton.TheBrowseFor Folderwindowisdisplayed,pointingtothedefaultfolder:
47
3.
4. 5.
6. 7. 8. 9.
createdwhenproducingtheorderforthelicenseupdateinyour OrderManagementroleearlier,inCreatinganUpdateforaLicense intheFieldon(page 45). ClickOpen.ThefilepathisdisplayedintheSelect a V2C, H2R or ID file field. ClickApply File.Amessageisdisplayedconfirmingthatyour updatewasappliedsuccessfully. IntheAdministrativeOptionspane,selectHASP Keys. LocatetheentryforyourHASP HLkeyandclicktheFeatures button.TheFeaturesthatarelicensedinyourkeyaredisplayed. NotethatanadditionalrowiscreatedforFeature ID 50.The RestrictionsfieldinthisrowisPerpetual,indicatingthatthe remainingnumberofloginspermittedbythelicenseisunlimited.
48
Lesson 8
Nowthatyouhavecompletedtheotherlessonsinthistutorial,you shouldhaveagoodunderstandingofhowSentinel HASPworks.This lessonbuildsonyouraccumulatedknowledgeandintroducesyouto theSentinel HASPRuntimeAPIthroughSentinel HASPToolBox, whichisaninteractiveGUIapplicationthathelpsyoufamiliarize yourselfwiththeSentinel HASPRuntimeAPI. TheSentinel HASPsystemoffersarichvarietyofAPIcallstosupport customizedprotectionofyourprogram,aswellasotheroperationson Sentinel HASPprotectionkeys. YoucanalsouseSentinel HASPToolBoxtogeneratesourcecodethat youcanimmediatelycopyandpasteintoyourownapplicationsource code.
50
Using Sentinel HASP Run-time API TheSentinel HASPToolBoxwindowincludesthefollowing: Functionpane,inwhichyouselectthefunctiontoperform Displaypane,inwhichyoucanviewandeditthedetailsofthe APIcallyouselected GeneratedCodepane,inwhichcodeisdisplayed.Youcancopy thiscodeandpasteitintoyourownfiles. Handlespane,inwhichthesessionhandleisdisplayed
Function pane
Display pane
To launch Sentinel HASP ToolBox: 1. FromtheStartmenu,selectPrograms > Aladdin > HASP SRM > Vendor Suite.The Vendor Suiteprogramselectionwindowis displayed. ClickToolBoxtolaunchtheSentinel HASPToolBoxapplication. The loginwindowisdisplayed. ClickWork Offline.TheSentinel HASPToolBoxmainwindowis displayed. The FunctionpaneontheleftoftheToolBoxwindowlistsallthe availableSentinel HASPRuntimeAPIcalls. Browsethelist.YoucanselectanyAPIcallasyoubrowse.When makingaselection,theDisplaypaneontherightoftheToolBox windowdisplaystheparametersyoumustspecifyinorderto activatetheselectedAPIcall.
2. 3. 4. 5.
51
Note:
Forthepurposeofcompletingthistutorial,it isrecommended thatyouselectC-API. IfCAPIisnotselected,selectitandclickOK.IfCAPIisalready selected,clickCancel. TheSentinel HASPToolBoxSettingswindowcloseswiththe programminglanguageselected.
Login
EachSentinel HASPRuntimeAPIsessionmustbeginwiththe hasp_loginAPIcall,whichestablishesaconnectionwiththe connectedHASP HLkeyandenablesaccesstoitsresources. To log in to the HASP HL key: 1. 2. ConnectaHASP HLkey. IntheFunctionpane,selecthasp_login.TheDisplaypanedisplays alltheparameterswiththedefaultvaluesthatareappropriatefor theloginoperation. SpecifythelocationofyourstoredVendorCodefile. TolocateyourVendorCodefile,clickthebrowsebutton. Bydefault,VendorCodesarestoredin:
3.
52
Using Sentinel HASP Run-time API Thefileisnamedaccordingtothelabelprintedonyourkeys. For example,ifthekeysarelabeledwithBatchCodeABCDE,by default,yourVendorCodefileisnamedABCDE.hvc. SelectyourVendorCodefileandclick Open.Thecodeisdisplayed intheVendor Code field. IntheFeature IDfield,type50.
4. 5.
Note:
IfyouareusingaHASP HL Basickey,select0intheFeature IDfield. 6. Atthebottomleftofthehasp_loginpane,clickExecute.The result oftheexecutedloginissummarizedtotherightofthe Execute buttoninthreeStatusfieldsnumber,codeandmessage.
53
Note:
BecauseSentinel HASPusesauniqueencryptionkeyforeach encryptionprocess,basedonyouruniqueSentinel HASPVendor keys,thestringyoutypeisencrypteddifferentlyfromanyother softwarevendor. 5. 6. IntheFunctionpane,selecthasp_decrypt.Theeditorstilldisplays theencryptedstring. ClickExecute.TheSentinel HASPprotectionkeydecryptsthe string.SafeNet, Inc.isnowdisplayedintheeditor.
Note:
If youareusingaHASP HL Basickey,youhavecompletedthe tutorial.ProceedtoWhatsNext?onpage 55.
54
Using Sentinel HASP Run-time API To retrieve Sentinel HASP key information: 1. IntheFunctionpane,underManagement,select hasp_get_sessioninfo.TheDisplaypanedisplaysparameters forthehasp_getsessioninfoAPIcall. IntheDisplaypane,fromtheFormat Templatedropdownlist,select HASP_KEYINFO.NotethatadescriptionoftheFormatdefinitionis displayedinthegrayboxbelowtheInformationfield. ClickExecute.TheInformationpanedisplaysXMLtagswith informationonthekey,including: TheuniqueIDnumberoftheconnectedkey ThekeyRead/Writememorysize ThekeyReadonlymemorysize
2.
3.
2. 3.
Whats Next?
55
Whats Next?
ThisconcludestheSentinel HASPtutorial.Youarenowreadytouse theSentinel HASPapplicationstolicenseyoursoftwareandprotectit againstunauthorizeduse. ForadditionalinformationabouttheSentinel HASPsystem,referto theSentinel HASPSoftwareProtectionandLicensingGuideandtheHelp documentationavailableintheSentinel HASPapplications.
56