manifest.cpp revision 0aa6851583f4cb074ccc163d5b53948b9429ab77
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * IPRT - Manifest file handling.
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * Copyright (C) 2009 Sun Microsystems, Inc.
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * This file is part of VirtualBox Open Source Edition (OSE), as
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * available from http://www.virtualbox.org. This file is free software;
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * you can redistribute it and/or modify it under the terms of the GNU
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * General Public License (GPL) as published by the Free Software
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * Foundation, in version 2 as it comes in the "COPYING" file of the
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * The contents of this file may alternatively be used under the terms
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * of the Common Development and Distribution License Version 1.0
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * VirtualBox OSE distribution, in which case the provisions of the
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * CDDL are applicable instead of those of the GPL.
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * You may elect to license modified versions of this file under the
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * terms and conditions of either the GPL or the CDDL or both.
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * Clara, CA 95054 USA or visit http://www.sun.com if you need
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * additional information or have any questions.
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi/*******************************************************************************
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi* Structures and Typedefs *
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi*******************************************************************************/
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi/*******************************************************************************
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi* Public RTManifest interface *
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi*******************************************************************************/
9d12795f87b63c2e39e87bff369182edd34677d3Robert MustacchiRTR3DECL(int) RTManifestVerify(const char *pszManifestFile, PRTMANIFESTTEST paTests, size_t cTests, size_t *piFailed)
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi /* Validate input */
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi AssertMsgFailed(("Must supply pszManifestFile and paTests!\n"));
return rc;
if (!pFileList)
return VERR_NO_MEMORY;
if (cbCount == 0)
if (!pszNameStart)
if (!pszNameEnd)
if (!pszName)
if (!pszDigestStart)
bool fFound = false;
fFound = true;
if (!fFound)
if (piFailed)
*piFailed = i;
return rc;
RTR3DECL(int) RTManifestVerifyFiles(const char *pszManifestFile, const char * const *papszFiles, size_t cFiles, size_t *piFailed)
return VERR_INVALID_PARAMETER;
if (!pFileList)
return VERR_NO_MEMORY;
char *pszDigest;
return rc;
RTR3DECL(int) RTManifestWriteFiles(const char *pszManifestFile, const char * const *papszFiles, size_t cFiles)
return VERR_INVALID_PARAMETER;
return rc;
char *pszDigest;
if (cbRet < 0)
return rc;