Projects
Essentials
libaacs
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 3
View file
libaacs.changes
Changed
@@ -1,4 +1,36 @@ ------------------------------------------------------------------- +Sat Mar 16 11:20:34 UTC 2013 - obs@botter.cc + +- update to 0.6.0 + * Added reading of PMSN (Pre-recorded Media Serial Number) + * Fix resource leak + * Use proper paths to search for keydb and friends on Darwin. + * Build fixes and improvements + +- 0.5.0 + * Support for Mac OS X using IOKit + * Fix AACS detection failure in some Win32 systems + +- 0.4.0 + * Added aacs_open2() and error codes + * Renamed libaacs_test to aacs_info + * Added aacs_get_mkb_version() + * Fixed memory leaks + * Fixed buffer overflow + * Added revocation list caching + * Check host certificates against latest seen revocation list + +- 0.3.1 + * Added configure option for libgcrypt prefix + * Fixed building Win32 DLL + * Fixed segfault when mount point path can't be resolved + * Do not export internal symbols from generated parser/lexer + * Do not distribute generated parser files + * Check for libgpg-error. Link against it when needed. + * Distribute README.txt + * Added ChangeLog + +------------------------------------------------------------------- Sat Dec 3 22:54:44 UTC 2011 - pascal.bleser@opensuse.org - update to 0.3.0 (first proper release)
View file
libaacs.spec
Changed
@@ -19,13 +19,14 @@ Name: libaacs -Version: 0.3.0 +Version: 0.6.0 Release: 1.1 License: LGPL-2.1+ Summary: Open implentation of AACS specification Url: http://www.videolan.org/developers/libaacs.html Group: System/Libraries Source: ftp://ftp.videolan.org/pub/videolan/libaacs/%{version}/libaacs-%{version}.tar.bz2 +Patch0: libaacs-0.6.0-bison-2.3-compatibility.patch BuildRequires: bison BuildRequires: flex BuildRequires: libgcrypt-devel @@ -56,6 +57,9 @@ %prep %setup -q +%if 0%{?suse_version} < 1140 +%patch0 -p1 +%endif %build ./bootstrap @@ -76,6 +80,7 @@ %files -n libaacs0 %defattr(-, root, root) %doc COPYING +%{_bindir}/aacs_info %{_libdir}/libaacs.so.0 %{_libdir}/libaacs.so.0.*
View file
libaacs-0.6.0-bison-2.3-compatibility.patch
Added
@@ -0,0 +1,24 @@ +diff -Naur libaacs-0.6.0.orig/src/file/keydbcfg-parser.y libaacs-0.6.0/src/file/keydbcfg-parser.y +--- libaacs-0.6.0.orig/src/file/keydbcfg-parser.y 2013-03-04 14:10:01.000000000 +0100 ++++ libaacs-0.6.0/src/file/keydbcfg-parser.y 2013-03-16 13:46:58.074135067 +0100 +@@ -1,8 +1,8 @@ +-%code requires { ++%{ + #include "file/keydbcfg.h" +-} ++%} + +-%code { ++%{ + /* + * This file is part of libaacs + * Copyright (C) 2010 gates +@@ -87,7 +87,7 @@ + + /* uncomment the line below for debugging */ + // int yydebug = 1; +-} ++%} + /* Options set to generate a reentrant parser that is POSIX yacc compatible + * The basic 'scanner' parameters are set. Also, another parameter is set + * to pass in a title entry list struct used to hold all title entries.
View file
libaacs-0.3.0.tar.bz2/src/examples/libaacs_test.c
Deleted
@@ -1,64 +0,0 @@ -/* - * This file is part of libaacs - * Copyright (C) 2010 npzacs - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see - * <http://www.gnu.org/licenses/>. - */ - -#include "libaacs/aacs.h" - -#include <stdio.h> -#include <stdlib.h> - -static const char *_hex2str(const uint8_t *s, unsigned n) -{ - static const char hex = "0123456789ABCDEF"; - static char *str = NULL; - - unsigned ii; - - str = realloc(str, n*2 + 1); - for (ii = 0; ii < n; ii++) { - str2*ii = hex sii >> 4; - str2*ii + 1 = hex sii & 0x07; - } - strii = 0; - - return str; -} - -int main (int argc, char **argv) -{ - if (argc < 2) { - fprintf(stderr, "Usage: %s <path-to-disc-root> <path-to-config-file>\n", argv0); - exit(EXIT_FAILURE); - } - - AACS *aacs = aacs_open(argv1, argc > 2 ? argv2 : NULL); - - if (!aacs) { - fprintf(stderr, "libaacs open failed.\n"); - exit(EXIT_FAILURE); - } - - printf("libaacs open succeed.\n"); - - const uint8_t *vid = aacs_get_vid(aacs); - printf("VID: %s\n", vid ? _hex2str(vid, 20) : "???"); - - aacs_close(aacs); - - return EXIT_SUCCESS; -}
View file
libaacs-0.3.0.tar.bz2/src/keydbcfg-parser.h
Deleted
@@ -1,119 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.5. */ - -/* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - HEXSTRING = 258, - DISC_TITLE = 259, - DIGIT = 260, - KEYWORD_DEVICE_KEY = 261, - KEYWORD_DEVICE_NODE = 262, - KEYWORD_HOST_PRIV_KEY = 263, - KEYWORD_HOST_CERT = 264, - KEYWORD_HOST_NONCE = 265, - KEYWORD_HOST_KEY_POINT = 266, - PUNCT_EQUALS_SIGN = 267, - PUNCT_VERTICAL_BAR = 268, - PUNCT_HYPHEN = 269, - ENTRY_ID_DK = 270, - ENTRY_ID_PK = 271, - ENTRY_ID_HC = 272, - ENTRY_ID_DATE = 273, - ENTRY_ID_MEK = 274, - ENTRY_ID_VID = 275, - ENTRY_ID_BN = 276, - ENTRY_ID_VUK = 277, - ENTRY_ID_PAK = 278, - ENTRY_ID_TK = 279, - ENTRY_ID_UK = 280, - NEWLINE = 281, - BAD_ENTRY = 282 - }; -#endif -/* Tokens. */ -#define HEXSTRING 258 -#define DISC_TITLE 259 -#define DIGIT 260 -#define KEYWORD_DEVICE_KEY 261 -#define KEYWORD_DEVICE_NODE 262 -#define KEYWORD_HOST_PRIV_KEY 263 -#define KEYWORD_HOST_CERT 264 -#define KEYWORD_HOST_NONCE 265 -#define KEYWORD_HOST_KEY_POINT 266 -#define PUNCT_EQUALS_SIGN 267 -#define PUNCT_VERTICAL_BAR 268 -#define PUNCT_HYPHEN 269 -#define ENTRY_ID_DK 270 -#define ENTRY_ID_PK 271 -#define ENTRY_ID_HC 272 -#define ENTRY_ID_DATE 273 -#define ENTRY_ID_MEK 274 -#define ENTRY_ID_VID 275 -#define ENTRY_ID_BN 276 -#define ENTRY_ID_VUK 277 -#define ENTRY_ID_PAK 278 -#define ENTRY_ID_TK 279 -#define ENTRY_ID_UK 280 -#define NEWLINE 281 -#define BAD_ENTRY 282 - - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ - -/* Line 2068 of yacc.c */ -#line 106 "keydbcfg-parser.y" - - char *string; - unsigned int digit; - - - -/* Line 2068 of yacc.c */ -#line 111 "keydbcfg-parser.h" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - - - -
View file
libaacs-0.6.0.tar.bz2/ChangeLog
Added
@@ -0,0 +1,31 @@ +2013-03-04: Version 0.6.0 + - Added reading of PMSN (Pre-recorded Media Serial Number) + - Fix resource leak + - Use proper paths to search for keydb and friends on Darwin. + - Build fixes and improvements + +2012-08-17: Version 0.5.0 + - Support for Mac OS X using IOKit + - Fix AACS detection failure in some Win32 systems + +2012-05-07: Version 0.4.0 + - Added aacs_open2() and error codes + - Renamed libaacs_test to aacs_info + - Added aacs_get_mkb_version() + - Fixed memory leaks + - Fixed buffer overflow + - Added revocation list caching + - Check host certificates against latest seen revocation list + +2012-03-21: Version 0.3.1 + - Added configure option for libgcrypt prefix + - Fixed building Win32 DLL + - Fixed segfault when mount point path can't be resolved + - Do not export internal symbols from generated parser/lexer + - Do not distribute generated parser files + - Check for libgpg-error. Link against it when needed. + - Distribute README.txt + - Added ChangeLog + +2011-11-30: Version 0.3.0 + - First release
View file
libaacs-0.3.0.tar.bz2/Makefile.am -> libaacs-0.6.0.tar.bz2/Makefile.am
Changed
@@ -1,12 +1,8 @@ -SUBDIRS=src +SUBDIRS=src src/examples ACLOCAL_AMFLAGS=-I m4 -EXTRA_DIST=bootstrap COPYING KEYDB.cfg - -AUTOMAKE_OPTIONS = \ - dist-bzip2 \ - no-dist-gzip +EXTRA_DIST=bootstrap COPYING KEYDB.cfg README.txt ChangeLog clean-lex-yacc: $(MAKE) -C src $@
View file
libaacs-0.3.0.tar.bz2/Makefile.in -> libaacs-0.6.0.tar.bz2/Makefile.in
Changed
@@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -38,15 +38,15 @@ DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure \ - $(top_srcdir)/src/libaacs/aacs-version.h.in COPYING \ + $(top_srcdir)/src/libaacs/aacs-version.h.in COPYING ChangeLog \ build-aux/config.guess build-aux/config.sub build-aux/depcomp \ build-aux/install-sh build-aux/ltmain.sh build-aux/missing \ build-aux/ylwrap ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/attributes.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ @@ -76,9 +76,11 @@ distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi am__relativize = \ dir0=`pwd`; \ sed_first='s,^\(^/*\)/.*$$,\1,'; \ @@ -107,6 +109,8 @@ GZIP_ENV = --best DIST_ARCHIVES = $(distdir).tar.bz2 distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print AACS_VERSION_MAJOR = @AACS_VERSION_MAJOR@ AACS_VERSION_MICRO = @AACS_VERSION_MICRO@ @@ -114,6 +118,7 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ +AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -176,10 +181,8 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ -SET_DEBUG_OPTS = @SET_DEBUG_OPTS@ +SET_FEATURES = @SET_FEATURES@ SET_MAKE = @SET_MAKE@ -SET_OPTIMIZATIONS = @SET_OPTIMIZATIONS@ -SET_WARNINGS = @SET_WARNINGS@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ @@ -241,18 +244,14 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = src +SUBDIRS = src src/examples ACLOCAL_AMFLAGS = -I m4 -EXTRA_DIST = bootstrap COPYING KEYDB.cfg -AUTOMAKE_OPTIONS = \ - dist-bzip2 \ - no-dist-gzip - +EXTRA_DIST = bootstrap COPYING KEYDB.cfg README.txt ChangeLog all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ @@ -288,10 +287,8 @@ $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -521,7 +518,11 @@ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir @@ -529,7 +530,7 @@ $(am__remove_distdir) dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir @@ -546,7 +547,7 @@ $(am__remove_distdir) dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then @@ -560,6 +561,8 @@ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ @@ -579,6 +582,7 @@ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ @@ -607,8 +611,16 @@ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -639,10 +651,15 @@ installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic:
View file
libaacs-0.6.0.tar.bz2/README.txt
Added
@@ -0,0 +1,30 @@ +Disclaimer +---------- + +This library is written for the purpose of playing Blu-ray movies. It is +intended for software that want to support Blu-ray playback (such as VLC and +MPlayer). We, the authors of this library, do not condone nor endorse piracy. + +This library is simply a tool for playback of Blu-ray movies. Like any tool, the +use of this tool can also be abused. There are already numerous laws in +different countries and juridictions all over the world that protect copyrighted +material, such as Blu-ray movies. With that said, it would have been +inappropriate for us to distribute this library with terms such as "you cannot +use this library for piracy". Instead, we present to everyone this disclaimer. + +As a reminder, here is also the disclaimer found at the beginning of any movie +in relation to copyrights. + +ATTENTION + +International agreement and national laws protect copyrighted motion pictures, +videotapes, and sound recordings. + +UNAUTHORIZED REPRODUCTION, EXHIBITION OR DISTRIBUTION OF COPYRIGHTED MOTION +PICTURES CAN RESULT IN SEVERE CRIMINAL AND CIVIL PENALTIES UNDER THE LAWS OF +YOUR COUNTRY. + +The International Criminal Police Organization - INTERPOL, has expressed its +concern about motion picture and sound recording piracy to all of its member +national police forces. (Resolution adopted at INTERPOL General Assembly, +Stockholm, Sweden, September 8, 1977.)
View file
libaacs-0.3.0.tar.bz2/aclocal.m4 -> libaacs-0.6.0.tar.bz2/aclocal.m4
Changed
@@ -1,7 +1,8 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.11.3 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -19,12 +20,15 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.)) -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software +# Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been @@ -34,7 +38,7 @@ am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if($1, 1.11.1, , +m4_if($1, 1.11.3, , AC_FATAL(Do not call $0, use AM_INIT_AUTOMAKE($1).))dnl ) @@ -50,19 +54,21 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN(AM_SET_CURRENT_AUTOMAKE_VERSION, -AM_AUTOMAKE_VERSION(1.11.1)dnl +AM_AUTOMAKE_VERSION(1.11.3)dnl m4_ifndef(AC_AUTOCONF_VERSION, m4_copy(m4_PACKAGE_VERSION, AC_AUTOCONF_VERSION))dnl _AM_AUTOCONF_VERSION(m4_defn(AC_AUTOCONF_VERSION))) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # For projects using AC_CONFIG_AUX_DIR(foo), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. @@ -144,14 +150,14 @@ Usually this means the macro was only invoked conditionally.) fi)) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, +# 2010, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 10 +# serial 12 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -191,6 +197,7 @@ # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -255,7 +262,7 @@ break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -320,10 +327,13 @@ if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi AM_CONDITIONAL(AMDEP, test "x$enable_dependency_tracking" != xno) AC_SUBST(AMDEPBACKSLASH)dnl _AM_SUBST_NOTMAKE(AMDEPBACKSLASH)dnl +AC_SUBST(am__nodep)dnl +_AM_SUBST_NOTMAKE(am__nodep)dnl ) # Generate code to set up dependency tracking. -*- Autoconf -*- @@ -406,18 +416,6 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir") ) -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 8 - -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN(AM_CONFIG_HEADER, AC_CONFIG_HEADERS($@)) - # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, @@ -557,12 +555,15 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME("$_am_arg")`/stamp-h$_am_stamp_count) -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, +# Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. @@ -623,8 +624,8 @@ # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, +# 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -644,7 +645,7 @@ disable, m4_define(am_maintainer_other, enable), m4_define(am_maintainer_other, enable) m4_warn(syntax, unexpected argument to AM@&t@_MAINTAINER_MODE: $1)) -AC_MSG_CHECKING(whether to am_maintainer_other maintainer-specific portions of Makefiles) +AC_MSG_CHECKING(whether to enable maintainer-specific portions of Makefiles) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE(maintainer-mode, --am_maintainer_other-maintainer-mode am_maintainer_other make rules and dependencies not useful @@ -755,12 +756,15 @@ fi ) -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, +# Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. @@ -783,13 +787,14 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software +# Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 5 # _AM_MANGLE_OPTION(NAME) # -----------------------
View file
libaacs-0.3.0.tar.bz2/build-aux/config.guess -> libaacs-0.6.0.tar.bz2/build-aux/config.guess
Changed
@@ -2,9 +2,9 @@ # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2011-05-11' +timestamp='2012-02-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,9 +17,7 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see <http://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -57,8 +55,8 @@ Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -145,7 +143,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -792,13 +790,12 @@ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/-(.*//'` ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/-(.*//'` ;; *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/-(.*//'` ;; + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/-(.*//'` ;; esac exit ;; i*:CYGWIN*:*) @@ -807,6 +804,9 @@ *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 @@ -861,6 +861,13 @@ i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -895,13 +902,16 @@ echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu @@ -943,7 +953,7 @@ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) - echo or32-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu @@ -978,13 +988,13 @@ echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-tilera-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -1315,6 +1325,9 @@ i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2
View file
libaacs-0.3.0.tar.bz2/build-aux/config.sub -> libaacs-0.6.0.tar.bz2/build-aux/config.sub
Changed
@@ -2,9 +2,9 @@ # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2011-03-23' +timestamp='2012-02-10' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -21,9 +21,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see <http://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -76,8 +74,8 @@ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -132,6 +130,10 @@ os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\(^-*-^-*\)$/\1/'` ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\(^-*-^-*\)$/\1/'`-unknown + ;; *) basic_machine=`echo $1 | sed 's/-^-*$//'` if $basic_machine != $1 @@ -247,17 +249,22 @@ # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev4-8 | alphaev56 | alphaev678 | alphapca567 \ | alpha64 | alpha64ev4-8 | alpha64ev56 | alpha64ev678 | alpha64pca567 \ | am33_2.0 \ | arc | arm | armble | armelb | armv2345 | armv345lb | avr | avr32 \ + | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ + | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.01 | hppa2.0 | hppa2.0nw | hppa64 \ + | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ @@ -291,7 +298,7 @@ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ - | rx \ + | rl78 | rx \ | score \ | sh | sh1234 | sh24a | sh24aeb | sh23e | sh34eb | sheb | shbe | shle | sh1234le | sh3ele \ | sh64 | sh64le \ @@ -300,7 +307,7 @@ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ - | v850 | v850e \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -315,8 +322,7 @@ c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -329,7 +335,10 @@ strongarm | thumb | xscale) basic_machine=arm-unknown ;; - + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; xscaleeb) basic_machine=armeb-unknown ;; @@ -352,11 +361,13 @@ # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev4-8-* | alphaev56-* | alphaev678-* \ | alpha64-* | alpha64ev4-8-* | alpha64ev56-* | alpha64ev678-* \ | alphapca567-* | alpha64pca567-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | be32-* | be64-* \ | bfin-* | bs2000-* \ | c123* | c30-* | cjt90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ @@ -365,8 +376,10 @@ | f3001-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.01-* | hppa2.0-* | hppa2.0nw-* | hppa64-* \ + | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m6800123460-* | m68360-* | m683?2-* | m68k-* \ @@ -400,7 +413,7 @@ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* | rx-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh1234-* | sh24a-* | sh24aeb-* | sh23e-* | sh34eb-* | sheb-* | shbe-* \ | shle-* | sh1234le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ @@ -408,10 +421,11 @@ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ + | tile*-* \ | tron-* \ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -711,7 +725,6 @@ i370-ibm* | ibm*) basic_machine=i370-ibm ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 @@ -808,10 +821,18 @@ ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; + msys) + basic_machine=i386-pc + os=-msys + ;; mvs) basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -1120,13 +1141,8 @@ basic_machine=t90-cray os=-unicos ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; tile*) - basic_machine=tile-unknown + basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) @@ -1336,7 +1352,7 @@ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
View file
libaacs-0.3.0.tar.bz2/build-aux/depcomp -> libaacs-0.6.0.tar.bz2/build-aux/depcomp
Changed
@@ -1,10 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2009-04-28.21; # UTC +scriptversion=2011-12-04.11; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, +# 2011 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. + tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to <bug-automake@gnu.org>. @@ -90,10 +90,18 @@ # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" + cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what @@ -158,10 +166,12 @@ ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as -## well. +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -405,6 +415,52 @@ rm -f "$tmpdepfile" ;; +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test "$stat" = 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/ \1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/ / + G + p +}' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. @@ -503,7 +559,9 @@ touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation
View file
libaacs-0.3.0.tar.bz2/build-aux/install-sh -> libaacs-0.6.0.tar.bz2/build-aux/install-sh
Changed
@@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2009-04-28.21; # UTC +scriptversion=2011-01-19.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -156,6 +156,10 @@ -s) stripcmd=$stripprog;; -t) dst_arg=$2 + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | =\(\)!) dst_arg=./$dst_arg;; + esac shift;; -T) no_target_directory=true;; @@ -186,6 +190,10 @@ fi shift # arg dst_arg=$arg + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | =\(\)!) dst_arg=./$dst_arg;; + esac done fi @@ -200,7 +208,11 @@ fi if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. @@ -228,9 +240,9 @@ for src do - # Protect names starting with `-'. + # Protect names problematic for `test' and other utilities. case $src in - -*) src=./$src;; + -* | =\(\)!) src=./$src;; esac if test -n "$dir_arg"; then @@ -252,12 +264,7 @@ echo "$0: no destination specified." >&2 exit 1 fi - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. @@ -385,7 +392,7 @@ case $dstdir in /*) prefix='/';; - -*) prefix='./';; + -=\(\)!*) prefix='./';; *) prefix='';; esac @@ -403,7 +410,7 @@ for d do - test -z "$d" && continue + test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then
View file
libaacs-0.3.0.tar.bz2/build-aux/ltmain.sh -> libaacs-0.6.0.tar.bz2/build-aux/ltmain.sh
Changed
@@ -70,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # @@ -80,7 +80,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.2 Debian-2.4.2-1" +VERSION="2.4.2 Debian-2.4.2-1ubuntu1" TIMESTAMP="" package_revision=1.3337
View file
libaacs-0.3.0.tar.bz2/build-aux/missing -> libaacs-0.6.0.tar.bz2/build-aux/missing
Changed
@@ -1,10 +1,10 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2009-04-28.21; # UTC +scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. +# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify @@ -84,7 +84,6 @@ help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.ch', if possible, from existing .ch Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and @@ -122,15 +121,6 @@ # Not GNU programs, they don't have --version. ;; - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. @@ -226,7 +216,7 @@ \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then - eval LASTARG="\${$#}" + eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` @@ -256,7 +246,7 @@ \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then - eval LASTARG="\${$#}" + eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` @@ -318,41 +308,6 @@ touch $file ;; - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg.
View file
libaacs-0.3.0.tar.bz2/build-aux/ylwrap -> libaacs-0.6.0.tar.bz2/build-aux/ylwrap
Changed
@@ -1,10 +1,10 @@ #! /bin/sh # ylwrap - wrapper for lex/yacc invocations. -scriptversion=2009-04-28.21; # UTC +scriptversion=2011-08-25.18; # UTC # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, -# 2007, 2009 Free Software Foundation, Inc. +# 2007, 2009, 2010, 2011 Free Software Foundation, Inc. # # Written by Tom Tromey <tromey@cygnus.com>. # @@ -99,7 +99,11 @@ # FIXME: add hostname here for parallel makes that run commands on # other machines. But that might take us over the 14-char limit. dirname=ylwrap$$ -trap "cd '`pwd`'; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15 +do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret' +trap "ret=129; $do_exit" 1 +trap "ret=130; $do_exit" 2 +trap "ret=141; $do_exit" 13 +trap "ret=143; $do_exit" 15 mkdir $dirname || exit 1 cd $dirname @@ -133,19 +137,19 @@ # Handle y_tab.c and y_tab.h output by DOS if test $y_tab_nodot = "yes"; then if test $from = "y.tab.c"; then - from="y_tab.c" + from="y_tab.c" else - if test $from = "y.tab.h"; then - from="y_tab.h" - fi + if test $from = "y.tab.h"; then + from="y_tab.h" + fi fi fi if test -f "$from"; then # If $2 is an absolute path name, then just use that, # otherwise prepend `../'. case "$2" in - \\/* | ?:\\/*) target="$2";; - *) target="../$2";; + \\/* | ?:\\/*) target="$2";; + *) target="../$2";; esac # We do not want to overwrite a header file if it hasn't @@ -155,8 +159,8 @@ # Makefile. Divert the output of all other files to a temporary # file so we can compare them to existing versions. if test $first = no; then - realtarget="$target" - target="tmp-`echo $target | sed s/.*\\///g`" + realtarget="$target" + target="tmp-`echo $target | sed s/.*\\///g`" fi # Edit out `#line' or `#' directives. # @@ -180,10 +184,10 @@ # Check whether header files must be updated. if test $first = no; then - if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then - echo "$2" is unchanged - rm -f "$target" - else + if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then + echo "$2" is unchanged + rm -f "$target" + else echo updating "$2" mv -f "$target" "$realtarget" fi
View file
libaacs-0.3.0.tar.bz2/config.h.in -> libaacs-0.6.0.tar.bz2/config.h.in
Changed
@@ -20,8 +20,11 @@ /* Define to 1 if you have the <libgen.h> header file. */ #undef HAVE_LIBGEN_H -/* Define to 1 if you have the `pthread' library (-lpthread). */ -#undef HAVE_LIBPTHREAD +/* Define to 1 if you have the `gpg-error' library (-lgpg-error). */ +#undef HAVE_LIBGPG_ERROR + +/* Define to 1 if you have the <limits.h> header file. */ +#undef HAVE_LIMITS_H /* Define to 1 if you have the <linux/cdrom.h> header file. */ #undef HAVE_LINUX_CDROM_H @@ -69,10 +72,16 @@ */ #undef HAVE_SYS_DIR_H +/* Define to 1 if you have the <sys/mount.h> header file. */ +#undef HAVE_SYS_MOUNT_H + /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H +/* Define to 1 if you have the <sys/param.h> header file. */ +#undef HAVE_SYS_PARAM_H + /* Define to 1 if you have the <sys/select.h> header file. */ #undef HAVE_SYS_SELECT_H @@ -125,6 +134,9 @@ /* Define to 1 if strerror_r returns char *. */ #undef STRERROR_R_CHAR_P +/* Use IOKit for MMC access */ +#undef USE_IOKIT + /* Version number of package */ #undef VERSION
View file
libaacs-0.3.0.tar.bz2/configure -> libaacs-0.6.0.tar.bz2/configure
Changed
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for libaacs 0.3.0. +# Generated by GNU Autoconf 2.68 for libaacs 0.6.0. # # Report bugs to <http://www.videolan.org/developers/libaacs.html>. # @@ -570,8 +570,8 @@ # Identity of this package. PACKAGE_NAME='libaacs' PACKAGE_TARNAME='libaacs' -PACKAGE_VERSION='0.3.0' -PACKAGE_STRING='libaacs 0.3.0' +PACKAGE_VERSION='0.6.0' +PACKAGE_STRING='libaacs 0.6.0' PACKAGE_BUGREPORT='http://www.videolan.org/developers/libaacs.html' PACKAGE_URL='' @@ -615,9 +615,7 @@ am__EXEEXT_TRUE LTLIBOBJS LIBOBJS -SET_DEBUG_OPTS -SET_OPTIMIZATIONS -SET_WARNINGS +SET_FEATURES LT_VERSION_INFO AACS_VERSION_MICRO AACS_VERSION_MINOR @@ -630,6 +628,7 @@ LEXLIB LEX_OUTPUT_ROOT LEX +AS CPP OTOOL64 OTOOL @@ -655,6 +654,7 @@ am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -668,6 +668,8 @@ LDFLAGS CFLAGS CC +HAVE_DARWIN_FALSE +HAVE_DARWIN_TRUE HAVE_WIN32_FALSE HAVE_WIN32_TRUE MAINT @@ -753,7 +755,6 @@ enable_werror enable_extra_warnings enable_optimizations -enable_debug enable_dependency_tracking enable_shared enable_static @@ -763,6 +764,7 @@ with_sysroot enable_libtool_lock enable_largefile +with_libgcrypt_prefix ' ac_precious_vars='build_alias host_alias @@ -1317,7 +1319,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libaacs 0.3.0 to adapt to many kinds of systems. +\`configure' configures libaacs 0.6.0 to adapt to many kinds of systems. Usage: $0 OPTION... VAR=VALUE... @@ -1388,7 +1390,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libaacs 0.3.0:";; + short | recursive ) echo "Configuration of libaacs 0.6.0:";; esac cat <<\_ACEOF @@ -1398,10 +1400,11 @@ --enable-FEATURE=ARG include FEATURE ARG=yes --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer - --enable-werror set warnings as errors via -Werror (default is no) - --enable-extra-warnings set extra warnings (default is yes) - --enable-optimizations enable optimizations (default is yes) - --enable-debug enable debugging information (default is yes) + --enable-werror set warnings as errors via -Werror + default=disabled + --disable-extra-warnings + set extra warnings default=enabled + --disable-optimizations disable optimizations default=enabled --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared=PKGS build shared libraries default=yes @@ -1419,6 +1422,8 @@ --with-gnu-ld assume the C compiler uses GNU ld default=no --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). + --with-libgcrypt-prefix=PFX + prefix where libgcrypt is installed (optional) Some influential environment variables: CC C compiler command @@ -1502,7 +1507,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libaacs configure 0.3.0 +libaacs configure 0.6.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1974,7 +1979,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libaacs $as_me 0.3.0, which was +It was created by libaacs $as_me 0.6.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2901,7 +2906,7 @@ # Define the identity of the package. PACKAGE='libaacs' - VERSION='0.3.0' + VERSION='0.6.0' cat >>confdefs.h <<_ACEOF @@ -2931,11 +2936,11 @@ # We need awk for the "check" target. The system "awk" is bad on # some platforms. -# Always define AMTAR for backward compatibility. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' @@ -2967,6 +2972,8 @@ +SET_FEATURES="-D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112L" + case "${host_os}" in "") SYS=unknown @@ -2987,6 +2994,14 @@ ;; esac ;; + *darwin*) + SYS=darwin + +$as_echo "#define USE_IOKIT 1" >>confdefs.h + + LDFLAGS="${LDFLAGS} -lobjc -Wl,-framework,IOKit,-framework,Cocoa,-framework,DiskArbitration" + SET_FEATURES="${SET_FEATURES} -D_DARWIN_C_SOURCE" + ;; *) SYS="${host_os}" ;; @@ -3000,45 +3015,43 @@ HAVE_WIN32_FALSE= fi + if test "${SYS}" = "darwin"; then + HAVE_DARWIN_TRUE= + HAVE_DARWIN_FALSE='#' +else + HAVE_DARWIN_TRUE='#' + HAVE_DARWIN_FALSE= +fi + -# messages library_not_found="Could not find required library!" function_not_found="Could not find required function!" -# configure options # Check whether --enable-werror was given.
View file
libaacs-0.3.0.tar.bz2/configure.ac -> libaacs-0.6.0.tar.bz2/configure.ac
Changed
@@ -1,32 +1,34 @@ -# library version number +dnl library version number m4_define(aacs_major, 0) -m4_define(aacs_minor, 3) +m4_define(aacs_minor, 6) m4_define(aacs_micro, 0) m4_define(aacs_version,aacs_major.aacs_minor.aacs_micro) -# library (.so) version +dnl library (.so) version # -# update when making new release +dnl update when making new release # -# - If there are no ABI changes, increase revision. -# - If ABI is changed backwards-compatible way, increase current and age. Set revision to 0. -# - If ABI is broken, increase current and set age and revision to 0. +dnl - If there are no ABI changes, increase revision. +dnl - If ABI is changed backwards-compatible way, increase current and age. Set revision to 0. +dnl - If ABI is broken, increase current and set age and revision to 0. # -# Library file name will be libaacs.(current-age).age.revision +dnl Library file name will be libaacs.(current-age).age.revision # -m4_define(lt_current, 1) -m4_define(lt_age, 1) +m4_define(lt_current, 3) +m4_define(lt_age, 3) m4_define(lt_revision, 0) -# initilization +dnl initilization AC_INIT(libaacs, aacs_version, http://www.videolan.org/developers/libaacs.html) AC_CONFIG_AUX_DIR(build-aux) AC_CONFIG_MACRO_DIR(m4) AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(foreign) -AM_CONFIG_HEADER(config.h) +AM_INIT_AUTOMAKE(foreign dist-bzip2 no-dist-gzip) +AC_CONFIG_HEADERS(config.h) AM_MAINTAINER_MODE +SET_FEATURES="-D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112L" + case "${host_os}" in "") SYS=unknown @@ -43,75 +45,89 @@ ;; esac ;; + *darwin*) + SYS=darwin + AC_DEFINE(USE_IOKIT, 1, Use IOKit for MMC access) + LDFLAGS="${LDFLAGS} -lobjc -Wl,-framework,IOKit,-framework,Cocoa,-framework,DiskArbitration" + SET_FEATURES="${SET_FEATURES} -D_DARWIN_C_SOURCE" + ;; *) SYS="${host_os}" ;; esac AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32") +AM_CONDITIONAL(HAVE_DARWIN, test "${SYS}" = "darwin") -# messages +dnl messages library_not_found="Could not find required library!" function_not_found="Could not find required function!" -# configure options +dnl configure options AC_ARG_ENABLE(werror, - AS_HELP_STRING(--enable-werror, - set warnings as errors via -Werror (default is no)), - use_werror=$enableval, - use_werror=no) + AS_HELP_STRING(--enable-werror, set warnings as errors via -Werror @<:@default=disabled@:>@)) AC_ARG_ENABLE(extra-warnings, - AS_HELP_STRING(--enable-extra-warnings, - set extra warnings (default is yes)), - use_extra_warnings=$enableval, - use_extra_warnings=yes) + AS_HELP_STRING(--disable-extra-warnings, set extra warnings @<:@default=enabled@:>@)) AC_ARG_ENABLE(optimizations, - AS_HELP_STRING(--enable-optimizations, - enable optimizations (default is yes)), - use_optimizations=$enableval, - use_optimizations=yes) - -AC_ARG_ENABLE(debug, - AS_HELP_STRING(--enable-debug, - enable debugging information (default is yes)), - use_debug=$enableval, - use_debug=yes) - -# required programs + AS_HELP_STRING(--disable-optimizations, disable optimizations @<:@default=enabled@:>@)) + +dnl override platform specific check for dependent libraries +dnl otherwise libtool linking of shared libraries will +dnl fail on anything other than pass_all. +AC_CACHE_VAL(lt_cv_deplibs_check_method, + lt_cv_deplibs_check_method=pass_all) + +dnl required programs AC_PROG_CC AC_PROG_LIBTOOL +AC_LIBTOOL_WIN32_DLL AM_PROG_LEX AC_PROG_YACC -# required types +dnl required types AC_TYPE_SIGNAL -# required headers +dnl required headers AC_CHECK_HEADERS(stdarg.h sys/types.h dirent.h errno.h libgen.h malloc.h) AC_CHECK_HEADERS(stdlib.h mntent.h linux/cdrom.h inttypes.h) -AC_CHECK_HEADERS(sys/time.h time.h sys/select.h) +AC_CHECK_HEADERS(sys/time.h time.h sys/select.h limits.h sys/param.h) +AC_CHECK_HEADERS(sys/mount.h) -# required structures +dnl required structures AC_STRUCT_DIRENT_D_TYPE -# required system services +dnl required system services AC_SYS_LARGEFILE -# required functions +dnl required functions AC_CHECK_FUNC(snprintf,, AC_MSG_ERROR($function_not_found)) AC_CHECK_FUNC(realpath,AC_DEFINE(HAVE_REALPATH,1,realpath)) -# pthread check (not on win32) -if test "${SYS}" != "mingw32" ; then - AC_CHECK_HEADERS(pthread.h) - AC_CHECK_LIB(pthread, pthread_mutex_init,, - AC_MSG_ERROR($library_not_found)) +dnl required libraries + +dnl pthread check (not on win32) +AS_IF(test "${SYS}" != "mingw32", + AC_CHECK_HEADERS(pthread.h, , + AC_MSG_ERROR(pthread required)) + AC_SEARCH_LIBS(pthread_create, pthread, , + AC_MSG_ERROR(pthread required)) +) + +dnl gcrypt check + +AC_ARG_WITH(libgcrypt-prefix, + AC_HELP_STRING(--with-libgcrypt-prefix=PFX, + prefix where libgcrypt is installed (optional)), + libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="") +if test x$libgcrypt_config_prefix != x ; then + if test x${LIBGCRYPT_CONFIG+set} != xset ; then + LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config + fi fi -# gcrypt check AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) if test x"$LIBGCRYPT_CONFIG" = xno; then AC_MSG_ERROR(libgcrypt not found on system) @@ -122,74 +138,32 @@ AC_SUBST(LIBGCRYPT_LIBS) fi AC_FUNC_STRERROR_R +AC_CHECK_LIB(gpg-error, gpg_strerror_r) -# function testing for supported compiler options -check_cc_options() -{ - local tmpfile=$(mktemp XXXXXXXXXX) - local tmpcfile="$tmpfile.c" - mv $tmpfile $tmpcfile - local retval=1 - printf "Checking if compiler supports $@... " - if $CC -c $@ $tmpcfile -o /dev/null >/dev/null 2>&1; then - local retval=0 - fi - rm $tmpcfile - if $retval = "0" ; then - echo "yes" - else - echo "no" - fi - return $retval -} - -# set default warnings if supported -check_cc_options -Wall && \
View file
libaacs-0.6.0.tar.bz2/m4/attributes.m4
Added
@@ -0,0 +1,296 @@ +dnl Macros to check the presence of generic (non-typed) symbols. +dnl Copyright (c) 2006-2007 Diego Pettenò <flameeyes@gmail.com> +dnl Copyright (c) 2006-2007 xine project +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +dnl 02110-1301, USA. +dnl +dnl As a special exception, the copyright owners of the +dnl macro gives unlimited permission to copy, distribute and modify the +dnl configure scripts that are the output of Autoconf when processing the +dnl Macro. You need not follow the terms of the GNU General Public +dnl License when using or distributing such scripts, even though portions +dnl of the text of the Macro appear in them. The GNU General Public +dnl License (GPL) does govern all other use of the material that +dnl constitutes the Autoconf Macro. +dnl +dnl This special exception to the GPL applies to versions of the +dnl Autoconf Macro released by this project. When you make and +dnl distribute a modified version of the Autoconf Macro, you may extend +dnl this special exception to the GPL to apply to your modified version as +dnl well. + +dnl Check if the flag is supported by compiler +dnl CC_CHECK_CFLAGS_SILENT(FLAG, ACTION-IF-FOUND,ACTION-IF-NOT-FOUND) + +AC_DEFUN(CC_CHECK_CFLAGS_SILENT, + AC_CACHE_VAL(AS_TR_SH(cc_cv_cflags_$1), + ac_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $1" + AC_LINK_IFELSE(AC_LANG_SOURCE(int main() { return 0; }), + eval "AS_TR_SH(cc_cv_cflags_$1)='yes'", + eval "AS_TR_SH(cc_cv_cflags_$1)='no'") + CFLAGS="$ac_save_CFLAGS" + ) + + AS_IF(eval test x$AS_TR_SH(cc_cv_cflags_$1) = xyes, + $2, $3) +) + +dnl Check if the flag is supported by compiler (cacheable) +dnl CC_CHECK_CFLAGS(FLAG, ACTION-IF-FOUND,ACTION-IF-NOT-FOUND) + +AC_DEFUN(CC_CHECK_CFLAGS, + AC_CACHE_CHECK(if $CC supports $1 flag, + AS_TR_SH(cc_cv_cflags_$1), + CC_CHECK_CFLAGS_SILENT($1) dnl Don't execute actions here! + ) + + AS_IF(eval test x$AS_TR_SH(cc_cv_cflags_$1) = xyes, + $2, $3) +) + +dnl CC_CHECK_CFLAG_APPEND(FLAG, action-if-found, action-if-not-found) +dnl Check for CFLAG and appends them to CFLAGS if supported +AC_DEFUN(CC_CHECK_CFLAG_APPEND, + AC_CACHE_CHECK(if $CC supports $1 flag, + AS_TR_SH(cc_cv_cflags_$1), + CC_CHECK_CFLAGS_SILENT($1) dnl Don't execute actions here! + ) + + AS_IF(eval test x$AS_TR_SH(cc_cv_cflags_$1) = xyes, + CFLAGS="$CFLAGS $1"; $2, $3) +) + +dnl CC_CHECK_CFLAGS_APPEND(FLAG1 FLAG2, action-if-found, action-if-not) +AC_DEFUN(CC_CHECK_CFLAGS_APPEND, + for flag in $1; do + CC_CHECK_CFLAG_APPEND($flag, $2, $3) + done +) + +dnl Check if the flag is supported by linker (cacheable) +dnl CC_CHECK_LDFLAGS(FLAG, ACTION-IF-FOUND,ACTION-IF-NOT-FOUND) + +AC_DEFUN(CC_CHECK_LDFLAGS, + AC_CACHE_CHECK(if $CC supports $1 flag, + AS_TR_SH(cc_cv_ldflags_$1), + ac_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $1" + AC_LINK_IFELSE(AC_LANG_SOURCE(int main() { return 1; }), + eval "AS_TR_SH(cc_cv_ldflags_$1)='yes'", + eval "AS_TR_SH(cc_cv_ldflags_$1)=") + LDFLAGS="$ac_save_LDFLAGS" + ) + + AS_IF(eval test x$AS_TR_SH(cc_cv_ldflags_$1) = xyes, + $2, $3) +) + +dnl Check for a -Werror flag or equivalent. -Werror is the GCC +dnl and ICC flag that tells the compiler to treat all the warnings +dnl as fatal. We usually need this option to make sure that some +dnl constructs (like attributes) are not simply ignored. +dnl +dnl Other compilers don't support -Werror per se, but they support +dnl an equivalent flag: +dnl - Sun Studio compiler supports -errwarn=%all +AC_DEFUN(CC_CHECK_WERROR, + AC_CACHE_CHECK( + for $CC way to treat warnings as errors, + cc_cv_werror, + CC_CHECK_CFLAGS_SILENT(-Werror, cc_cv_werror=-Werror, + CC_CHECK_CFLAGS_SILENT(-errwarn=%all, cc_cv_werror=-errwarn=%all)) + ) +) + +AC_DEFUN(CC_CHECK_ATTRIBUTE, + AC_REQUIRE(CC_CHECK_WERROR) + AC_CACHE_CHECK(if $CC supports __attribute__(( ifelse($2, , $1, $2) )), + AS_TR_SH(cc_cv_attribute_$1), + ac_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $cc_cv_werror" + AC_COMPILE_IFELSE(AC_LANG_SOURCE($3), + eval "AS_TR_SH(cc_cv_attribute_$1)='yes'", + eval "AS_TR_SH(cc_cv_attribute_$1)='no'") + CFLAGS="$ac_save_CFLAGS" + ) + + AS_IF(eval test x$AS_TR_SH(cc_cv_attribute_$1) = xyes, + AC_DEFINE( + AS_TR_CPP(SUPPORT_ATTRIBUTE_$1), 1, + Define this if the compiler supports __attribute__(( ifelse($2, , $1, $2) )) + ) + $4, + $5) +) + +AC_DEFUN(CC_ATTRIBUTE_CONSTRUCTOR, + CC_CHECK_ATTRIBUTE( + constructor,, + extern void foo(); + void __attribute__((constructor)) ctor() { foo(); }, + $1, $2) +) + +AC_DEFUN(CC_ATTRIBUTE_DESTRUCTOR, + CC_CHECK_ATTRIBUTE( + destructor,, + extern void foo(); + void __attribute__((destructor)) dtor() { foo(); }, + $1, $2) +) + +AC_DEFUN(CC_ATTRIBUTE_FORMAT, + CC_CHECK_ATTRIBUTE( + format, format(printf, n, n), + void __attribute__((format(printf, 1, 2))) printflike(const char *fmt, ...) { fmt = (void *)0; }, + $1, $2) +) + +AC_DEFUN(CC_ATTRIBUTE_FORMAT_ARG, + CC_CHECK_ATTRIBUTE( + format_arg, format_arg(printf), + char *__attribute__((format_arg(1))) gettextlike(const char *fmt) { fmt = (void *)0; }, + $1, $2) +) + +AC_DEFUN(CC_ATTRIBUTE_VISIBILITY, + CC_CHECK_ATTRIBUTE( + visibility_$1, visibility("$1"), + void __attribute__((visibility("$1"))) $1_function() { }, + $2, $3) +) + +AC_DEFUN(CC_ATTRIBUTE_NONNULL, + CC_CHECK_ATTRIBUTE( + nonnull, nonnull(), + void __attribute__((nonnull())) some_function(void *foo, void *bar) { foo = (void*)0; bar = (void*)0; }, + $1, $2) +) + +AC_DEFUN(CC_ATTRIBUTE_UNUSED, + CC_CHECK_ATTRIBUTE( + unused, , + void some_function(void *foo, __attribute__((unused)) void *bar);, + $1, $2) +) + +AC_DEFUN(CC_ATTRIBUTE_SENTINEL, + CC_CHECK_ATTRIBUTE( + sentinel, , + void some_function(void *foo, ...) __attribute__((sentinel));, + $1, $2) +) + +AC_DEFUN(CC_ATTRIBUTE_DEPRECATED, + CC_CHECK_ATTRIBUTE(
View file
libaacs-0.3.0.tar.bz2/src/Makefile.am -> libaacs-0.6.0.tar.bz2/src/Makefile.am
Changed
@@ -1,20 +1,12 @@ -LIB_VERSION_INFO="@LT_VERSION_INFO@" +SET_FEATURES = @SET_FEATURES@ +SET_INCLUDES = -I$(top_srcdir) -Ifile -Ilibaacs -SUBDIRS= . examples - -SET_FEATURES = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112L -D_REENTRANT -SET_WARNINGS = @SET_WARNINGS@ -SET_OPTIMIZATIONS = @SET_OPTIMIZATIONS@ -SET_DEBUG_OPTS = @SET_DEBUG_OPTS@ -SET_INCLUDES = -I$(top_srcdir) -Ifile - -AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_WARNINGS) $(SET_OPTIMIZATIONS) \ - $(SET_DEBUG_OPTS) $(SET_INCLUDES) $(LIBGCRYPT_CFLAGS) +AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_INCLUDES) $(LIBGCRYPT_CFLAGS) AM_YFLAGS = -d -p libaacs_yy -CFLAGS=$(shell test -z "$$CFLAGS" || echo "$$CFLAGS") lib_LTLIBRARIES = libaacs.la -libaacs_la_SOURCES=libaacs/aacs.h \ +libaacs_la_SOURCES=\ + libaacs/aacs.h \ libaacs/mmc.h \ libaacs/mkb.h \ libaacs/aacs.c \ @@ -36,8 +28,14 @@ util/strutl.c \ util/strutl.h -EXTRA_libaacs_la_SOURCES=libaacs/ec.c +EXTRA_libaacs_la_SOURCES=\ + libaacs/ec.c +if HAVE_DARWIN +libaacs_la_SOURCES+= \ + file/darwin.c \ + file/darwin.h +else if HAVE_WIN32 libaacs_la_SOURCES+= \ file/win32.c \ @@ -47,14 +45,25 @@ file/xdg.c \ file/xdg.h endif +endif -libaacs_ladir= $(includedir)/libaacs -libaacs_la_HEADERS= libaacs/aacs.h file/filesystem.h libaacs/aacs-version.h -libaacs_la_LDFLAGS= $(LIBGCRYPT_LIBS) -version-info $(LIB_VERSION_INFO) +pkginclude_HEADERS = \ + libaacs/aacs.h \ + file/filesystem.h \ + libaacs/aacs-version.h + +libaacs_la_LDFLAGS= -no-undefined -version-info $(LT_VERSION_INFO) +libaacs_la_LIBADD = $(LIBGCRYPT_LIBS) pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libaacs.pc BUILT_SOURCES = keydbcfg-parser.h keydbcfg-parser.c keydbcfg-lexer.c +CLEANFILES = $(BUILT_SOURCES) + clean-lex-yacc: -rm -f $(BUILT_SOURCES) + +# do not distribute files that should be generated by lex/yacc locally +dist-hook: + (cd $(distdir) && rm -f $(BUILT_SOURCES))
View file
libaacs-0.3.0.tar.bz2/src/Makefile.in -> libaacs-0.6.0.tar.bz2/src/Makefile.in
Changed
@@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -37,23 +37,27 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -@HAVE_WIN32_TRUE@am__append_1 = \ -@HAVE_WIN32_TRUE@ file/win32.c \ -@HAVE_WIN32_TRUE@ file/win32.h +@HAVE_DARWIN_TRUE@am__append_1 = \ +@HAVE_DARWIN_TRUE@ file/darwin.c \ +@HAVE_DARWIN_TRUE@ file/darwin.h -@HAVE_WIN32_FALSE@am__append_2 = \ -@HAVE_WIN32_FALSE@ file/xdg.c \ -@HAVE_WIN32_FALSE@ file/xdg.h +@HAVE_DARWIN_FALSE@@HAVE_WIN32_TRUE@am__append_2 = \ +@HAVE_DARWIN_FALSE@@HAVE_WIN32_TRUE@ file/win32.c \ +@HAVE_DARWIN_FALSE@@HAVE_WIN32_TRUE@ file/win32.h + +@HAVE_DARWIN_FALSE@@HAVE_WIN32_FALSE@am__append_3 = \ +@HAVE_DARWIN_FALSE@@HAVE_WIN32_FALSE@ file/xdg.c \ +@HAVE_DARWIN_FALSE@@HAVE_WIN32_FALSE@ file/xdg.h subdir = src -DIST_COMMON = $(libaacs_la_HEADERS) $(srcdir)/Makefile.am \ +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/libaacs.pc.in keydbcfg-lexer.c \ keydbcfg-parser.c keydbcfg-parser.h ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/attributes.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -81,22 +85,31 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \ - "$(DESTDIR)$(libaacs_ladir)" + "$(DESTDIR)$(pkgincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) -libaacs_la_LIBADD = +am__DEPENDENCIES_1 = +libaacs_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__libaacs_la_SOURCES_DIST = libaacs/aacs.h libaacs/mmc.h \ libaacs/mkb.h libaacs/aacs.c libaacs/mmc.c libaacs/crypto.c \ libaacs/crypto.h libaacs/mkb.c file/file.h file/filesystem.h \ file/file_posix.c file/keydbcfg.c file/keydbcfg.h \ file/keydbcfg-parser.y file/keydbcfg-lexer.l util/attributes.h \ util/macro.h util/logging.c util/logging.h util/strutl.c \ - util/strutl.h file/win32.c file/win32.h file/xdg.c file/xdg.h -@HAVE_WIN32_TRUE@am__objects_1 = win32.lo -@HAVE_WIN32_FALSE@am__objects_2 = xdg.lo + util/strutl.h file/darwin.c file/darwin.h file/win32.c \ + file/win32.h file/xdg.c file/xdg.h +@HAVE_DARWIN_TRUE@am__objects_1 = darwin.lo +@HAVE_DARWIN_FALSE@@HAVE_WIN32_TRUE@am__objects_2 = win32.lo +@HAVE_DARWIN_FALSE@@HAVE_WIN32_FALSE@am__objects_3 = xdg.lo am_libaacs_la_OBJECTS = aacs.lo mmc.lo crypto.lo mkb.lo file_posix.lo \ keydbcfg.lo keydbcfg-parser.lo keydbcfg-lexer.lo logging.lo \ - strutl.lo $(am__objects_1) $(am__objects_2) + strutl.lo $(am__objects_1) $(am__objects_2) $(am__objects_3) libaacs_la_OBJECTS = $(am_libaacs_la_OBJECTS) libaacs_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ @@ -115,73 +128,36 @@ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ @MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ || -LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) +LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) LTLEXCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS) + --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS) YLWRAP = $(top_srcdir)/build-aux/ylwrap @MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ || -YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) +YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) LTYACCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS) + --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) SOURCES = $(libaacs_la_SOURCES) $(EXTRA_libaacs_la_SOURCES) DIST_SOURCES = $(am__libaacs_la_SOURCES_DIST) \ $(EXTRA_libaacs_la_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive DATA = $(pkgconfig_DATA) -HEADERS = $(libaacs_la_HEADERS) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir +HEADERS = $(pkginclude_HEADERS) ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\(^/*\)/.*$$,\1,'; \ - sed_rest='s,^^/*/*,,'; \ - sed_last='s,^.*/\(^/*\)$$,\1,'; \ - sed_butlast='s,/*^/*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" AACS_VERSION_MAJOR = @AACS_VERSION_MAJOR@ AACS_VERSION_MICRO = @AACS_VERSION_MICRO@ AACS_VERSION_MINOR = @AACS_VERSION_MINOR@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ +AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ -CFLAGS = $(shell test -z "$$CFLAGS" || echo "$$CFLAGS") +CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -237,10 +213,8 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ -SET_DEBUG_OPTS = @SET_DEBUG_OPTS@ +SET_FEATURES = @SET_FEATURES@ SET_MAKE = @SET_MAKE@ -SET_OPTIMIZATIONS = @SET_OPTIMIZATIONS@ -SET_WARNINGS = @SET_WARNINGS@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ @@ -302,13 +276,8 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -LIB_VERSION_INFO = "@LT_VERSION_INFO@" -SUBDIRS = . examples -SET_FEATURES = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112L -D_REENTRANT -SET_INCLUDES = -I$(top_srcdir) -Ifile -AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_WARNINGS) $(SET_OPTIMIZATIONS) \ - $(SET_DEBUG_OPTS) $(SET_INCLUDES) $(LIBGCRYPT_CFLAGS) - +SET_INCLUDES = -I$(top_srcdir) -Ifile -Ilibaacs +AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_INCLUDES) $(LIBGCRYPT_CFLAGS) AM_YFLAGS = -d -p libaacs_yy lib_LTLIBRARIES = libaacs.la libaacs_la_SOURCES = libaacs/aacs.h libaacs/mmc.h libaacs/mkb.h \ @@ -317,16 +286,23 @@
View file
libaacs-0.3.0.tar.bz2/src/examples/Makefile.am -> libaacs-0.6.0.tar.bz2/src/examples/Makefile.am
Changed
@@ -1,21 +1,18 @@ SET_FEATURES = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112L -D_REENTRANT -SET_WARNINGS = @SET_WARNINGS@ -SET_OPTIMIZATIONS = @SET_OPTIMIZATIONS@ -SET_DEBUG_OPTS = @SET_DEBUG_OPTS@ SET_INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/src/file -AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_WARNINGS) $(SET_OPTIMIZATIONS) \ - $(SET_DEBUG_OPTS) $(SET_INCLUDES) -CFLAGS=$(shell test -z "$$CFLAGS" || echo "$$CFLAGS") +AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_INCLUDES) AACS_LIB = $(top_builddir)/src/libaacs.la -PARSER_TEST_DEPENDENCIES=$(top_srcdir)/src/keydbcfg-lexer.c $(top_srcdir)/src/keydbcfg-parser.c +noinst_PROGRAMS=parser_test +bin_PROGRAMS=aacs_info -noinst_PROGRAMS=parser_test libaacs_test +parser_test_SOURCES=parser_test.c \ + $(top_builddir)/src/keydbcfg-lexer.c \ + $(top_builddir)/src/keydbcfg-parser.c -parser_test_SOURCE=parser_test.c -parser_test_LDADD = $(AACS_LIB) $(PARSER_TEST_DEPENDENCIES) +parser_test_LDADD = $(AACS_LIB) -libaacs_test_SOURCE=libaacs_test.c -libaacs_test_LDADD = $(AACS_LIB) +aacs_info_SOURCE=libaacs_test.c +aacs_info_LDADD = $(AACS_LIB)
View file
libaacs-0.3.0.tar.bz2/src/examples/Makefile.in -> libaacs-0.6.0.tar.bz2/src/examples/Makefile.in
Changed
@@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -35,27 +35,30 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -noinst_PROGRAMS = parser_test$(EXEEXT) libaacs_test$(EXEEXT) +noinst_PROGRAMS = parser_test$(EXEEXT) +bin_PROGRAMS = aacs_info$(EXEEXT) subdir = src/examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/attributes.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -PROGRAMS = $(noinst_PROGRAMS) -libaacs_test_SOURCES = libaacs_test.c -libaacs_test_OBJECTS = libaacs_test.$(OBJEXT) -libaacs_test_DEPENDENCIES = $(AACS_LIB) -parser_test_SOURCES = parser_test.c -parser_test_OBJECTS = parser_test.$(OBJEXT) -parser_test_DEPENDENCIES = $(AACS_LIB) $(PARSER_TEST_DEPENDENCIES) +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) +aacs_info_SOURCES = aacs_info.c +aacs_info_OBJECTS = aacs_info.$(OBJEXT) +aacs_info_DEPENDENCIES = $(AACS_LIB) +am_parser_test_OBJECTS = parser_test.$(OBJEXT) \ + keydbcfg-lexer.$(OBJEXT) keydbcfg-parser.$(OBJEXT) +parser_test_OBJECTS = $(am_parser_test_OBJECTS) +parser_test_DEPENDENCIES = $(AACS_LIB) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -69,8 +72,8 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = libaacs_test.c parser_test.c -DIST_SOURCES = libaacs_test.c parser_test.c +SOURCES = aacs_info.c $(parser_test_SOURCES) +DIST_SOURCES = aacs_info.c $(parser_test_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -80,13 +83,14 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ +AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ -CFLAGS = $(shell test -z "$$CFLAGS" || echo "$$CFLAGS") +CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -142,10 +146,8 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ -SET_DEBUG_OPTS = @SET_DEBUG_OPTS@ +SET_FEATURES = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112L -D_REENTRANT SET_MAKE = @SET_MAKE@ -SET_OPTIMIZATIONS = @SET_OPTIMIZATIONS@ -SET_WARNINGS = @SET_WARNINGS@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ @@ -207,17 +209,16 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SET_FEATURES = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112L -D_REENTRANT SET_INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/src/file -AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_WARNINGS) $(SET_OPTIMIZATIONS) \ - $(SET_DEBUG_OPTS) $(SET_INCLUDES) - +AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_INCLUDES) AACS_LIB = $(top_builddir)/src/libaacs.la -PARSER_TEST_DEPENDENCIES = $(top_srcdir)/src/keydbcfg-lexer.c $(top_srcdir)/src/keydbcfg-parser.c -parser_test_SOURCE = parser_test.c -parser_test_LDADD = $(AACS_LIB) $(PARSER_TEST_DEPENDENCIES) -libaacs_test_SOURCE = libaacs_test.c -libaacs_test_LDADD = $(AACS_LIB) +parser_test_SOURCES = parser_test.c \ + $(top_builddir)/src/keydbcfg-lexer.c \ + $(top_builddir)/src/keydbcfg-parser.c + +parser_test_LDADD = $(AACS_LIB) +aacs_info_SOURCE = libaacs_test.c +aacs_info_LDADD = $(AACS_LIB) all: all-am .SUFFIXES: @@ -252,6 +253,49 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files"." = ""; dirs"." = 1 } \ + { d=$$3; if (dirsd != 1) { print "d", d; dirsd = 1 } \ + if ($$2 == $$4) filesd = filesd " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, filesd }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ @@ -261,10 +305,10 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -libaacs_test$(EXEEXT): $(libaacs_test_OBJECTS) $(libaacs_test_DEPENDENCIES) - @rm -f libaacs_test$(EXEEXT) - $(LINK) $(libaacs_test_OBJECTS) $(libaacs_test_LDADD) $(LIBS) -parser_test$(EXEEXT): $(parser_test_OBJECTS) $(parser_test_DEPENDENCIES) +aacs_info$(EXEEXT): $(aacs_info_OBJECTS) $(aacs_info_DEPENDENCIES) $(EXTRA_aacs_info_DEPENDENCIES) + @rm -f aacs_info$(EXEEXT) + $(LINK) $(aacs_info_OBJECTS) $(aacs_info_LDADD) $(LIBS) +parser_test$(EXEEXT): $(parser_test_OBJECTS) $(parser_test_DEPENDENCIES) $(EXTRA_parser_test_DEPENDENCIES) @rm -f parser_test$(EXEEXT) $(LINK) $(parser_test_OBJECTS) $(parser_test_LDADD) $(LIBS) @@ -274,7 +318,9 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libaacs_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aacs_info.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keydbcfg-lexer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keydbcfg-parser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser_test.Po@am__quote@ .c.o: @@ -298,6 +344,34 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
View file
libaacs-0.6.0.tar.bz2/src/examples/aacs_info.c
Added
@@ -0,0 +1,133 @@ +/* + * This file is part of libaacs + * Copyright (C) 2010 npzacs + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * <http://www.gnu.org/licenses/>. + */ + +#include "../libaacs/aacs.h" +#include "../util/macro.h" /* MKINT_BE48 */ + +#include <stdio.h> +#include <stdlib.h> + +static const char *_hex2str(const uint8_t *s, unsigned n) +{ + static const char hex = "0123456789ABCDEF"; + static char *str = NULL; + + unsigned ii; + + str = realloc(str, n*2 + 1); + for (ii = 0; ii < n; ii++) { + str2*ii = hex sii >> 4; + str2*ii + 1 = hex sii & 0x0f; + } + str2*ii = 0; + + return str; +} + +static const char *_error_str(int error_code) +{ + switch (error_code) { + case AACS_SUCCESS: + return "No errors"; + case AACS_ERROR_CORRUPTED_DISC: + return "Corrupted BluRay disc"; + case AACS_ERROR_NO_CONFIG: + return "Missing configuration file(s)"; + case AACS_ERROR_NO_PK: + return "No matching processing key in configuration file(s)"; + case AACS_ERROR_NO_CERT: + return "No valid certificates in configuration file(s)"; + case AACS_ERROR_CERT_REVOKED: + return "All available certificates have been revoked"; + case AACS_ERROR_MMC_OPEN: + return "MMC open failed"; + case AACS_ERROR_MMC_FAILURE: + return "MMC authentication failed"; + } + return "Unknown error"; +} + +static void _dump_rl(const char *type, AACS_RL_ENTRY *rl, int num_entries, int mkb_version) +{ + int ii; + + printf("%s Revocation List (MKB version %d):\n", type, mkb_version); + + if (num_entries < 1 || !rl) { + printf(" (empty)\n"); + return; + } + + for (ii = 0; ii < num_entries; ii++) { + unsigned long long id = MKINT_BE48(rlii.id); + + if (rlii.range) { + printf(" %012llx - %012llx\n", id, id + rlii.range); + } else { + printf(" %012llx\n", id); + } + } +} + +int main (int argc, char **argv) +{ + int major, minor, micro, error_code = AACS_SUCCESS; + + if (argc < 2) { + fprintf(stderr, "Usage: aacs_info <path-to-disc-root> <path-to-config-file>\n"); + exit(EXIT_FAILURE); + } + + aacs_get_version(&major, &minor, µ); + printf("Opening %s using libaacs %d.%d.%d ...\n", argv1, major, minor, micro); + + AACS *aacs = aacs_open2(argv1, argc > 2 ? argv2 : NULL, &error_code); + if (error_code) { + fprintf(stderr, "libaacs open failed: %s\n", _error_str(error_code)); + } else { + printf("libaacs open succeed.\n"); + } + + if (!aacs) { + exit(EXIT_FAILURE); + } + + const uint8_t *vid = aacs_get_vid(aacs); + const uint8_t *id = aacs_get_disc_id(aacs); + printf("Disc ID: %s\n", id ? _hex2str(id, 20) : "???"); + printf("VID : %s\n", vid ? _hex2str(vid, 16) : "???"); + printf("MKBv : %d\n", aacs_get_mkb_version(aacs)); + + aacs_close(aacs); + + /* dump revocation lists */ + + AACS_RL_ENTRY *rl; + int num_entries, mkb_version; + + rl = aacs_get_hrl(&num_entries, &mkb_version); + _dump_rl("Host", rl, num_entries, mkb_version); + X_FREE(rl); + + rl = aacs_get_drl(&num_entries, &mkb_version); + _dump_rl("Drive", rl, num_entries, mkb_version); + X_FREE(rl); + + return EXIT_SUCCESS; +}
View file
libaacs-0.6.0.tar.bz2/src/file/darwin.c
Added
@@ -0,0 +1,95 @@ +/* + * This file is part of libaacs + * Copyright (C) 2012 Konstantin Pavlov + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * <http://www.gnu.org/licenses/>. + */ + +#include "darwin.h" + +#include <CoreFoundation/CoreFoundation.h> + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "util/strutl.h" +#include "util/logging.h" + +#define USER_CFG_DIR "Library/Preferences" +#define USER_CACHE_DIR "Library/Caches" +#define SYSTEM_CFG_DIR "/Library/Preferences" + + +const char *darwin_get_config_home(void) +{ + static char *dir = NULL; + static int init_done = 0; + + if (!init_done) { + init_done = 1; + + const char *user_home = getenv("HOME"); + if (user_home && *user_home) { + return dir = str_printf("%s/%s", user_home, USER_CFG_DIR); + } + + DEBUG(DBG_FILE, "Can't find user home directory ($HOME) !\n"); + } + + return dir; +} + +const char *darwin_get_cache_home(void) +{ + static char *dir = NULL; + static int init_done = 0; + + if (!init_done) { + init_done = 1; + + const char *user_home = getenv("HOME"); + if (user_home && *user_home) { + return dir = str_printf("%s/%s", user_home, USER_CACHE_DIR); + } + + DEBUG(DBG_FILE, "Can't find user home directory ($HOME) !\n"); + } + + return dir; +} + +const char *darwin_get_config_system(const char *dir) +{ + static char *dirs = NULL; // "dir1\0dir2\0...\0dirN\0\0" + + if (!dirs) { + dirs = str_printf("%s%c%c", SYSTEM_CFG_DIR, 0, 0); + } + + if (!dir) { + // first call + dir = dirs; + } else { + // next call + dir += strlen(dir) + 1; + if (!*dir) { + // end of list + dir = NULL; + } + } + + return dir; +}
View file
libaacs-0.6.0.tar.bz2/src/file/darwin.h
Added
@@ -0,0 +1,29 @@ +/* + * This file is part of libaacs + * Copyright (C) 2012 Konstantin Pavlov + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * <http://www.gnu.org/licenses/>. + */ + +#ifndef AACS_DARWIN_H +#define AACS_DARWIN_H + +#include <util/attributes.h> + +AACS_PRIVATE const char *darwin_get_config_home(void); +AACS_PRIVATE const char *darwin_get_config_system(const char *dir); +AACS_PRIVATE const char *darwin_get_cache_home(void); + +#endif
View file
libaacs-0.3.0.tar.bz2/src/file/file_posix.c -> libaacs-0.6.0.tar.bz2/src/file/file_posix.c
Changed
@@ -38,7 +38,7 @@ if (file) { fclose((FILE *)file->internal); - DEBUG(DBG_FILE, "Closed LINUX file (%p)\n", file); + DEBUG(DBG_FILE, "Closed LINUX file (%p)\n", (void*)file); X_FREE(file); } @@ -82,7 +82,7 @@ FILE *fp = NULL; AACS_FILE_H *file = malloc(sizeof(AACS_FILE_H)); - DEBUG(DBG_FILE, "Opening LINUX file %s... (%p)\n", filename, file); + DEBUG(DBG_FILE, "Opening LINUX file %s... (%p)\n", filename, (void*)file); file->close = file_close_linux; file->seek = file_seek_linux; file->read = file_read_linux; @@ -96,7 +96,7 @@ return file; } - DEBUG(DBG_FILE, "Error opening file %s ! (%p)\n", filename, file); + DEBUG(DBG_FILE, "Error opening file %s ! (%p)\n", filename, (void*)file); X_FREE(file);
View file
libaacs-0.3.0.tar.bz2/src/file/keydbcfg-lexer.l -> libaacs-0.6.0.tar.bz2/src/file/keydbcfg-lexer.l
Changed
@@ -20,13 +20,21 @@ #include "keydbcfg-parser.h" +#define YY_NO_UNISTD_H + /* Disable some warnings triggered by generated scanner */ #ifdef __GNUC__ #pragma GCC diagnostic ignored "-Wredundant-decls" #pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" +#pragma GCC visibility push(hidden) #endif +int isatty(int i) { return 0; } + +#if 0 static char *trim_string(const char *string); +#endif %} /* Options to generate reentrant lexer that's POSIX lex compatible. The * bison-bridge option is also set since bison forces the use of a parameter @@ -81,7 +89,8 @@ {WHITESPACE} {} <TITLE_STATE>{DISC_TITLE} { - yylval->string = trim_string(yytext); + //yylval->string = trim_string(yytext); + yylval->string = yytext; BEGIN INITIAL; return DISC_TITLE; } @@ -130,6 +139,7 @@ {COMMENT} {} {BAD_ENTRY} { return BAD_ENTRY; } %% +#if 0 /* Function used to trim leading and trailing space from a string */ static char *trim_string(const char *string) { @@ -146,3 +156,4 @@ new_stringsize = '\0'; return new_string; } +#endif \ No newline at end of file
View file
libaacs-0.3.0.tar.bz2/src/file/keydbcfg-parser.y -> libaacs-0.6.0.tar.bz2/src/file/keydbcfg-parser.y
Changed
@@ -1,4 +1,8 @@ -%{ +%code requires { +#include "file/keydbcfg.h" +} + +%code { /* * This file is part of libaacs * Copyright (C) 2010 gates @@ -18,7 +22,6 @@ * <http://www.gnu.org/licenses/>. */ -#include "file/keydbcfg.h" #include "util/macro.h" #include <stdio.h> @@ -27,9 +30,9 @@ /* Disable some warnings triggered by generated parser */ #if defined __GNUC__ -#pragma GCC diagnostic ignored "-Wredundant-decls" #pragma GCC diagnostic ignored "-Wimplicit-function-declaration" #pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC visibility push(hidden) #endif /* Fix some warnings trigger by -Wundef which can't be ignored */ @@ -40,10 +43,10 @@ { \ while (X) \ { \ - digit_key_pair_list *next = X->next; \ + digit_key_pair_list *pnext = X->next;\ X_FREE(X->key_pair.key); \ X_FREE(X); \ - X = next; \ + X = pnext; \ } \ } while (0); @@ -62,20 +65,19 @@ ENTRY_TYPE_UK }; -static dk_list *new_dk_list(); -static dk_list *add_dk_list_entry(dk_list *list, const char *key, - const char *node); -static pk_list *new_pk_list(); -static pk_list *add_pk_list_entry(pk_list *list, const char *key); -static cert_list *new_cert_list(); -static cert_list *add_cert_list(cert_list *list, const char *host_priv_key, - const char *host_cert, const char *host_nonce, - const char *host_key_point); -static title_entry_list *new_title_entry_list(); -static int add_entry(title_entry_list *list, int type, const char *entry); -static digit_key_pair_list *new_digit_key_pair_list(); +static dk_list *new_dk_list(void); +static dk_list *add_dk_list_entry(dk_list *list, char *key, char *node); +static pk_list *new_pk_list(void); +static pk_list *add_pk_list_entry(pk_list *list, char *key); +static cert_list *new_cert_list(void); +static cert_list *add_cert_list(cert_list *list, char *host_priv_key, + char *host_cert, char *host_nonce, + char *host_key_point); +static title_entry_list *new_title_entry_list(void); +static int add_entry(title_entry_list *list, int type, char *entry); +static digit_key_pair_list *new_digit_key_pair_list(void); static digit_key_pair_list *add_digit_key_pair_entry(digit_key_pair_list *list, - int type, unsigned int digit, const char *key); + int type, unsigned int digit, char *key); static int add_date_entry(title_entry_list *list, unsigned int year, unsigned int month, unsigned int day); void yyerror (void *scanner, dk_list *dklist, pk_list *pklist, cert_list *clist, @@ -85,7 +87,7 @@ /* uncomment the line below for debugging */ // int yydebug = 1; -%} +} /* Options set to generate a reentrant parser that is POSIX yacc compatible * The basic 'scanner' parameters are set. Also, another parameter is set * to pass in a title entry list struct used to hold all title entries. @@ -318,7 +320,7 @@ { if (!dkplist) { - dkplist = (digit_key_pair_list *)malloc(sizeof(*dkplist)); + dkplist = new_digit_key_pair_list(); celist->entry.bn = dkplist; } dkplist = add_digit_key_pair_entry(dkplist, ENTRY_TYPE_BN, $1, $3); @@ -349,7 +351,7 @@ { if (!dkplist) { - dkplist = (digit_key_pair_list *)malloc(sizeof(*dkplist)); + dkplist = new_digit_key_pair_list(); celist->entry.pak = dkplist; } dkplist = add_digit_key_pair_entry(dkplist, ENTRY_TYPE_PAK, $1, $3); @@ -373,7 +375,7 @@ { if (!dkplist) { - dkplist = (digit_key_pair_list *)malloc(sizeof(*dkplist)); + dkplist = new_digit_key_pair_list(); celist->entry.tk = dkplist; } dkplist = add_digit_key_pair_entry(dkplist, ENTRY_TYPE_TK, $1, $3); @@ -397,7 +399,7 @@ { if (!dkplist) { - dkplist = (digit_key_pair_list *)malloc(sizeof(*dkplist)); + dkplist = new_digit_key_pair_list(); celist->entry.uk = dkplist; } dkplist = add_digit_key_pair_entry(dkplist, ENTRY_TYPE_UK, $1, $3); @@ -449,6 +451,8 @@ cfgfile->host_cert_list = head_clist; cfgfile->list = head_celist; + fclose(fp); + if (retval) return 0; @@ -456,11 +460,10 @@ } /* Function that returns pointer to new config file object */ -config_file *keydbcfg_new_config_file() +config_file *keydbcfg_new_config_file(void) { config_file *cfgfile = (config_file *)malloc(sizeof(*cfgfile)); - cfgfile->pkl = NULL; - cfgfile->list = NULL; + memset(cfgfile, 0, sizeof(*cfgfile)); return cfgfile; } @@ -476,6 +479,15 @@ cfgfile->pkl = next; } + /* free dk list */ + while (cfgfile->dkl) + { + dk_list *next = cfgfile->dkl->next; + X_FREE(cfgfile->dkl->key); + X_FREE(cfgfile->dkl); + cfgfile->dkl = next; + } + /* free host cert list */ while (cfgfile->host_cert_list) { @@ -512,17 +524,15 @@ } /* Function to return new dk_list object */ -static dk_list *new_dk_list() +static dk_list *new_dk_list(void) { dk_list *dkl = (dk_list *)malloc(sizeof(*dkl)); - dkl->key = NULL; - dkl->next = NULL; + memset(dkl, 0, sizeof(*dkl)); return dkl; } /* Function to add dk to config file */ -static dk_list *add_dk_list_entry(dk_list *list, const char *key, - const char *node) +static dk_list *add_dk_list_entry(dk_list *list, char *key, char *node) { if (!list) { @@ -530,26 +540,25 @@ return NULL; } - list->key = (char*)malloc(strlen(key) + 1); - strcpy(list->key, key); + list->key = key; list->node = strtoul(node, NULL, 16); - list->next = new_dk_list(); + X_FREE(node); + return list->next; } /* Function to return new pk_list object */ -static pk_list *new_pk_list() +static pk_list *new_pk_list(void) {
View file
libaacs-0.3.0.tar.bz2/src/file/keydbcfg.c -> libaacs-0.6.0.tar.bz2/src/file/keydbcfg.c
Changed
@@ -19,16 +19,21 @@ #include "keydbcfg.h" -#ifndef _WIN32 -# include "xdg.h" -# define get_config_home xdg_get_config_home -# define get_cache_home xdg_get_cache_home -# define get_config_system xdg_get_config_system -#else +#if defined(__APPLE__) +# include "darwin.h" +# define get_config_home darwin_get_config_home +# define get_cache_home darwin_get_cache_home +# define get_config_system darwin_get_config_system +#elif defined(_WIN32) # include "win32.h" # define get_config_home win32_get_config_home # define get_cache_home win32_get_config_home # define get_config_system win32_get_config_system +#else +# include "xdg.h" +# define get_config_home xdg_get_config_home +# define get_cache_home xdg_get_cache_home +# define get_config_system xdg_get_config_system #endif #include "util/strutl.h" @@ -38,7 +43,6 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> - #include <sys/types.h> #include <sys/stat.h> @@ -244,7 +248,7 @@ return result; } -int keydbcfg_load_pk_file(config_file *cf) +static int _load_pk_file(config_file *cf) { static const char pk_file_name = PK_FILE_NAME; FILE *fp; @@ -265,7 +269,7 @@ return result; } -int keydbcfg_load_cert_file(config_file *cf) +static int _load_cert_file(config_file *cf) { static const char cert_file_name = CERT_FILE_NAME; FILE *fp; @@ -317,7 +321,7 @@ return result; } -char *_keycache_file(const char *type, const uint8_t *disc_id) +static char *_keycache_file(const char *type, const uint8_t *disc_id) { const char *cache_dir = get_cache_home(); char disc_id_str41; @@ -402,7 +406,134 @@ return result; } -char *keydbcfg_find_config_file(void) +static char *_cache_file(const char *name) +{ + const char *cache_dir = get_cache_home(); + + if (!cache_dir) { + return NULL; + } + + return str_printf("%s/%s/%s", cache_dir, CFG_DIR, name); +} + +int cache_save(const char *name, uint32_t version, const void *data, uint32_t len) +{ + int result = 0; + char *file = _cache_file(name); + + if (file) { + if (_mkpath(file)) { + FILE *fp = fopen(file, "w"); + + if (fp) { + if (fwrite(&version, 1, 4, fp) == 4 && + fwrite(&len, 1, 4, fp) == 4 && + fwrite(data, 1, len, fp) == len) { + DEBUG(DBG_FILE, "Wrote %d bytes to %s\n", len + 8, file); + result = 1; + + } else { + DEBUG(DBG_FILE, "Error writing to %s\n", file); + } + + fclose(fp); + } + } + + X_FREE(file); + } + + return result; +} + +int cache_get(const char *name, uint32_t *version, uint32_t *len, void *buf) +{ + int result = 0; + char *file = _cache_file(name); + + *version = 0; + if (len) { + *len = 0; + } + + if (file) { + FILE *fp = fopen(file, "r"); + + if (fp) { + DEBUG(DBG_FILE, "Reading %s\n", file); + + if (fread(version, 1, 4, fp) == 4 && + (!len || fread(len, 1, 4, fp) == 4) && + (!buf || fread(buf, 1, *len, fp) == *len)) { + + DEBUG(DBG_FILE, "Read %d bytes from %s, version %d\n", 4 + (len ? 4 : 0) + (buf ? *len : 0), file, *version); + result = 1; + + } else { + DEBUG(DBG_FILE, "Error reading from %s\n", file); + } + + fclose(fp); + + } else { + DEBUG(DBG_FILE, "%s not found\n", file); + } + + X_FREE(file); + } + + return result; +} + +int cache_remove(const char *name) +{ + char *file = _cache_file(name); + int result = !remove(name); + if (!result) { + DEBUG(DBG_FILE, "Error removing %s\n", file); + } + X_FREE(file); + return result; +} + +void *cache_get_or_update(const char *type, const void *data, uint32_t *len, uint32_t version) +{ + uint32_t cache_len, cache_version; + uint8_t *cache_data = NULL; + + /* get cache version */ + cache_get(type, &cache_version, &cache_len, NULL); + + /* if cached data is later, use it */ + if (cache_len && cache_version > version) { + cache_data = malloc(cache_len); + + if (cache_get(type, &cache_version, &cache_len, cache_data)) { + DEBUG(DBG_AACS, "Using cached %s. Version: %d\n", type, cache_version); + *len = cache_len; + return cache_data; + } + + /* read failed, fall back to older version */ + X_FREE(cache_data); + } + + if (data) { + cache_data = malloc(*len); + memcpy(cache_data, data, *len); + + /* cached data is older, update cache */ + if (cache_version < version) { + cache_save(type, version, data, *len); + DEBUG(DBG_AACS, "Updated cached %s. Version: %d\n", type, version); + } + } + + return cache_data; +} + +static char *_find_config_file(void) { static const char cfg_file_name = CFG_FILE_NAME; @@ -422,3 +553,37 @@
View file
libaacs-0.3.0.tar.bz2/src/file/keydbcfg.h -> libaacs-0.6.0.tar.bz2/src/file/keydbcfg.h
Changed
@@ -113,18 +113,22 @@ /* Functions used throughout the parser */ AACS_PRIVATE int keydbcfg_parse_config(config_file *cfgfile, const char *path); -AACS_PRIVATE config_file *keydbcfg_new_config_file(); +AACS_PRIVATE config_file *keydbcfg_new_config_file(void); AACS_PRIVATE int keydbcfg_config_file_close(config_file *cfgfile); /* */ -AACS_PRIVATE char *keydbcfg_find_config_file(void); -AACS_PRIVATE int keydbcfg_load_cert_file(config_file *cf); -AACS_PRIVATE int keydbcfg_load_pk_file(config_file *cf); +AACS_PRIVATE config_file *keydbcfg_config_load(const char *configfile_path); AACS_PRIVATE int keycache_save(const char *type, const uint8_t *disc_id, const uint8_t *key, unsigned int len); AACS_PRIVATE int keycache_find(const char *type, const uint8_t *disc_id, uint8_t *key, unsigned int len); +AACS_PRIVATE int cache_get(const char *name, uint32_t *version, uint32_t *len, void *buf); /* use buf=NULL to get version and size */ +AACS_PRIVATE int cache_save(const char *name, uint32_t version, const void *data, uint32_t len); +AACS_PRIVATE int cache_remove(const char *name); + +AACS_PRIVATE void *cache_get_or_update(const char *type, const void *data, uint32_t *len, uint32_t version); + #endif
View file
libaacs-0.3.0.tar.bz2/src/keydbcfg-lexer.c -> libaacs-0.6.0.tar.bz2/src/keydbcfg-lexer.c
Changed
@@ -595,13 +595,21 @@ #include "keydbcfg-parser.h" +#define YY_NO_UNISTD_H + /* Disable some warnings triggered by generated scanner */ #ifdef __GNUC__ #pragma GCC diagnostic ignored "-Wredundant-decls" #pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" +#pragma GCC visibility push(hidden) #endif +int isatty(int i) { return 0; } + +#if 0 static char *trim_string(const char *string); +#endif /* Options to generate reentrant lexer that's POSIX lex compatible. The * bison-bridge option is also set since bison forces the use of a parameter * used to get yylval. This is handy anyway and some implementations of byacc @@ -609,7 +617,7 @@ */ #define YY_NO_INPUT 1 -#line 613 "keydbcfg-lexer.c" +#line 621 "keydbcfg-lexer.c" #define INITIAL 0 #define TITLE_STATE 1 @@ -846,9 +854,9 @@ register int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; -#line 80 "keydbcfg-lexer.l" +#line 88 "keydbcfg-lexer.l" -#line 852 "keydbcfg-lexer.c" +#line 860 "keydbcfg-lexer.c" yylval = yylval_param; @@ -947,14 +955,15 @@ case 1: YY_RULE_SETUP -#line 81 "keydbcfg-lexer.l" +#line 89 "keydbcfg-lexer.l" {} YY_BREAK case 2: YY_RULE_SETUP -#line 83 "keydbcfg-lexer.l" +#line 91 "keydbcfg-lexer.l" { - yylval->string = trim_string(yytext); + //yylval->string = trim_string(yytext); + yylval->string = yytext; BEGIN INITIAL; return DISC_TITLE; } @@ -962,7 +971,7 @@ case 3: /* rule 3 can match eol */ YY_RULE_SETUP -#line 88 "keydbcfg-lexer.l" +#line 97 "keydbcfg-lexer.l" { printf("Bad entry at line %u!\n", yylineno); BEGIN INITIAL; @@ -971,7 +980,7 @@ YY_BREAK case 4: YY_RULE_SETUP -#line 94 "keydbcfg-lexer.l" +#line 103 "keydbcfg-lexer.l" { /* strip the '0x' portion of hexstring */ yylval->string = yytext + 2; @@ -980,7 +989,7 @@ YY_BREAK case 5: YY_RULE_SETUP -#line 99 "keydbcfg-lexer.l" +#line 108 "keydbcfg-lexer.l" { yylval->digit = (unsigned int)atoi(yytext); return DIGIT; @@ -988,132 +997,132 @@ YY_BREAK case 6: YY_RULE_SETUP -#line 104 "keydbcfg-lexer.l" +#line 113 "keydbcfg-lexer.l" { return KEYWORD_DEVICE_KEY; } YY_BREAK case 7: YY_RULE_SETUP -#line 105 "keydbcfg-lexer.l" +#line 114 "keydbcfg-lexer.l" { return KEYWORD_DEVICE_NODE; } YY_BREAK case 8: YY_RULE_SETUP -#line 106 "keydbcfg-lexer.l" +#line 115 "keydbcfg-lexer.l" { return KEYWORD_HOST_PRIV_KEY; } YY_BREAK case 9: YY_RULE_SETUP -#line 107 "keydbcfg-lexer.l" +#line 116 "keydbcfg-lexer.l" { return KEYWORD_HOST_CERT; } YY_BREAK case 10: YY_RULE_SETUP -#line 108 "keydbcfg-lexer.l" +#line 117 "keydbcfg-lexer.l" { return KEYWORD_HOST_NONCE; } YY_BREAK case 11: YY_RULE_SETUP -#line 109 "keydbcfg-lexer.l" +#line 118 "keydbcfg-lexer.l" { return KEYWORD_HOST_KEY_POINT; } YY_BREAK case 12: YY_RULE_SETUP -#line 111 "keydbcfg-lexer.l" +#line 120 "keydbcfg-lexer.l" { return ENTRY_ID_DK; } YY_BREAK case 13: YY_RULE_SETUP -#line 112 "keydbcfg-lexer.l" +#line 121 "keydbcfg-lexer.l" { return ENTRY_ID_PK; } YY_BREAK case 14: YY_RULE_SETUP -#line 113 "keydbcfg-lexer.l" +#line 122 "keydbcfg-lexer.l" { return ENTRY_ID_HC; } YY_BREAK case 15: YY_RULE_SETUP -#line 114 "keydbcfg-lexer.l" +#line 123 "keydbcfg-lexer.l" { return ENTRY_ID_DATE; } YY_BREAK case 16: YY_RULE_SETUP -#line 115 "keydbcfg-lexer.l" +#line 124 "keydbcfg-lexer.l" { return ENTRY_ID_MEK; } YY_BREAK case 17: YY_RULE_SETUP -#line 116 "keydbcfg-lexer.l" +#line 125 "keydbcfg-lexer.l" { return ENTRY_ID_VID; } YY_BREAK case 18: YY_RULE_SETUP -#line 117 "keydbcfg-lexer.l" +#line 126 "keydbcfg-lexer.l" { return ENTRY_ID_BN; } YY_BREAK case 19: YY_RULE_SETUP -#line 118 "keydbcfg-lexer.l" +#line 127 "keydbcfg-lexer.l" { return ENTRY_ID_VUK; } YY_BREAK case 20: YY_RULE_SETUP -#line 119 "keydbcfg-lexer.l" +#line 128 "keydbcfg-lexer.l" { return ENTRY_ID_PAK; } YY_BREAK case 21: YY_RULE_SETUP -#line 120 "keydbcfg-lexer.l" +#line 129 "keydbcfg-lexer.l" { return ENTRY_ID_TK; } YY_BREAK case 22: YY_RULE_SETUP -#line 121 "keydbcfg-lexer.l" +#line 130 "keydbcfg-lexer.l" { return ENTRY_ID_UK; } YY_BREAK case 23: YY_RULE_SETUP -#line 123 "keydbcfg-lexer.l" +#line 132 "keydbcfg-lexer.l" { BEGIN TITLE_STATE; return PUNCT_EQUALS_SIGN; } YY_BREAK case 24:
View file
libaacs-0.3.0.tar.bz2/src/keydbcfg-parser.c -> libaacs-0.6.0.tar.bz2/src/keydbcfg-parser.c
Changed
@@ -73,99 +73,9 @@ /* Copy the first part of user declarations. */ -/* Line 268 of yacc.c */ -#line 1 "keydbcfg-parser.y" - -/* - * This file is part of libaacs - * Copyright (C) 2010 gates - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see - * <http://www.gnu.org/licenses/>. - */ - -#include "file/keydbcfg.h" -#include "util/macro.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -/* Disable some warnings triggered by generated parser */ -#if defined __GNUC__ -#pragma GCC diagnostic ignored "-Wredundant-decls" -#pragma GCC diagnostic ignored "-Wimplicit-function-declaration" -#pragma GCC diagnostic ignored "-Wunused-parameter" -#endif - -/* Fix some warnings trigger by -Wundef which can't be ignored */ -#define YYENABLE_NLS 0 -#define YYLTYPE_IS_TRIVIAL 0 - -#define DIGIT_KEY_PAIR_LIST_FREE(X) do \ -{ \ - while (X) \ - { \ - digit_key_pair_list *next = X->next; \ - X_FREE(X->key_pair.key); \ - X_FREE(X); \ - X = next; \ - } \ -} while (0); - -/* enum used in certain functions to add proper title entry */ -enum -{ - ENTRY_TYPE_DISCID, - ENTRY_TYPE_TITLE, - ENTRY_TYPE_DATE, - ENTRY_TYPE_MEK, - ENTRY_TYPE_VID, - ENTRY_TYPE_BN, - ENTRY_TYPE_VUK, - ENTRY_TYPE_PAK, - ENTRY_TYPE_TK, - ENTRY_TYPE_UK -}; - -static dk_list *new_dk_list(); -static dk_list *add_dk_list_entry(dk_list *list, const char *key, - const char *node); -static pk_list *new_pk_list(); -static pk_list *add_pk_list_entry(pk_list *list, const char *key); -static cert_list *new_cert_list(); -static cert_list *add_cert_list(cert_list *list, const char *host_priv_key, - const char *host_cert, const char *host_nonce, - const char *host_key_point); -static title_entry_list *new_title_entry_list(); -static int add_entry(title_entry_list *list, int type, const char *entry); -static digit_key_pair_list *new_digit_key_pair_list(); -static digit_key_pair_list *add_digit_key_pair_entry(digit_key_pair_list *list, - int type, unsigned int digit, const char *key); -static int add_date_entry(title_entry_list *list, unsigned int year, - unsigned int month, unsigned int day); -void yyerror (void *scanner, dk_list *dklist, pk_list *pklist, cert_list *clist, - title_entry_list *celist, digit_key_pair_list *dkplist, - const char *msg); -extern int libaacs_yyget_lineno (void *scanner); - -/* uncomment the line below for debugging */ -// int yydebug = 1; - /* Line 268 of yacc.c */ -#line 169 "keydbcfg-parser.c" +#line 79 "keydbcfg-parser.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -185,6 +95,17 @@ # define YYTOKEN_TABLE 0 #endif +/* "%code requires" blocks. */ + +/* Line 288 of yacc.c */ +#line 1 "keydbcfg-parser.y" + +#include "file/keydbcfg.h" + + + +/* Line 288 of yacc.c */ +#line 109 "keydbcfg-parser.c" /* Tokens. */ #ifndef YYTOKENTYPE @@ -254,7 +175,7 @@ { /* Line 293 of yacc.c */ -#line 106 "keydbcfg-parser.y" +#line 108 "keydbcfg-parser.y" char *string; unsigned int digit; @@ -262,7 +183,7 @@ /* Line 293 of yacc.c */ -#line 266 "keydbcfg-parser.c" +#line 187 "keydbcfg-parser.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -274,7 +195,101 @@ /* Line 343 of yacc.c */ -#line 278 "keydbcfg-parser.c" +#line 199 "keydbcfg-parser.c" +/* Unqualified %code blocks. */ + +/* Line 344 of yacc.c */ +#line 5 "keydbcfg-parser.y" + +/* + * This file is part of libaacs + * Copyright (C) 2010 gates + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * <http://www.gnu.org/licenses/>. + */ + +#include "util/macro.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +/* Disable some warnings triggered by generated parser */ +#if defined __GNUC__ +#pragma GCC diagnostic ignored "-Wimplicit-function-declaration" +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC visibility push(hidden) +#endif + +/* Fix some warnings trigger by -Wundef which can't be ignored */ +#define YYENABLE_NLS 0 +#define YYLTYPE_IS_TRIVIAL 0 + +#define DIGIT_KEY_PAIR_LIST_FREE(X) do \ +{ \ + while (X) \ + { \ + digit_key_pair_list *pnext = X->next;\ + X_FREE(X->key_pair.key); \ + X_FREE(X); \ + X = pnext; \ + } \ +} while (0); + +/* enum used in certain functions to add proper title entry */ +enum +{ + ENTRY_TYPE_DISCID, + ENTRY_TYPE_TITLE,
View file
libaacs-0.3.0.tar.bz2/src/libaacs/aacs-version.h -> libaacs-0.6.0.tar.bz2/src/libaacs/aacs-version.h
Changed
@@ -26,10 +26,10 @@ ((micro) * 1)) #define AACS_VERSION_MAJOR 0 -#define AACS_VERSION_MINOR 3 +#define AACS_VERSION_MINOR 6 #define AACS_VERSION_MICRO 0 -#define AACS_VERSION_STRING "0.3.0" +#define AACS_VERSION_STRING "0.6.0" #define AACS_VERSION \ AACS_VERSION_CODE(AACS_VERSION_MAJOR, AACS_VERSION_MINOR, AACS_VERSION_MICRO)
View file
libaacs-0.3.0.tar.bz2/src/libaacs/aacs.c -> libaacs-0.6.0.tar.bz2/src/libaacs/aacs.c
Changed
@@ -45,13 +45,25 @@ struct aacs { - uint8_t pk16, mk16, vuk16, vid16, disc_id20, *uks; - uint32_t num_uks; - struct config_file_t *cf; - struct title_entry_list_t *ce; + /* current disc */ + char *path; + int mkb_version; + uint8_t disc_id20; - uint32_t num_titles; - uint16_t current_cps_unit; + /* VID is cached for BD-J */ + uint8_t vid16; + /* PMSN is cached for BD-J */ + uint8_t pmsn16; + + /* unit key for each CPS unit */ + uint32_t num_uks; + uint8_t *uks; + + /* CPS unit of currently selected title */ + uint16_t current_cps_unit; + + /* title -> CPS unit mappings */ + uint32_t num_titles; uint16_t *cps_units; /* 0 = first play ; 1 = top menu ; 2 = title 1 ... */ }; @@ -63,7 +75,7 @@ uint8_t *mk) { gcry_cipher_hd_t gcry_h; - int a, ret = 0; + int a; uint8_t dec_vd16; char str40; @@ -87,13 +99,53 @@ if (!memcmp(dec_vd, "\x01\x23\x45\x67\x89\xAB\xCD\xEF", 8)) { DEBUG(DBG_AACS, "Processing key %s is valid!\n", print_hex(str, pk, 16)); - ret = 1; + return AACS_SUCCESS; + } + + return AACS_ERROR_NO_PK; +} + +static int _rl_verify_signature(const uint8_t *rl, size_t size) +{ + int entries = MKINT_BE32(rl + 12 + 8); + size_t len = 12 + 12 + 8 * entries; /* type_and_version_rec=12, rl_header=12, rl=entries*8 */ + + if (len + 40 > size) { + DEBUG(DBG_AACS, "revocation list size mismatch\n"); + return 0; } - return ret; + return crypto_aacs_verify_aacsla(rl + len, rl, len); +} + +static void _update_drl(MKB *mkb) +{ + uint32_t version = mkb_version(mkb); + uint32_t cache_version; + + if (!cache_get("drl", &cache_version, NULL, NULL) || cache_version < version) { + size_t drl_len; + const uint8_t *drl_rec = mkb_drive_revokation_entries(mkb, &drl_len); + const uint8_t *v_rec = mkb_type_and_version_record(mkb); + + if (drl_rec && v_rec) { + drl_rec -= 4; + drl_len += 4; + + uint8_t *data = malloc(12 + drl_len); + memcpy(data, v_rec, 12); + memcpy(data + 12, drl_rec, drl_len); + if (!_rl_verify_signature(data, drl_len + 12)) { + DEBUG(DBG_AACS | DBG_CRIT, "invalid drive revocation list signature, not using it\n"); + } else { + cache_save("drl", version, data, drl_len + 12); + } + X_FREE(data); + } + } } -static int _calc_mk(AACS *aacs, const char *path) +static int _calc_mk(AACS *aacs, uint8_t *mk, pk_list *pkl) { int a, num_uvs = 0; size_t len; @@ -102,13 +154,16 @@ const uint8_t *rec, *uvs; /* Skip if retrieved from config file */ - if (memcmp(aacs->mk, empty_key, 16)) - return 1; + if (memcmp(mk, empty_key, 16)) { + return AACS_SUCCESS; + } DEBUG(DBG_AACS, "Calculate media key...\n"); - if ((mkb = mkb_open(path))) { + if ((mkb = mkb_open(aacs->path))) { DEBUG(DBG_AACS, "Get UVS...\n"); + _update_drl(mkb); + aacs->mkb_version = mkb_version(mkb); uvs = mkb_subdiff_records(mkb, &len); rec = uvs; while (rec < uvs + len) { @@ -120,134 +175,208 @@ DEBUG(DBG_AACS, "Get cvalues...\n"); rec = mkb_cvalues(mkb, &len); - if (aacs->cf->pkl) { - pk_list *pkcursor = aacs->cf->pkl; - while (pkcursor && pkcursor->key) { - hexstring_to_hex_array(aacs->pk, sizeof(aacs->pk), - pkcursor->key); + + for (; pkl && pkl->key; pkl = pkl->next) { + uint8_t pk16; + hexstring_to_hex_array(pk, sizeof(pk), pkl->key); DEBUG(DBG_AACS, "Trying processing key...\n"); for (a = 0; a < num_uvs; a++) { - if (_validate_pk(aacs->pk, rec + a * 16, uvs + 1 + a * 5, - mkb_mk_dv(mkb), aacs->mk)) { + if (AACS_SUCCESS == _validate_pk(pk, rec + a * 16, uvs + 1 + a * 5, + mkb_mk_dv(mkb), mk)) { mkb_close(mkb); X_FREE(buf); char str40; - DEBUG(DBG_AACS, "Media key: %s\n", print_hex(str, aacs->mk, - 16)); - return 1; + DEBUG(DBG_AACS, "Media key: %s\n", print_hex(str, mk, 16)); + return AACS_SUCCESS; } } - - pkcursor = pkcursor->next; } - } mkb_close(mkb); X_FREE(buf); + + DEBUG(DBG_AACS | DBG_CRIT, "Error calculating media key. Missing right processing key ?\n"); + return AACS_ERROR_NO_PK; } - DEBUG(DBG_AACS, "Error calculating media key!\n"); + DEBUG(DBG_AACS | DBG_CRIT, "Error opening %s/AACS/MKB_RO.inf\n", aacs->path); + return AACS_ERROR_CORRUPTED_DISC; +} - return 0; +static MKB *_get_hrl_mkb(MMC *mmc) +{ + MKB *mkb = NULL; + uint8_t *data; + int mkb_size; + + data = mmc_read_mkb(mmc, 0, &mkb_size); + + /* check acquired hrl signature */ + if (data && mkb_size > 0) { + if (_rl_verify_signature(data, mkb_size)) { + mkb = mkb_init(data, mkb_size); + DEBUG(DBG_AACS, "Partial hrl mkb read. Version: %d\n", mkb_version(mkb)); + } else { + DEBUG(DBG_AACS | DBG_CRIT, "invalid host revocation list signature, not using it\n"); + X_FREE(data); + } + } + + if (mkb) { + /* use latest version, keep cache up-to-date */ + uint32_t size; + size = mkb_data_size(mkb); + data = cache_get_or_update("hrl", mkb_data(mkb), &size, mkb_version(mkb)); + + if (!_rl_verify_signature(data, size)) { + DEBUG(DBG_AACS | DBG_CRIT, "invalid cached revocation list signature, replacing it\n"); + cache_save("hrl", mkb_version(mkb), mkb_data(mkb), mkb_data_size(mkb)); + X_FREE(data); + } else { + /* use cached version */ + mkb_close(mkb); + mkb = mkb_init(data, size);
View file
libaacs-0.3.0.tar.bz2/src/libaacs/aacs.h -> libaacs-0.6.0.tar.bz2/src/libaacs/aacs.h
Changed
@@ -26,16 +26,39 @@ # define AACS_PUBLIC #endif +/* aacs_open2() error codes */ +#define AACS_SUCCESS 0 /* no errors */ +#define AACS_ERROR_CORRUPTED_DISC -1 /* opening or reading of AACS files failed */ +#define AACS_ERROR_NO_CONFIG -2 /* missing config file */ +#define AACS_ERROR_NO_PK -3 /* no matching processing key */ +#define AACS_ERROR_NO_CERT -4 /* no valid certificate */ +#define AACS_ERROR_CERT_REVOKED -5 /* certificate has been revoked */ +#define AACS_ERROR_MMC_OPEN -6 /* MMC open failed (no MMC drive ?) */ +#define AACS_ERROR_MMC_FAILURE -7 /* MMC failed */ + typedef struct aacs AACS; AACS_PUBLIC void aacs_get_version(int *major, int *minor, int *micro); AACS_PUBLIC AACS *aacs_open(const char *path, const char *keyfile_path); +AACS_PUBLIC AACS *aacs_open2(const char *path, const char *keyfile_path, int *error_code); AACS_PUBLIC void aacs_close(AACS *aacs); AACS_PUBLIC void aacs_select_title(AACS *aacs, uint32_t title); /* 0 - top menu, 0xffff - first play */ AACS_PUBLIC int aacs_decrypt_unit(AACS *aacs, uint8_t *buf); + +/* Disc information */ +AACS_PUBLIC int aacs_get_mkb_version(AACS *aacs); AACS_PUBLIC const uint8_t *aacs_get_disc_id(AACS *aacs); -AACS_PUBLIC const uint8_t *aacs_get_vid(AACS *aacs); +AACS_PUBLIC const uint8_t *aacs_get_vid(AACS *aacs); /* may fail even if disc can be decrypted */ +AACS_PUBLIC const uint8_t *aacs_get_pmsn(AACS *aacs); /* may fail even if disc can be decrypted */ + +/* revocation lists */ +typedef struct { + uint16_t range; + uint8_t id6; +} AACS_RL_ENTRY; +AACS_PUBLIC AACS_RL_ENTRY *aacs_get_hrl(int *num_entries, int *mkb_version); +AACS_PUBLIC AACS_RL_ENTRY *aacs_get_drl(int *num_entries, int *mkb_version); #endif /* AACS_H_ */
View file
libaacs-0.3.0.tar.bz2/src/libaacs/crypto.c -> libaacs-0.6.0.tar.bz2/src/libaacs/crypto.c
Changed
@@ -151,7 +151,7 @@ } } -#ifdef HAVE_STRERROR_R +#if defined(HAVE_STRERROR_R) && defined(HAVE_LIBGPG_ERROR) #define LOG_GCRY_ERROR(msg, func, err) \ char errstr100 = {0}; \ gpg_strerror_r(err, errstr, sizeof(errstr)); \
View file
libaacs-0.3.0.tar.bz2/src/libaacs/mkb.c -> libaacs-0.6.0.tar.bz2/src/libaacs/mkb.c
Changed
@@ -43,7 +43,7 @@ if (mkb->bufpos == type) { DEBUG(DBG_MKB, "Retrieved MKB record 0x%02x (%p)\n", type, - mkb->buf + pos); + (void*)(mkb->buf + pos)); return mkb->buf + pos; } @@ -62,7 +62,7 @@ f_name = str_printf("%s/AACS/MKB_RO.inf", path); - DEBUG(DBG_MKB, "Opening MKB %s... (%p)\n", f_name, mkb); + DEBUG(DBG_MKB, "Opening MKB %s...\n", f_name); fp = file_open(f_name, "rb"); X_FREE(f_name); @@ -76,24 +76,56 @@ file_read(fp, mkb->buf, mkb->size); - DEBUG(DBG_MKB, "MKB size: %zd (%p)\n", mkb->size, mkb); - DEBUG(DBG_MKB, "MKB version: %d (%p)\n", mkb_version(mkb), mkb); + DEBUG(DBG_MKB, "MKB size: %zd\n", mkb->size); + DEBUG(DBG_MKB, "MKB version: %d\n", mkb_version(mkb)); file_close(fp); return mkb; } - DEBUG(DBG_MKB, "Error opening MKB! (%p)\n", mkb); + DEBUG(DBG_MKB, "Error opening MKB!\n"); return NULL; } +MKB *mkb_init(uint8_t *data, int len) +{ + MKB *mkb = malloc(sizeof(MKB)); + + mkb->size = len; + mkb->buf = data; + + return mkb; +} + void mkb_close(MKB *mkb) { - X_FREE(mkb->buf); - X_FREE(mkb); + if (mkb) { + X_FREE(mkb->buf); + X_FREE(mkb); + } } +const uint8_t *mkb_data(MKB *mkb) +{ + return mkb->buf; +} + +size_t mkb_data_size(MKB *mkb) +{ + size_t pos = 0; + + while (pos + 4 <= mkb->size) { + if (!mkb->bufpos) { + break; + } + pos += MKINT_BE24(mkb->buf + pos + 1); + } + + return pos; +} + + uint8_t mkb_type(MKB *mkb) { const uint8_t *rec = _record(mkb, 0x10, NULL); @@ -119,17 +151,25 @@ const uint8_t *mkb_host_revokation_entries(MKB *mkb, size_t *len) { const uint8_t *rec = _record(mkb, 0x21, len); - *len -= 4; - return rec + 4; + if (rec) { + rec += 4; + *len -= 4; + } + + return rec; } const uint8_t *mkb_drive_revokation_entries(MKB *mkb, size_t *len) { const uint8_t *rec = _record(mkb, 0x20, len); - *len -= 4; - return rec + 4; + if (rec) { + rec += 4; + *len -= 4; + } + + return rec; } const uint8_t *mkb_subdiff_records(MKB *mkb, size_t *len) @@ -161,3 +201,58 @@ return rec + 4; } + +static int _cert_is_revoked(const uint8_t *rl, size_t rl_size, const uint8_t *cert_id_bin) +{ + if (rl) { + uint64_t cert_id = MKINT_BE48(cert_id_bin); + /*int total = MKINT_BE32(rl);*/ + int entries = MKINT_BE32(rl + 4); + int ii; + + size_t rec_len = 4 + 4 + 8 * entries + 40; + if (rec_len > rl_size) { + DEBUG(DBG_MKB, "revocation list size mismatch\n"); + return -1; + } + + rl += 8; + for (ii=0; ii < entries; ii++) { + uint16_t len = MKINT_BE16(rl); + uint64_t id = MKINT_BE48(rl + 2); + if (cert_id >= id && cert_id <= id + len) { + DEBUG(DBG_MKB, "Certificate %12llx has been revoked\n", (unsigned long long)cert_id); + return 1; + } + rl += 8; + } + } + + return 0; +} + +int mkb_host_cert_is_revoked(MKB *mkb, const uint8_t *cert_id) +{ + if (mkb) { + size_t rl_size = 0; + const uint8_t *rl = mkb_host_revokation_entries(mkb, &rl_size); + if (rl) { + return _cert_is_revoked(rl, rl_size, cert_id); + } + } + + return -1; +} + +int mkb_drive_cert_is_revoked(MKB *mkb, const uint8_t *cert_id) +{ + if (mkb) { + size_t rl_size = 0; + const uint8_t *rl = mkb_drive_revokation_entries(mkb, &rl_size); + if (rl) { + return _cert_is_revoked(rl, rl_size, cert_id); + } + } + + return -1; +}
View file
libaacs-0.3.0.tar.bz2/src/libaacs/mkb.h -> libaacs-0.6.0.tar.bz2/src/libaacs/mkb.h
Changed
@@ -28,8 +28,12 @@ typedef struct mkb MKB; AACS_PRIVATE MKB *mkb_open(const char *path); // init MKB +AACS_PRIVATE MKB *mkb_init(uint8_t *data, int len); // init MKB from data AACS_PRIVATE void mkb_close(MKB *mkb); // free MKB +AACS_PRIVATE const uint8_t *mkb_data(MKB *mkb); +AACS_PRIVATE size_t mkb_data_size(MKB *mkb); + // returns type AACS_PRIVATE uint8_t mkb_type(MKB *mkb); // returns version @@ -51,6 +55,9 @@ // returns MKB signature AACS_PRIVATE const uint8_t *mkb_signature(MKB *mkb, size_t *len); +AACS_PRIVATE int mkb_host_cert_is_revoked(MKB *mkb, const uint8_t *cert_id); +AACS_PRIVATE int mkb_drive_cert_is_revoked(MKB *mkb, const uint8_t *cert_id); + /* The Media Key block is of variable size but must be a multiple of 4 * MKB Structure: * Type and Version record (12 bytes)
View file
libaacs-0.3.0.tar.bz2/src/libaacs/mmc.c -> libaacs-0.6.0.tar.bz2/src/libaacs/mmc.c
Changed
@@ -1,3 +1,4 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* * This file is part of libaacs * Copyright (C) 2009-2010 Obliter0n @@ -33,10 +34,51 @@ #include <unistd.h> #include <string.h> +#include <stdio.h> + +#ifdef USE_IOKIT + +#include <Carbon/Carbon.h> + +#include <IOKit/IOKitLib.h> +#include <IOKit/IOCFPlugIn.h> + +#include <DiskArbitration/DiskArbitration.h> + +/* need to undefine VERSION as one of the members of struct + SCSICmd_INQUIRY_StandardData is named VERSION (see + IOKit/scsi/SCSICmds_INQUIRY_Definitions.h) */ +#undef VERSION +#include <IOKit/scsi/SCSITaskLib.h> + +#include <IOKit/storage/IOBDMediaBSDClient.h> + +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif + +#ifdef HAVE_SYS_PARAM_H +#include <sys/param.h> +#endif + +#ifdef HAVE_SYS_MOUNT_H +#include <sys/mount.h> +#endif + +#ifdef HAVE_LIBGEN_H +#include <libgen.h> +#endif + +#endif + #ifdef HAVE_MNTENT_H #include <mntent.h> #endif +#ifdef HAVE_LIMITS_H +#include <limits.h> +#endif + #ifdef HAVE_LINUX_CDROM_H #include <sys/ioctl.h> #include <linux/cdrom.h> @@ -84,9 +126,19 @@ #endif // defined(_WIN32) - struct mmc { -#if defined(_WIN32) +#if defined(USE_IOKIT) + MMCDeviceInterface **mmcInterface; + SCSITaskDeviceInterface **taskInterface; + + /* device short name (ie disk1) */ + char bsd_name128; + + /* for mounting/unmounting the disc */ + DADiskRef disk; + DASessionRef session; + bool is_mounted; +#elif defined(_WIN32) HANDLE fd; #else int fd; @@ -128,21 +180,20 @@ int a = ioctl(mmc->fd, CDROM_SEND_PACKET, &cgc); char str512; - DEBUG(DBG_MMC, "Send LINUX MMC cmd %s: (%p)\n", - print_hex(str, cmd, 16), mmc); + DEBUG(DBG_MMC, "Send LINUX MMC cmd %s:\n", + print_hex(str, cmd, 16)); if (tx) { - DEBUG(DBG_MMC, " Buffer: %s -> (%p)\n", print_hex(str, buf, tx), mmc); + DEBUG(DBG_MMC, " Buffer: %s ->\n", print_hex(str, buf, tx>255?255:tx)); } else { - DEBUG(DBG_MMC, " Buffer: %s <- (%p)\n", print_hex(str, buf, rx), mmc); + DEBUG(DBG_MMC, " Buffer: %s <-\n", print_hex(str, buf, rx>255?255:rx)); } if (a >= 0) { - DEBUG(DBG_MMC, " Send succeeded! %d (%p)\n", a, mmc); + DEBUG(DBG_MMC, " Send succeeded! %d\n", a); return 1; } - DEBUG(DBG_MMC, " Send failed! %d %s (%p)\n", a, strerror(errno), - mmc); + DEBUG(DBG_MMC, " Send failed! %d %s\n", a, strerror(errno)); } #elif defined(_WIN32) @@ -194,18 +245,98 @@ &dwBytesReturned, NULL)) { if (sptd_sb.sptd.ScsiStatus == 0 /* STATUS_GOOD */) { - DEBUG(DBG_MMC, " Send succeeded! (%p)\n", mmc); + DEBUG(DBG_MMC, " Send succeeded!\n"); return 1; } } - DEBUG(DBG_MMC, " Send failed! (%p)\n", mmc); + DEBUG(DBG_MMC, " Send failed!\n"); + +#elif defined(USE_IOKIT) + SCSITaskInterface **task = NULL; + SCSI_Sense_Data sense; + SCSITaskStatus status; + SCSITaskSGElement iov; + UInt8 direction; + UInt64 sent; + int rc; + + if (NULL == mmc->taskInterface) { + return 0; + } + + do { + task = (*mmc->taskInterface)->CreateSCSITask (mmc->taskInterface); + if (NULL == task) { + DEBUG(DBG_MMC, "Could not create SCSI Task\n"); + break; + } + + iov.address = (uintptr_t) buf; + iov.length = tx ? tx : rx; + + if (buf) { + direction = tx ? kSCSIDataTransfer_FromInitiatorToTarget : + kSCSIDataTransfer_FromTargetToInitiator; + } else { + direction = kSCSIDataTransfer_NoDataTransfer; + } + + rc = (*task)->SetCommandDescriptorBlock (task, cmd, 16); + if (kIOReturnSuccess != rc) { + DEBUG(DBG_MMC, "Error setting SCSI command\n"); + break; + } + + rc = (*task)->SetScatterGatherEntries (task, &iov, 1, iov.length, direction); + if (kIOReturnSuccess != rc) { + DEBUG(DBG_MMC, "Error setting SCSI scatter gather entries\n"); + break; + } + + rc = (*task)->SetTimeoutDuration (task, 5000000); + if (kIOReturnSuccess != rc) { + DEBUG(DBG_MMC, "Error setting SCSI command timeout\n"); + break; + } + + memset (&sense, 0, sizeof (sense)); + + rc = (*task)->ExecuteTaskSync (task, &sense, &status, &sent); + + char str512; + DEBUG(DBG_MMC, "Send SCSI MMC cmd %s:\n", print_hex(str, cmd, 16)); + if (tx) { + DEBUG(DBG_MMC, " Buffer: %s ->\n", print_hex(str, buf, tx>255?255:tx)); + } else { + DEBUG(DBG_MMC, " Buffer: %s <-\n", print_hex(str, buf, rx>255?255:rx)); + } + + if (kIOReturnSuccess != rc || status != 0) { + DEBUG(DBG_MMC, " Send failed!\n"); + break; + } else { + DEBUG(DBG_MMC, " Send succeeded! sent = %lld status = %u. response = %x\n", + (unsigned long long) sent, status, sense.VALID_RESPONSE_CODE); + } + + (*task)->Release (task); + + return 1; + } while (0); + if (task) { + (*task)->Release (task); + } #endif return 0; }
View file
libaacs-0.3.0.tar.bz2/src/libaacs/mmc.h -> libaacs-0.6.0.tar.bz2/src/libaacs/mmc.h
Changed
@@ -1,6 +1,7 @@ /* * This file is part of libaacs * Copyright (C) 2009-2010 Obliter0n + * Copyright (C) 2010 npzacs * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -26,9 +27,16 @@ typedef struct mmc MMC; +#define MMC_SUCCESS 0 /* no errors */ +#define MMC_ERROR -1 /* MMC failed */ +#define MMC_ERROR_CERT_REVOKED -2 /* revoked certificate */ + AACS_PRIVATE MMC *mmc_open(const char *path); AACS_PRIVATE void mmc_close(MMC *mmc); AACS_PRIVATE int mmc_read_vid(MMC *mmc, const uint8_t *host_priv_key, const uint8_t *host_cert, - uint8_t *vid); + uint8_t *vid, uint8_t *pmsn); + +/* read partial MKB */ +AACS_PRIVATE uint8_t *mmc_read_mkb(MMC *mmc, int address, int *size); #endif /* MMC_H_ */
View file
libaacs-0.3.0.tar.bz2/src/util/logging.c -> libaacs-0.6.0.tar.bz2/src/util/logging.c
Changed
@@ -69,9 +69,9 @@ va_list args; va_start(args, format); - vsprintf(buffer, format, args); + sprintf(buffer, "libaacs: %s:%d: %s", file, line, format); + vfprintf(logfile, buffer, args); va_end(args); - fprintf(logfile, "%s:%d: %s", file, line, buffer); } }
View file
libaacs-0.3.0.tar.bz2/src/util/logging.h -> libaacs-0.6.0.tar.bz2/src/util/logging.h
Changed
@@ -24,7 +24,7 @@ #include <stdint.h> -#define DEBUG(X,Y,...) aacs_debug(__FILE__,__LINE__,X,Y,##__VA_ARGS__) +#define DEBUG(MASK,...) aacs_debug(__FILE__,__LINE__,MASK,##__VA_ARGS__) enum debug_mask_enum { DBG_RESERVED = 0x0001,
View file
libaacs-0.3.0.tar.bz2/src/util/macro.h -> libaacs-0.6.0.tar.bz2/src/util/macro.h
Changed
@@ -30,6 +30,9 @@ #define MKINT_BE16(X) ( (X)0 << 8 | (X)1 ) #define MKINT_BE24(X) ( (X)0 << 16 | (X)1 << 8 | (X)2 ) #define MKINT_BE32(X) ( (X)0 << 24 | (X)1 << 16 | (X)2 << 8 | (X)3 ) +#define MKINT_BE48(X) ( (uint64_t)((X)0) << 40 | (uint64_t)((X)1) << 32 | (uint64_t)((X)2) << 24 | \ + (uint64_t)((X)3) << 16 | (uint64_t)((X)4) << 8 | (uint64_t)((X)5) ) + #define X_FREE(X) do { if (X) free(X); X = NULL; } while(0) #endif /* MACRO_H_ */
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.