Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master to johnmcpms/signing #469

Open
wants to merge 50 commits into
base: johnmcpms/signing
Choose a base branch
from

Conversation

agashlin
Copy link

@agashlin agashlin commented Aug 2, 2021

I hope that this merge could be helpful in assessing and updating the state of the signing branch. As there are no automated tests for signing I tested that manually and it seems to still be ok.

msftrubengu and others added 30 commits July 10, 2020 12:09
Open source Utils source code from the private Windows repo to MSIX SDK repo so that it is available for the Windows community to collaborate/contribute to. This supports our org-wide goal to open source as much of our code as we can. This will also enable us to take other services open source.
Based on an issue, updated the README - Overview to make it clear that MSIX Core project is in the SDK. 

microsoft#350
Adding a YAML definition for a a CI pipeline for the Utils library and updating the CODEOWNERS file for the library.
All of this is to be consumed by the release pipeline.
* Added configuration for signing.
* Added build properties to control major/minor version with recommended semantic versioning. Patch version is set by the pipeline.
* Added .nuspec file to indicate package license.
* Updated AssemblyInfo with required information.
Changing the namespace for the Utils library from Microsoft.Packaging.Utils to Microsoft.Msix.Utils to match what will be the published NuGet package name.
…oft#377)

* Added ability to create CIM files and add unpacked packages to them

* Enabled mounting/unmounting of CIM files

* Updated help strings

* Move error output for individual packages to a single batch at end of execution

* Handle failures creating temp directory

* Addressed code review comments

* Removed lines from resource.h

* set applyacls according to user specfication

* Removed commented code. Output on createcim.dll failure

* Added CreateCIM binaries
* warning : SA1201 : CSharp.Ordering : All classes must be placed after all methods.

* Add working directory to ProcessRunnerBase
…rosoft#379)

* Added ability to create, mount, and unmount VHDs

* Refactoring; Accept -vhdSize on VHD creation; Retrieve drive letter on mount

* Handle vhdSize values

* Enabled creation of VHDX files

* Updated help strings

* Delete broken VHD on VHD creation failures

* Don't delete vhd on vhd creation failure if failure is ERROR_FILE_EXISTS

* Adjusted min/max vhd siez

* Expose option to mount VHD as RO or RW.

* Modify func signatures in VHDProvider

* Added updated CreateCIM and WVDUtilities binaries
…oft#391)

* Allow users to mount CIM with image path instead of volume id

* Uploaded updated CreateCIM binaries
* Attempt to create bundle method

* ProcessCommonOptions method

* Pass flags

* Update

* Create appxbundlefactory and bundlewriter

* Added interfaces to implement

* edit bundle options

* Remove comments

* Create vector of packages to write to bundle manifest

* Create bundle manifest bundle element

* Write Bundle Manifest Elements

* Add AppxBundleManifest, BlockMap, contenttype.xml to zip

* Validations to store fields into manifest

* Write Resources and Dependencies to Bundle Manifest

* Fetches correct value for resources and tdfs

* Created AppxBundleWriter and BundleWriterHelper files

* Writer verion to manifest, address PR comments

* process common and input options

* Use stdstrin instead of wchar

* Address PR comments

* Removed closeinternal from AppxBundleWriter.cpp

* Use exceptions instead of hresult

* Implement AppxManifestReader->GetQualifiedResources

* Write resources to bundle manifest

* Write correct namespaces to manifest file

* Code review comments

* Resolve build on other platforms

* Add packbundle to if MSIX_PACK

* Build should pass now

* Remove ectra qualification for build to pass

* add to msix_pack

* STATFLAG_NONAME error

* Resolve compiler error

* UINT64 and std::uint64 compiler error

* Use std::time instead of systemtime

* Build break

* resolve UINT64 ios compiler error

* Comment out arm64 mac jobs- known config issue

* Mac pipeline failure

* Remove Text data structure as per PR feedback

* gitignore, move zlib file, update filename to versionhelpers

