PTK-C Programming Guide

PTK-C Programming Guide

ProtectToolkit C Programming Guide i © 2000-2014 SafeNet, Inc. All rights reserved. Part Number 007-008396-007 Version 5.0 Trademarks All intellectual property is protected by copyright. All trademarks and product names used or referred to are the copyright of their respective owners. No part of this document may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, chemical, photocopy, recording or otherwise without the prior written permission of SafeNet. Disclaimer SafeNet makes no representations or warranties with respect to the contents of this document and specifically disclaims any implied warranties of merchantability or fitness for any particular purpose. Furthermore, SafeNet reserves the right to revise this publication and to make changes from time to time in the content hereof without the obligation upon SafeNet to notify any person or organization of any such revisions or changes. We have attempted to make these documents complete, accurate, and useful, but we cannot guarantee them 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 invites constructive comments on the contents of this document. Send your comments, together with your personal and/or company details to the address below: SafeNet, Inc. 4690 Millennium Drive Belcamp, Maryland USA 21017 Technical Support If you encounter a problem while installing, registering or operating this product, please make sure that you have read the documentation. If you cannot resolve the issue, please contact your supplier or SafeNet support. SafeNet support operates 24 hours a day, 7 days a week. Your level of access to this service is governed by the support plan arrangements made between SafeNet and your organization. Please consult this support plan for further information about your entitlements, including the hours when telephone support is available to you. Contact method Contact information Address SafeNet, Inc. 4690 Millennium Drive Belcamp, Maryland 21017 USA Phone United States (800) 545-6608, (410) 931-7520 Australia and New Zealand +1 410-931-7520 China (86) 10 8851 9191 France 0825 341000 Germany 01803 7246269 India +1 410-931-7520 United Kingdom 0870 7529200, +1 410 931-7520 Web www.safenet-inc.com Support and www.safenet-inc.com/Support Downloads Provides access to the SafeNet Knowledge Base and quick downloads for various products. ii Technical Support https://serviceportal.safenet-inc.com Customer Portal Existing customers with a Technical Support Customer Portal account can log in to manage incidents, get the latest software upgrades, and access the SafeNet Knowledge Base. Revision History Revision Date Reason A 30 October 2014 Release 5.0 B 07 November 2014 Updates to the list of supported mechanisms. TABLE OF CONTENTS C H A P T E R 1 OVERVIEW ............................................................................................................. 1 CHAPTER CONTENTS ........................................................................................................................................... 1 RUNTIME LICENSING ........................................................................................................................................... 1 C H A P T E R 2 AN INTRODUCTION TO PKCS#11 .................................................................... 3 THE PKCS#11 MODEL ........................................................................................................................................ 3 C H A P T E R 3 ENVIRONMENTS .................................................................................................. 5 APPLICATION ENVIRONMENT .............................................................................................................................. 5 Win32™ Environment .................................................................................................................................... 5 UNIX Environments ........................................................................................................................................ 5 Java™ Environments ...................................................................................................................................... 5 DEVELOPMENT ENVIRONMENT GUIDELINES ....................................................................................................... 6 Compiling and Linking Applications on AIX .................................................................................................. 6 Compiling and Linking 64-bit Applications on AIX........................................................................................ 6 Compiling and Linking 64-bit Applications for Solaris SPARC ..................................................................... 7 Compiling and Linking 64-bit Applications for HP-UX ................................................................................. 7 MSVC Project Settings ................................................................................................................................... 7 CONFIGURATION / SETUP..................................................................................................................................... 7 C H A P T E R 4 THE SDK ENVIRONMENT .................................................................................. 9 OBJECTS .............................................................................................................................................................. 9 Creating, Modifying, Copying, and Deleting Objects .................................................................................. 10 Additional Attribute Types ............................................................................................................................ 11 Common Attributes ....................................................................................................................................... 15 Hardware Feature Objects ........................................................................................................................... 16 Clock Objects ................................................................................................................................................ 16 Monotonic Counter Objects .......................................................................................................................... 17 User Objects ................................................................................................................................................. 17 Storage Objects............................................................................................................................................. 18 Data Objects ................................................................................................................................................. 18 Certificate Objects ........................................................................................................................................ 19 Key Objects ................................................................................................................................................... 22 Key Parameter Objects ................................................................................................................................. 32 MECHANISMS .................................................................................................................................................... 34 Vendor-Defined Error Codes ....................................................................................................................... 83 C H A P T E R 5 SAMPLE PROGRAMS ........................................................................................ 86 C SAMPLES ........................................................................................................................................................ 86 Compiling the Sample Programs .................................................................................................................. 86 CTDEMO ...................................................................................................................................................... 86 FCRYPT ........................................................................................................................................................ 87 ADDITIONAL C SAMPLE PROGRAMS .................................................................................................................. 88 JAVA SAMPLES .................................................................................................................................................. 88 Compiling and Running the Sample Programs ............................................................................................ 88 The Java Classes .......................................................................................................................................... 89 Threading ..................................................................................................................................................... 91 C H A P T E R 6 BEST PRACTICE GUIDELINES ....................................................................... 92 OVERVIEW .......................................................................................................................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    249 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us