Permalink
Browse files

Updated README file

  • Loading branch information...
1 parent c5d3bca commit 9713aa5a23dd496638e09536a328e844b7a63106 Kanis-Küche committed May 4, 2010
Showing with 153 additions and 123 deletions.
  1. +1 −1 Manifest.txt
  2. +149 −0 README.rdoc
  3. +0 −120 README.txt
  4. +3 −2 Rakefile
View
@@ -2,7 +2,7 @@
History.txt
MIT-LICENSE
Manifest.txt
-README.txt
+README.rdoc
Rakefile
ext/pkcs11/extconf.rb
ext/pkcs11/include/cryptoki.h
View
@@ -0,0 +1,149 @@
+= PKCS #11/Ruby Interface
+
+* Homepage: http://github.com/larskanis/pkcs11
+* older SVN repository: http://coderepos.org/share/log/lang/ruby/pkcs11-ruby
+
+This module allows Ruby programs to interface with "RSA Security Inc.
+PKCS #11 Cryptographic Token Interface (Cryptoki)".
+PKCS #11 is the de-facto standard to access cryptographic devices.
+You must have the PKCS #11 v2.20 implementation library installed in
+order to use this module.
+
+Right now, this module works on the Unix like operating systems and win32.
+
+== Installation
+
+ gem install pkcs11
+
+
+== Usage
+
+PKCS11.new requires suitable PKCS #11 implementation for your smart-cards.
+
+ require "rubygems"
+ require "pkcs11"
+
+ pkcs11 = PKCS11.new("/path/to/pkcs11.so")
+ slots = pkcs11.C_GetSlotList(true)
+ slot = slots.first
+ info = pkcs11.C_GetSlotInfo(slot)
+ p [info.slotDescription, info.manufacturerID,
+ info.flags, info.firmwareVersion, info.hardwareVersion]
+ flags = PKCS11::CKF_SERIAL_SESSION|PKCS11::CKF_RW_SESSION
+ session = pkcs11.C_OpenSession(slot, flags)
+ pkcs11.C_Login(session, PKCS11::CKU_USER, "1234")
+ ...
+ pkcs11.C_Logout(session)
+ pkcs11.C_CloseSession(session)
+
+Detail information for the API specification is provided by RSA Security Inc.
+Please refer the URL: http://www.rsa.com/rsalabs/node.asp?id=2133.
+
+
+== Cross compiling for mswin32
+
+Using rake-compiler a cross compiled pkcs11-gem can be build on a linux host for
+the win32 platform. There are no runtime dependencies to any but the standard Windows DLLs.
+
+Install mingw32. On a debian based system this should work:
+
+ apt-get install mingw32
+
+On MacOS X, if you have MacPorts installed:
+
+ port install i386-mingw32-gcc
+
+Install the rake-compiler:
+
+ gem install rake-compiler
+
+Download and cross compile ruby for win32:
+
+ rake-compiler cross-ruby VERSION=1.8.6-p287
+
+Download and cross compile pkcs11 for win32:
+
+ rake cross native gem RUBY_CC_VERSION=1.8.6
+
+If everything works, there should be pkcs11-VERSION-x86-mswin32.gem in the pkg
+directory.
+
+
+== ToDo
+
+* unit testing (with mozilla softoken)
+* implement all functions/structs
+* sample code
+
+== Development Status
+
+ STATE FUNCTION NOTE
+ ------ --------------------- ----------------------------------------
+ N/A C_Initialize called in PKCS11#initialize("/path/to/pk11lib")
+ N/A C_Finalize called in GC
+ DONE C_GetInfo
+ N/A C_GetFunctionList internal use only
+ DONE C_GetSlotList
+ DONE C_GetSlotInfo
+ DONE C_GetTokenInfo
+ DONE C_GetMechanismList
+ DONE C_GetMechanismInfo
+ DONE C_InitToken
+ DONE C_InitPIN
+ DONE C_SetPIN
+ DONE C_OpenSession
+ DONE C_CloseSession
+ DONE C_CloseAllSessions
+ DONE C_GetSessionInfo
+ DONE C_GetOperationState
+ DONE C_SetOperationState
+ DONE C_Login
+ DONE C_Logout
+ DONE C_CreateObject
+ N/A C_CopyObject use C_GetAttributeValue and C_CreateObject
+ DONE C_DestroyObject
+ DONE C_GetObjectSize
+ DONE C_GetAttributeValue
+ DONE C_SetAttributeValue
+ DONE C_FindObjectsInit
+ DONE C_FindObjects
+ DONE C_FindObjectsFinal
+ DONE C_EncryptInit
+ DONE C_Encrypt
+ DONE C_EncryptUpdate
+ DONE C_EncryptFinal
+ DONE C_DecryptInit
+ DONE C_Decrypt
+ DONE C_DecryptUpdate
+ DONE C_DecryptFinal
+ DONE C_DigestInit
+ DONE C_Digest
+ DONE C_DigestUpdate
+ DONE C_DigestKey
+ DONE C_DigestFinal
+ DONE C_SignInit
+ DONE C_Sign
+ DONE C_SignUpdate
+ DONE C_SignFinal
+ DONE C_SignRecoverInit
+ DONE C_SignRecover
+ DONE C_VerifyInit
+ DONE C_Verify
+ DONE C_VerifyUpdate
+ DONE C_VerifyFinal
+ DONE C_VerifyRecoverInit
+ DONE C_VerifyRecover
+ DONE C_DigestEncryptUpdate
+ DONE C_DecryptDigestUpdate
+ DONE C_SignEncryptUpdate
+ DONE C_DecryptVerifyUpdate
+ DONE C_GenerateKey
+ DONE C_GenerateKeyPair
+ DONE C_WrapKey
+ DONE C_UnwrapKey
+ DONE C_DeriveKey
+ DONE C_SeedRandom
+ DONE C_GenerateRandom
+ N/A C_GetFunctionStatus legacy function
+ N/A C_CancelFunction legacy function
+ DONE C_WaitForSlotEvent
View
@@ -1,120 +0,0 @@
-= PKCS #11/Ruby Interface
-
-* http://coderepos.org/share/log/lang/ruby/pkcs11-ruby
-
-This module allows Ruby programs to interface with "RSA Security Inc.
-PKCS #11 Cryptographic Token Interface (Cryptoki)".
-You must have the PKCS #11 v2.20 implementation library installed in
-order to use this module.
-
-Right now, this module works on the Unix like operating systems and win32.
-
-== Compilation
-
- rake native gem
-
-== Installation
-
- gem install pkcs11
-
-== Usage
-
-PKCS11.new requires suitable PKCS #11 implementation for your smart-cards.
-
- require "rubygems"
- require "pkcs11"
-
- pkcs11 = PKCS11.new("/path/to/pkcs11.so")
- slots = pkcs11.C_GetSlotList(true)
- slot = slots.first
- info = pkcs11.C_GetSlotInfo(slot)
- p [info.slotDescription, info.manufacturerID,
- info.flags, info.firmwareVersion, info.hardwareVersion]
- flags = PKCS11::CKF_SERIAL_SESSION|PKCS11::CKF_RW_SESSION
- session = pkcs11.C_OpenSession(slot, flags)
- pkcs11.C_Login(session, PKCS11::CKU_USER, "1234")
- ...
- pkcs11.C_Logout(session)
- pkcs11.C_CloseSession(session)
-
-Detail information for the API specification is provided by RSA Security Inc.
-Please refer the URL: http://www.rsa.com/rsalabs/node.asp?id=2133.
-
-== ToDo
-
- * unit testing (with mozilla softoken)
- * implement all functions/structs
- * sample code
-
-== Development Status
-
-STATE FUNCTION NOTE
------- --------------------- ----------------------------------------
-N/A C_Initialize called in PKCS11#initialize("/path/to/pk11lib")
-N/A C_Finalize called in GC
-DONE C_GetInfo
-N/A C_GetFunctionList internal use only
-DONE C_GetSlotList
-DONE C_GetSlotInfo
-DONE C_GetTokenInfo
-DONE C_GetMechanismList
-DONE C_GetMechanismInfo
-DONE C_InitToken
-DONE C_InitPIN
-DONE C_SetPIN
-DONE C_OpenSession
-DONE C_CloseSession
-DONE C_CloseAllSessions
-DONE C_GetSessionInfo
-DONE C_GetOperationState
-DONE C_SetOperationState
-DONE C_Login
-DONE C_Logout
-DONE C_CreateObject
-N/A C_CopyObject use C_GetAttributeValue and C_CreateObject
-DONE C_DestroyObject
-DONE C_GetObjectSize
-DONE C_GetAttributeValue
-DONE C_SetAttributeValue
-DONE C_FindObjectsInit
-DONE C_FindObjects
-DONE C_FindObjectsFinal
-DONE C_EncryptInit
-DONE C_Encrypt
-DONE C_EncryptUpdate
-DONE C_EncryptFinal
-DONE C_DecryptInit
-DONE C_Decrypt
-DONE C_DecryptUpdate
-DONE C_DecryptFinal
-DONE C_DigestInit
-DONE C_Digest
-DONE C_DigestUpdate
-DONE C_DigestKey
-DONE C_DigestFinal
-DONE C_SignInit
-DONE C_Sign
-DONE C_SignUpdate
-DONE C_SignFinal
-DONE C_SignRecoverInit
-DONE C_SignRecover
-DONE C_VerifyInit
-DONE C_Verify
-DONE C_VerifyUpdate
-DONE C_VerifyFinal
-DONE C_VerifyRecoverInit
-DONE C_VerifyRecover
-DONE C_DigestEncryptUpdate
-DONE C_DecryptDigestUpdate
-DONE C_SignEncryptUpdate
-DONE C_DecryptVerifyUpdate
-DONE C_GenerateKey
-DONE C_GenerateKeyPair
-DONE C_WrapKey
-DONE C_UnwrapKey
-DONE C_DeriveKey
-DONE C_SeedRandom
-DONE C_GenerateRandom
-N/A C_GetFunctionStatus legacy function
-N/A C_CancelFunction legacy function
-DONE C_WaitForSlotEvent
View
@@ -9,8 +9,9 @@ hoe = Hoe.spec 'pkcs11' do
developer('Ryosuke Kutsuna', 'ryosuke@deer-n-horse.jp')
developer('GOTOU Yuuzou', 'gotoyuzo@notwork.org')
developer('Lars Kanis', 'kanis@comcard.de')
-
- require_paths = ['lib']
+
+ self.readme_file = 'README.rdoc'
+ self.extra_rdoc_files << self.readme_file
end
Rake::ExtensionTask.new('pkcs11', hoe.spec) do |ext|

0 comments on commit 9713aa5

Please sign in to comment.