* Resolve build

* Remove thumbs.db file
Adding overview.md file to show as description content in the marketplace for the packaging tasks extension. The content was copied from the docs for this: https://github.com/microsoftdocs/msix-docs/blob/master/msix-src/desktop/msix-packaging-extension.md
* Mapping file parser

* add error cases to section reading

* Parse mappings in mapping file

* Handle errors in mapping file

* Mapping file parses correctly now

* Create flat bundle from mapping file works now

* AddExternalPackageReferenceFromManifest implemented

* Write to bundle manifest file, added validations

* Verified that AppxBundleManifest gets created

* Minor changes

* Build error

* Implement -mo param

* Changes to manifest only implementation

* Mo bundle manifest creation now works

* Skip package validation in AppxPackageObject.cpp

* Disable cmake_min_required warning

* Cast for mac build failure

* mac build failure address

* Check if build passes

* Trigger build

* Check if build passes

* Cast to char16_t

* missing bracket

* Casts away qualifiers const_cast

* Cast to const char16_t

* PR comments
…oft#403)

The pipeline tasks for packaging and for creating a VHDX for app attach call a helper PS script, which may be blocked in certain environments due to the ExecutionPolicy. To allow the scripts to run, set the execution policy when calling powershell.exe.

Also removed files regarding release signing configuration that are no longer needed with the new signing method, and added debug configuration for the pipelines tasks that was missing after the move from the private repo.
Luis Chacón and others added 20 commits January 19, 2021 11:19
…a-numeric character (microsoft#401)

* Accept non alphanumeric chars as publisher subject

* Restore Unicodeconversion file

* App now installs

* Remove unwanted lines
* OpenSSL is not thread-safe even when compiled with OPENSSL_THREADS
* Library initialization needs to be called only once and
	* Needs to set a thread ID callback
	* Needs to set locking callback
* OPENSSL_add_all_algorithms() should be called only once in an app

Co-authored-by: Sayan Chaliha <[email protected]>
* Test pull request

* Changed block map xml writer to add <FileHash> elements to BlockMap XML

* Update tests to reflect the change of block map xml and skip schema block map validation for Xerces parser

* Fix delete void pointer issue that some compilers do not allow

* Fixed a typo
* Validate timestamp in Windows

* PR comments
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…nabled (microsoft#443)

* Added option to AppxFactory to create package writer with file hash enabled in block map xml

* Changed PCSTR to LPCSTR as PCSTR is not defined in Linux and MacOS. Also updated test data about expected block map xml size

* Added CoCreateAppxFactoryWithOptions and CoCreateAppxFactoryWithHeapAndOptions to export list
…ages (microsoft#449)

Adds new property on AppxBundleMetadata: ChildAppxPackages. This replaces the now [Obsolete] InternalAppxPackagesRelativePaths, as it has the file paths but also the metadata unique to each child package.
* Invalid Memory Access in SignatureValidator

Problem:
* SignatureValidator::IsStoreOrigin() tries to read X.509 extensions
to determine if the origin of the signature matches the Windows Store OID.
* Extension data is converted from a raw buffer to an std::string for
comparision.
* The raw buffer is not null-terminated, and therefore, running
std::strlen() on it causes invalid memory access.
* This invalid access is caught by ASAN on macOS.

Solution:
* Null-terminate the raw buffer before trying to build an std::string
from it.

Tests:
* Ran app test suite that uses libmsix.dylib with ASAN on. No crashes
were reported.

* Invalid Memory Access in SignatureValidator

Problem:
* As @JohnMcPMS pointed out, writing "" with 1 byte size is null termination.
* A better solution would be to use bptr->length and avoid writing the null
byte altogether.

Tests:
* Ran app test suite that uses libmsix.dylib with ASAN on. No crashes
were reported.

Co-authored-by: Sayan Chaliha <[email protected]>
@ghost
Copy link

ghost commented Aug 2, 2021

CLA assistant check
All CLA requirements met.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants