shithub: libdvdcss

Download patch

ref: 45abd81482068bfbccedc7a4eb5a555819cd443b
parent: 95671de3719a6b0943d7c86766e29c5646d191d8
author: Christophe Massiot <[email protected]>
date: Thu Oct 10 17:40:41 EDT 2002

* Bumped up version number to 1.2.3 (soleil !).
* Updated Changelog.
* Merged in hh's patch for broken DVD drives/kernel/whatever.


--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,21 @@
 # ChangeLog for libdvdcss #
 #=========================#
 
+1.2.3
+**
+
+  * ./src/Makefile.am: -no-undefined is now only used under BeOS because it
+    causes the Win32 compilation to fail.
+  * ./configure.in, src/Makefile.am: used AM_CONDITIONAL to conditionally
+    build the BSDi stuff.
+  * src/css.c, src/device.c, src/ioctl.[ch]: We don't need to be in
+    administrator mode anymore to authenticate the drive on Windows
+    NT/2k/XP. As a result any user can now play a DVD on these OS's
+  * src/ioctl.c: fixed ioctl_ReadTitleKey which wasn't working on Windows
+    NT/2k/XP.
+  * src/css.c: Workaround for a bug in the drive/kernel/ide chipset or
+    whatever which makes disc key decryption fail.
+
 1.2.2
 Sat, 10 Aug 2002 22:15:57 +0200
 
--- a/configure.in
+++ b/configure.in
@@ -2,7 +2,7 @@
 
 AC_CANONICAL_SYSTEM
 
-AM_INIT_AUTOMAKE(libdvdcss, 1.2.2)
+AM_INIT_AUTOMAKE(libdvdcss, 1.2.3)
 AM_CONFIG_HEADER(src/config.h)
 
 AC_PROG_CC
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -1,4 +1,4 @@
-/* src/config.h.in.  Generated from configure.in by autoheader.  */
+/* src/config.h.in.  Generated automatically from configure.in by autoheader.  */
 
 /* Have IOKit DVD IOCTL headers */
 #undef DARWIN_DVD_IOCTL
@@ -21,61 +21,58 @@
 /* Define if FreeBSD-like dvd_struct is defined. */
 #undef HAVE_BSD_DVD_STRUCT
 
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the <dvd.h> header file. */
+/* Define if you have the <dvd.h> header file. */
 #undef HAVE_DVD_H
 
-/* Define to 1 if you have the <inttypes.h> header file. */
+/* Define if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
-/* Define to 1 if you have the <linux/cdrom.h> header file. */
+/* Define if you have the <linux/cdrom.h> header file. */
 #undef HAVE_LINUX_CDROM_H
 
 /* Define if Linux-like dvd_struct is defined. */
 #undef HAVE_LINUX_DVD_STRUCT
 
-/* Define to 1 if you have the <memory.h> header file. */
+/* Define if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
 
 /* Define if OpenBSD-like dvd_struct is defined. */
 #undef HAVE_OPENBSD_DVD_STRUCT
 
-/* Define to 1 if you have the <stdint.h> header file. */
+/* Define if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
-/* Define to 1 if you have the <stdlib.h> header file. */
+/* Define if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
-/* Define to 1 if you have the <strings.h> header file. */
+/* Define if you have the <strings.h> header file. */
 #undef HAVE_STRINGS_H
 
-/* Define to 1 if you have the <string.h> header file. */
+/* Define if you have the <string.h> header file. */
 #undef HAVE_STRING_H
 
-/* Define to 1 if you have the <sys/cdio.h> header file. */
+/* Define if you have the <sys/cdio.h> header file. */
 #undef HAVE_SYS_CDIO_H
 
-/* Define to 1 if you have the <sys/dvdio.h> header file. */
+/* Define if you have the <sys/dvdio.h> header file. */
 #undef HAVE_SYS_DVDIO_H
 
-/* Define to 1 if you have the <sys/ioctl.h> header file. */
+/* Define if you have the <sys/ioctl.h> header file. */
 #undef HAVE_SYS_IOCTL_H
 
-/* Define to 1 if you have the <sys/stat.h> header file. */
+/* Define if you have the <sys/stat.h> header file. */
 #undef HAVE_SYS_STAT_H
 
-/* Define to 1 if you have the <sys/types.h> header file. */
+/* Define if you have the <sys/types.h> header file. */
 #undef HAVE_SYS_TYPES_H
 
-/* Define to 1 if you have the <unistd.h> header file. */
+/* Define if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
-/* Define to 1 if you have the <winioctl.h> header file. */
+/* Define if you have the <winioctl.h> header file. */
 #undef HAVE_WINIOCTL_H
 
-/* Define to 1 if you have the </sys/dev/scsi/scsi_ioctl.h> header file. */
+/* Define if you have the </sys/dev/scsi/scsi_ioctl.h> header file. */
 #undef HAVE__SYS_DEV_SCSI_SCSI_IOCTL_H
 
 /* Define if <sys/scsi.h> defines sctl_io. */
@@ -84,25 +81,10 @@
 /* Name of package */
 #undef PACKAGE
 
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
 /* Have userspace SCSI headers. */
 #undef SOLARIS_USCSI
 
-/* Define to 1 if you have the ANSI C header files. */
+/* Define if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
 /* Have a BeOS system. */
--- a/src/css.c
+++ b/src/css.c
@@ -2,7 +2,7 @@
  * css.c: Functions for DVD authentication and descrambling
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: css.c,v 1.16 2002/10/10 12:44:28 gbazin Exp $
+ * $Id: css.c,v 1.17 2002/10/10 21:40:41 massiot Exp $
  *
  * Author: St�phane Borel <[email protected]>
  *         H�kan Hjort <[email protected]>
@@ -391,9 +391,12 @@
                 break;
             }
             _dvdcss_debug( dvdcss, "failed to decrypt the disc key, "
-                                   "trying to crack it instead" );
+                                   "faulty drive/kernel? "
+                                   "cracking title keys instead" );
 
-            /* Fallback */
+            /* Fallback, but not to DISC as the disc key might be faulty */
+            dvdcss->i_method = DVDCSS_METHOD_TITLE;
+            break;
 
         case DVDCSS_METHOD_DISC:
 
@@ -407,6 +410,7 @@
                 break;
             }
             _dvdcss_debug( dvdcss, "failed to crack the disc key" );
+            memset( p_disc_key, 0, KEY_SIZE );
             dvdcss->i_method = DVDCSS_METHOD_TITLE;
             break;
 
@@ -942,7 +946,7 @@
             DecryptKey( 0, p_disc_key, p_struct_disckey, p_verify );
 
             /* If the position / player key pair worked then return. */
-            if( memcmp( p_disc_key, p_verify, 5 ) == 0 )
+            if( memcmp( p_disc_key, p_verify, KEY_SIZE ) == 0 )
             {
                 return 0;
             }
@@ -952,6 +956,7 @@
 
     /* Have tried all combinations of positions and keys, 
      * and we still didn't succeed. */
+    memset( p_disc_key, 0, KEY_SIZE );
     return -1;
 }