Restricting Content by License / Code I'm working on migrating a custom coded site over to Drupal and am having trouble with one piece of functionality. 

Currently, if a user wants to download a certain file, they have to enter a serial number into a form. That serial is compared to a list of serials in the db. If the serial matches, the end user can download the file.

Is there any way to create this same type of functionality? I'm willing to use any Commerce add-on, as Commerce will be used for other products.
Take a look Commerce File &amp; its dependency Commerce License. These module enable a licensing product functionality tied to some sort of digital file. This will get you a good way there, but you'll probably add extra features for your particular use (e.g. some sort serial code validation before displaying the download link).