示例#1
0
        public override void ReadAttributes(Session session)
        {
            base.ReadAttributes(session);

            trusted_ = ReadAttribute(session, HObj, new BooleanAttribute(CKA.TRUSTED));

            certificateType_ = ReadAttribute(session, HObj, new CertificateTypeAttribute());
        }
示例#2
0
        public override void ReadAttributes(Session session)
        {
            base.ReadAttributes(session);

            subject       = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.SUBJECT));
            encrypt       = ReadAttribute(session, HObj, new BooleanAttribute(CKA.ENCRYPT));
            verify        = ReadAttribute(session, HObj, new BooleanAttribute(CKA.VERIFY));
            verifyRecover = ReadAttribute(session, HObj, new BooleanAttribute(CKA.VERIFY_RECOVER));
            wrap          = ReadAttribute(session, HObj, new BooleanAttribute(CKA.WRAP));
            trusted       = ReadAttribute(session, HObj, new BooleanAttribute(CKA.TRUSTED));
        }
示例#3
0
        public override void ReadAttributes(Session session)
        {
            base.ReadAttributes(session);

            token_ = ReadAttribute(session, HObj, new BooleanAttribute(CKA.TOKEN));

            private_ = ReadAttribute(session, HObj, new BooleanAttribute(CKA.PRIVATE));

            modifiable_ = ReadAttribute(session, HObj, new BooleanAttribute(CKA.MODIFIABLE));

            label_ = ReadAttribute(session, HObj, new CharArrayAttribute(CKA.LABEL));
        }
示例#4
0
        public override void ReadAttributes(Session session)
        {
            base.ReadAttributes(session);

            subject            = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.SUBJECT));
            sensitive          = ReadAttribute(session, HObj, new BooleanAttribute(CKA.SENSITIVE));
            decrypt            = ReadAttribute(session, HObj, new BooleanAttribute(CKA.DECRYPT));
            sign               = ReadAttribute(session, HObj, new BooleanAttribute(CKA.SIGN));
            signRecover        = ReadAttribute(session, HObj, new BooleanAttribute(CKA.SIGN_RECOVER));
            unWrap             = ReadAttribute(session, HObj, new BooleanAttribute(CKA.UNWRAP));
            extractable        = ReadAttribute(session, HObj, new BooleanAttribute(CKA.EXTRACTABLE));
            alwaysSensitive    = ReadAttribute(session, HObj, new BooleanAttribute(CKA.ALWAYS_SENSITIVE));
            neverExtractable   = ReadAttribute(session, HObj, new BooleanAttribute(CKA.NEVER_EXTRACTABLE));
            wrapWithTrusted    = ReadAttribute(session, HObj, new BooleanAttribute(CKA.WRAP_WITH_TRUSTED));
            alwaysAuthenticate = ReadAttribute(session, HObj, new BooleanAttribute(CKA.ALWAYS_AUTHENTICATE));
        }
示例#5
0
        public override void ReadAttributes(Session session)
        {
            base.ReadAttributes(session);

            keyType = ReadAttribute(session, HObj, new KeyTypeAttribute());

            id = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.ID));

            startDate = ReadAttribute(session, HObj, new DateAttribute((uint)CKA.START_DATE));

            endDate = ReadAttribute(session, HObj, new DateAttribute((uint)CKA.END_DATE));

            derive = ReadAttribute(session, HObj, new BooleanAttribute(CKA.DERIVE));

            local = ReadAttribute(session, HObj, new BooleanAttribute(CKA.LOCAL));

            keyGenMechanism = ReadAttribute(session, HObj, new MechanismTypeAttribute(CKA.KEY_GEN_MECHANISM));
        }
示例#6
0
        public override void ReadAttributes(Session session)
        {
            base.ReadAttributes(session);

            subject    = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.SUBJECT));
            checkValue = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.CHECK_VALUE));

            this.sensitive        = ReadAttribute(session, HObj, new BooleanAttribute(CKA.SENSITIVE));
            this.decrypt          = ReadAttribute(session, HObj, new BooleanAttribute(CKA.DECRYPT));
            this.encrypt          = ReadAttribute(session, HObj, new BooleanAttribute(CKA.ENCRYPT));
            this.sign             = ReadAttribute(session, HObj, new BooleanAttribute(CKA.SIGN));
            this.verify           = ReadAttribute(session, HObj, new BooleanAttribute(CKA.VERIFY));
            this.wrap             = ReadAttribute(session, HObj, new BooleanAttribute(CKA.WRAP));
            this.unwrap           = ReadAttribute(session, HObj, new BooleanAttribute(CKA.UNWRAP));
            this.extractable      = ReadAttribute(session, HObj, new BooleanAttribute(CKA.EXTRACTABLE));
            this.alwaysSensitive  = ReadAttribute(session, HObj, new BooleanAttribute(CKA.ALWAYS_SENSITIVE));
            this.neverExtractable = ReadAttribute(session, HObj, new BooleanAttribute(CKA.NEVER_EXTRACTABLE));
            this.wrapWithTrusted  = ReadAttribute(session, HObj, new BooleanAttribute(CKA.WRAP_WITH_TRUSTED));
            this.trusted          = ReadAttribute(session, HObj, new BooleanAttribute(CKA.TRUSTED));
        }
示例#7
0
 public static BooleanAttribute ReadAttribute(Session session, uint hObj, BooleanAttribute attr)
 {
     return((BooleanAttribute)GetAttribute(session, hObj, attr));
 }