 
         // We should no longer be able to access the keychain item via the ref.
         let queryWithVulnerableReferenceAndAttributes = [
-            kSecValuePersistentRef as String: vulnerableValueRef,
+            kSecValueWorkingReference as String: vulnerableValueRef,
             kSecReturnAttributes as String: true
             ] as CFDictionary
         XCTAssertEqual(SecItemCopyMatching(queryWithVulnerableReferenceAndAttributes, nil), errSecItemNotFound)

        XCTAssertTrue(valet.containsObject(forKey: vulnKey))

        // Obtain a reference to the vulnerable keychain entry.
        query[kSecReturnPersistentRef as String] = true
        query[kSecReturnAttributes as String] = true
        var vulnerableEntryReference: CFTypeRef?
        XCTAssertEqual(SecItemCopyMatching(query as CFDictionary, &vulnerableEntryReference), errSecSuccess)

        var trustedAppSelf: SecTrustedApplication?
        var trustedAppSystemUIServer: SecTrustedApplication?

        let kSecReturnWorkingReference: CFString
        let kSecValueWorkingReference: CFString
        if #available(macOS 10.15, *) {
            // macOS Catalina requires a persistent ref to pass this test.
            kSecReturnWorkingReference = kSecReturnPersistentRef
            kSecValueWorkingReference = kSecValuePersistentRef
        } else {
            kSecReturnWorkingReference = kSecReturnRef
            kSecValueWorkingReference = kSecValueRef
        }

        XCTAssertEqual(SecTrustedApplicationCreateFromPath(nil, &trustedAppSelf), errSecSuccess)
        XCTAssertEqual(SecTrustedApplicationCreateFromPath("/System/Library/CoreServices/SystemUIServer.app", &trustedAppSystemUIServer), errSecSuccess);
        let trustedList = [trustedAppSelf!, trustedAppSystemUIServer!] as NSArray?
