         public var kSecAttrIsPermanent : Bool? // NSNumber bool
         private let kSecAttrIsPermanentKey = "perm"
         private func kSecAttrIsPermanentAddToDic(dic : NSMutableDictionary) {
-            if kSecAttrIsPermanent {
+            if (kSecAttrIsPermanent != nil && kSecAttrIsPermanent!) {
                 dic.setObject(NSNumber(bool: true), forKey: kSecAttrIsPermanentKey)
             }
         }

        public var kSecAttrCanSign : Bool? // NSNumber
        private let kSecAttrCanSignKey = "sign" 
        private func kSecAttrCanSignAddToDic(dic : NSMutableDictionary) {
            if kSecAttrCanSign {
                dic.setObject(NSNumber(bool: true), forKey: kSecAttrCanSignKey)
            }
        }

        public var kSecAttrCanUnwrap : Bool? // NSNumber
        private let kSecAttrCanUnwrapKey = "unwp" 
        private func kSecAttrCanUnwrapAddToDic(dic : NSMutableDictionary) {
            if (kSecAttrCanUnwrap != nil && kSecAttrCanUnwrap!) {
                dic.setObject(NSNumber(bool: true), forKey: kSecAttrCanUnwrapKey)
            }
        }
