#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: cdf.c,v 1.65 2014/08/07 09:38:35 christos Exp $")
+FILE_RCSID("@(#)$File: cdf.c,v 1.66 2014/08/27 06:59:35 christos Exp $")
#endif
#include <assert.h>
"\05SummaryInformation", scn);
}
-int
-cdf_read_catalog(cdf_info_t *info, const cdf_header_t *h,
- const cdf_sat_t *sat, const cdf_sat_t *ssat, const cdf_stream_t *sst,
- const cdf_dir_t *dir, cdf_stream_t *scn)
-{
- return cdf_read_user_stream(info, h, sat, ssat, sst, dir,
- "Catalog", scn);
-}
-
int
cdf_read_user_stream(const cdf_info_t *info, const cdf_header_t *h,
const cdf_sat_t *sat, const cdf_sat_t *ssat, const cdf_stream_t *sst,
int cdf_read_user_stream(const cdf_info_t *, const cdf_header_t *,
const cdf_sat_t *, const cdf_sat_t *, const cdf_stream_t *,
const cdf_dir_t *, const char *, cdf_stream_t *);
-int cdf_read_catalog(cdf_info_t *, const cdf_header_t *,
- const cdf_sat_t *, const cdf_sat_t *, const cdf_stream_t *,
- const cdf_dir_t *, cdf_stream_t *);
+#define cdf_read_catalog(info, header, sat, ssat, stream, dir, scn) \
+ cdf_read_user_stream(info, header, sat, ssat, stream, dir, "Catalog", \
+ scn)
+#define cdf_read_encrypted_package(info, header, sat, ssat, stream, dir, scn) \
+ cdf_read_user_stream(info, header, sat, ssat, stream, dir, \
+ "EncryptedPackage", scn)
int cdf_read_summary_info(const cdf_info_t *, const cdf_header_t *,
const cdf_sat_t *, const cdf_sat_t *, const cdf_stream_t *,
const cdf_dir_t *, cdf_stream_t *);
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: readcdf.c,v 1.45 2014/07/24 19:35:39 christos Exp $")
+FILE_RCSID("@(#)$File: readcdf.c,v 1.46 2014/08/27 06:59:35 christos Exp $")
#endif
#include <assert.h>
if ((i = cdf_read_catalog(&info, &h, &sat, &ssat, &sst,
&dir, &scn)) == -1) {
corrupt = expn;
- expn = "No summary info";
+ if ((i = cdf_read_encrypted_package(&info, &h,
+ &sat, &ssat, &sst, &dir, &scn)) == -1)
+ expn = "No summary info";
+ else {
+ expn = "Encrypted";
+ i = -1;
+ }
goto out4;
}
#ifdef CDF_DEBUG