예제 #1
0
        /// <summary>
        /// Obtains information about a particular slot in the system
        /// </summary>
        /// <returns>Slot information</returns>
        public SlotInfo GetSlotInfo()
        {
            CK_SLOT_INFO slotInfo = new CK_SLOT_INFO();
            CKR          rv       = _p11.C_GetSlotInfo(_slotId, ref slotInfo);

            if (rv != CKR.CKR_OK)
            {
                throw new Pkcs11Exception("C_GetSlotInfo", rv);
            }

            return(new SlotInfo(_slotId, slotInfo));
        }
예제 #2
0
        /// <summary>
        /// Obtains information about a particular slot in the system
        /// </summary>
        /// <returns>Slot information</returns>
        public ISlotInfo GetSlotInfo()
        {
            _logger.Debug("Slot({0})::GetSlotInfo", _slotId);

            CK_SLOT_INFO slotInfo = new CK_SLOT_INFO();
            CKR          rv       = _p11.C_GetSlotInfo(_slotId, ref slotInfo);

            if (rv != CKR.CKR_OK)
            {
                throw new Pkcs11Exception("C_GetSlotInfo", rv);
            }

            return(new SlotInfo(_slotId, slotInfo));
        }