pingzhenyu wrote:
> 
> look at the programm in the pkcs11.h
> 
> suppose:
> 
> First opensession
> slot->sessionIDCount=1
> slot->index=2
> 
> [sessionID = (PR_AtomicIncrement(&slot->sessionIDCount) & 0xffffff)
>                         | (slot->index << 24);]
> sessionID=?(0x02000002)
> 
> Second opensession
> 
> sessionID=?(0x02000003)

What's your question?  


Rather that quoting a lot of code that's already available on public web
servers, please cite the URL, e.g. 

http://lxr.mozilla.org/mozilla/source/security/nss/lib/softoken/pkcs11.c#3056

and 

http://lxr.mozilla.org/mozilla/source/security/nss/lib/softoken/pkcs11i.h#450

Do you have a question about this code?  
It seems to be working as intended in the examples you gave above.


--
Nelson Bolyard              
Disclaimer:                  I speak for myself, not for Netscape

Reply via email to