Skip to content

Add HD DVD AACS support#939

Open
FakeShemp wants to merge 2 commits into
develfrom
fakeshemp/hddvd-aacs
Open

Add HD DVD AACS support#939
FakeShemp wants to merge 2 commits into
develfrom
fakeshemp/hddvd-aacs

Conversation

@FakeShemp

Copy link
Copy Markdown
Contributor

Types of changes

Resolves #931

Decrypt video HD DVDs with AACS.

There are apparently also audio HD DVDs with a slightly different AACS pipeline, but I have none to test with.

Also adapt the media type handling a bit on zzzRawImage as HD DVDs were never detected. It still only detects video HD DVDs, but there wasn't much other use for them anyway.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • New filesystem, test images in [url]
  • New media image, test images in [url]
  • New partition scheme, test images in [url]
  • Breaking change (fix or feature that would cause existing functionality to change)
  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.


while(doneSectors < trackSectors)
{
if(aborted)
Comment thread Aaru.Core/Image/Convert/AACS/AacsHddvdExtentResolver.cs Fixed
Comment thread Aaru.Core/Image/Convert/AACS/AacsHddvdExtentResolver.cs Fixed
Comment thread Aaru.Core/Image/Convert/AACS/AacsKeyResolver.cs Fixed
Comment thread Aaru.Core/Image/Convert/AACS/AacsKeyResolver.cs Fixed
Comment on lines +323 to +367
foreach(IReadOnlyFilesystem rofs in plugins.Filesystems.Values.OfType<IReadOnlyFilesystem>())
{
if(!rofs.Identify(image, partition))
continue;

if(rofs.Mount(image, partition, encoding, null, null) != ErrorNumber.NoError)
continue;

try
{
foreach(string path in HddvdTkfPaths)
{
if(TryReadFileFromFs(rofs, path, out fileBytes))
return true;
}

if(rofs.OpenDir("AACS", out IDirNode? dirNode) == ErrorNumber.NoError && dirNode is not null)
{
try
{
while(true)
{
ErrorNumber errno = rofs.ReadDir(dirNode, out string? filename);

if(errno != ErrorNumber.NoError || filename is null)
break;

if(!IsTkfFilename(filename))
continue;

if(TryReadFileFromFs(rofs, "AACS/" + filename, out fileBytes))
return true;
}
}
finally
{
rofs.CloseDir(dirNode);
}
}
}
finally
{
rofs.Unmount();
}
}
Comment on lines +333 to +337
foreach(string path in HddvdTkfPaths)
{
if(TryReadFileFromFs(rofs, path, out fileBytes))
return true;
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this one would work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Decryption] Handle AACS on HD DVD

1 participant