Ejemplo n.º 1
0
        /// <summary>
        /// Gets general information about loaded PKCS#11 library
        /// </summary>
        /// <returns>General information about loaded PKCS#11 library</returns>
        public LibraryInfo GetInfo()
        {
            if (this._disposed)
            {
                throw new ObjectDisposedException(this.GetType().FullName);
            }

            CK_INFO info = new CK_INFO();
            CKR     rv   = _p11.C_GetInfo(ref info);

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

            return(new LibraryInfo(info));
        }