forked from log2timeline/dfvfs
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added encrypted APFS support log2timeline#314
- Loading branch information
1 parent
236a321
commit 27fec2e
Showing
18 changed files
with
469 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
"""Imports for the credential manager.""" | ||
|
||
from dfvfs.credentials import apfs_credentials | ||
from dfvfs.credentials import bde_credentials | ||
from dfvfs.credentials import encrypted_stream_credentials | ||
from dfvfs.credentials import fvde_credentials |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
"""The Apple File System (APFS) credentials.""" | ||
|
||
from __future__ import unicode_literals | ||
|
||
from dfvfs.credentials import credentials | ||
from dfvfs.credentials import manager | ||
from dfvfs.lib import definitions | ||
|
||
|
||
class APFSCredentials(credentials.Credentials): | ||
"""Apple File System (APFS) credentials.""" | ||
|
||
# TODO: add support for key_data credential, needs pyfsapfs update. | ||
CREDENTIALS = frozenset(['password', 'recovery_password']) | ||
|
||
TYPE_INDICATOR = definitions.TYPE_INDICATOR_APFS | ||
|
||
|
||
manager.CredentialsManager.RegisterCredentials(APFSCredentials()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
"""Tests for the Apple File System (APFS) credentials.""" | ||
|
||
from __future__ import unicode_literals | ||
|
||
import unittest | ||
|
||
from dfvfs.credentials import apfs_credentials | ||
|
||
from tests import test_lib as shared_test_lib | ||
|
||
|
||
class APFSCredentials(shared_test_lib.BaseTestCase): | ||
"""Tests the Apple File System (APFS) credentials.""" | ||
|
||
def testInitialize(self): | ||
"""Tests the __init__ function.""" | ||
test_credentials = apfs_credentials.APFSCredentials() | ||
self.assertIsNotNone(test_credentials) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
"""Tests for the BitLocker Drive Encryption (BDE) credentials.""" | ||
|
||
from __future__ import unicode_literals | ||
|
||
import unittest | ||
|
||
from dfvfs.credentials import bde_credentials | ||
|
||
from tests import test_lib as shared_test_lib | ||
|
||
|
||
class BDECredentials(shared_test_lib.BaseTestCase): | ||
"""Tests the BitLocker Drive Encryption (BDE) credentials.""" | ||
|
||
def testInitialize(self): | ||
"""Tests the __init__ function.""" | ||
test_credentials = bde_credentials.BDECredentials() | ||
self.assertIsNotNone(test_credentials) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
"""Tests for the credentials interface.""" | ||
|
||
from __future__ import unicode_literals | ||
|
||
import unittest | ||
|
||
from dfvfs.credentials import credentials | ||
|
||
from tests import test_lib as shared_test_lib | ||
|
||
|
||
class Credentials(shared_test_lib.BaseTestCase): | ||
"""Tests the credentials interface.""" | ||
|
||
def testInitialize(self): | ||
"""Tests the __init__ function.""" | ||
test_credentials = credentials.Credentials() | ||
self.assertIsNotNone(test_credentials) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
"""Tests for the encrypted stream credentials.""" | ||
|
||
from __future__ import unicode_literals | ||
|
||
import unittest | ||
|
||
from dfvfs.credentials import encrypted_stream_credentials | ||
|
||
from tests import test_lib as shared_test_lib | ||
|
||
|
||
class APFSCredentials(shared_test_lib.BaseTestCase): | ||
"""Tests the encrypted stream credentials.""" | ||
|
||
def testInitialize(self): | ||
"""Tests the __init__ function.""" | ||
test_credentials = encrypted_stream_credentials.EncryptedStreamCredentials() | ||
self.assertIsNotNone(test_credentials) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
"""Tests for the FileVault Drive Encryption (FVDE) credentials.""" | ||
|
||
from __future__ import unicode_literals | ||
|
||
import unittest | ||
|
||
from dfvfs.credentials import fvde_credentials | ||
|
||
from tests import test_lib as shared_test_lib | ||
|
||
|
||
class FVDECredentials(shared_test_lib.BaseTestCase): | ||
"""Tests the FileVault Drive Encryption (FVDE) credentials.""" | ||
|
||
def testInitialize(self): | ||
"""Tests the __init__ function.""" | ||
test_credentials = fvde_credentials.FVDECredentials() | ||
self.assertIsNotNone(test_credentials) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.