Граф коммитов

1088 Коммитов

Автор SHA1 Сообщение Дата
Chacón aeca8e2c6c
Update AzDO extension dependencies (#504) 2022-02-10 14:05:19 -08:00
Chacón 5f050fcb8a
Add code security analysis tasks to AzDO Extension build pipelines (#502)
Changes to the build pipelines for the AzDO extension:
* Added CredScan and Semmle code security analysis tasks.
* Factored out the common steps between the PR and release build pipelines.
* Moved to use a custom agent pool.
2022-02-03 14:41:52 -08:00
Chacón bceb97162e
Add SBoM manifest generation (#501)
Add generation of SBoM manifest to the AzDO extension as required for compliance.
2022-01-27 15:23:25 -08:00
Chacón b209ac6631
Update AzDO extension dependencies (#500)
Updating dependencies per npm audit.

Also updated MSBuildHelpers copied from azure-pipelines-task-lib to latest, which includes detection for MSBuild 17, and fixed project URL on package.json files.
2022-01-27 15:23:03 -08:00
dependabot[bot] e3afaa96a3
Bump shelljs from 0.8.4 to 0.8.5 in /tools/pipelines-tasks (#498)
Bumps [shelljs](https://github.com/shelljs/shelljs) from 0.8.4 to 0.8.5.
- [Release notes](https://github.com/shelljs/shelljs/releases)
- [Changelog](https://github.com/shelljs/shelljs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/shelljs/shelljs/compare/v0.8.4...v0.8.5)

---
updated-dependencies:
- dependency-name: shelljs
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-15 13:12:04 -08:00
Ruben Guerrero 36cc33f419
Use MS-DOS time in LFH and CDH (#477)
* Use MS-DOS time in LFH and CDH

* Add unittests
2021-09-24 11:48:15 -07:00
Ruben Guerrero 791dcd998d
Prevent XXE attacks (#482) 2021-09-22 15:09:40 -07:00
Ruben Guerrero be2ac7e539
Fix AppxPackaging.hpp for modern clang (#479)
* Move MSIX_INTERFACE out of extern C

* Move SDK exclusive interface to proper place and add extern C. Remove tabs

* Missing IUnknown
2021-09-22 13:42:40 -07:00
Ruben Guerrero e268cbce07
Remove submodules (#480) 2021-09-22 13:42:17 -07:00
Joakim 786f4a291c
Fixed links in README.md (#473) 2021-08-16 13:51:49 -07:00
dependabot[bot] 052ab53c54
Bump path-parse from 1.0.6 to 1.0.7 in /tools/pipelines-tasks (#472)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-13 12:17:18 -07:00
Ruben Guerrero 5f977a79d4
Merge pull request #467 from Madhusudhan-MSFT/user/masudars/Component_governance_fixes_for_Openssl_lib_subtree
User/masudars/component governance fixes for openssl lib subtree
2021-08-10 13:35:55 -07:00
Madhusudhan-MSFT 43a9e219a5 Replaced M_ASN1_OCTET_STRING_print call with ASN1_STRING_print which is the current replacement call. 2021-08-09 18:55:32 -07:00
Madhusudhan-MSFT 8d38906168 Updated inline comment specific to SignatureValidator.cpp to point to correct old version of OpenSSL 2021-08-09 15:22:02 -07:00
Madhusudhan-MSFT c1ef82e784 CR Feedback: Moved OpenSSL lib specific cmake file to sub-directories
1. opensslconf.h.cmake - moved to sub-directory openssl
2. bn_conf.h.cmake & dso_conf.h.cmake - moved to sub-directory openssl/crypto to align with openssl include directory structure from which these cmake are generated.
2021-08-09 15:21:06 -07:00
Madhusudhan-MSFT 0e907e58d0 Addressing undefined reference to 'async_local_cleanup' for AOSP platform
When we examine defination of async_posix.h it appears to exclude android platform from its definitaion by defining  !defined(__ANDROID__) at the begining.

As a result async_posix.c definition will not be applicable for AOSP platform in that case it use async_null.c as default definition. So added conditional statement such that for AOSP it should consider async_null.c , for windows async_win.c and linux and ios async_posix.c source code respectively
2021-08-05 19:41:44 -07:00
Madhusudhan-MSFT 1aaf633e2d Commenting out dso_dlfcn.c - as MSIX SDK uses DSO_NONE to address
ios issue -  CMakeFiles/crypto.dir/openssl/crypto/dso/dso_dl.c.o has no symbols

Adjusted async code order such that arch/async_posix.c compiled first and then
async.c as some of the code definitation such as async_local_cleanup exists as part of platform specific code and is referred in async.c as a possible fix to  error: undefined reference to 'async_local_cleanup on adroid specific builds.
2021-08-05 18:55:16 -07:00
Madhusudhan-MSFT b3a99f7931 With OpenSSL 1.0.2u version default DSO_METHOD was DSO_METHOD_null
as MSIX SDK code doesn't set explicitly any DSO macro and hence default DSO_METHOD was used as per old dso_openssl.c source code.

With the latest OpenSSL 1.1.1j - there is no default DSO as such inorder to use DSO_METHOD_null we have to set DSO_NONE macro.

- So, Crypto.cmake has been updated to set DSO_NONE to retain old behavior
- Removed dso_dl.c from compilation list as we DSO_NONE as default this is not going to consumed. Compiling this file without defining DSO_DL macro resulting failures on iOS x86 platform. It appears iOS x86 platform is too sensitive compiling a *.c file which endsup not having any content (due to entire content is wrapped on the existing of DSO_DL definition in the recent OpenSSL version)
2021-08-05 16:10:46 -07:00
Madhusudhan-MSFT e5949af8d3 Removing async_null.c from compilation list as this only make sense if the platform is not windows or posix.
This might resolve issue:
CMakeFiles/crypto.dir/openssl/crypto/async/arch/async_null.c.o has no symbols
2021-08-05 14:53:07 -07:00
Madhusudhan-MSFT e4f13f7914 Removing default definition for OPENSSL_NO_EGD flag as that flag by default hides all the implementation details in rand_edg.c which were by default available on earlier version of OpenSSL in use.
This might resolve has no symbols error  related to ios x86 platform
2021-08-05 14:27:11 -07:00
Madhusudhan-MSFT a42ca670b7 Added following platform specific code under the under the condition that they will considered based on the current platform
i.e

1. async_win - will be used when compiling for Windows platform
2. async_posix - will be used for the unix platform
2021-08-05 13:34:59 -07:00
ePirat 7442244476
Various makemsix help message improvements (#465)
* makemsix: Remove wrong help output

The help output for the bundle command referred to options the p, ep,
kt and kf options, that do not actually exist.

* makemsix: Minor fixes in bundle option descriptions

Some spaces were missing and / was used for some option names.

* makemsix: Split very long lines
2021-08-05 09:19:38 -07:00
Madhusudhan-MSFT 3cb3e163d0 Part2 - Neccessary changes to compile MSIX SDK with OpenSSL 1.1.1.j
The commit includes:
1. Updates to crypto_sources.cmake
   a)  to include all the neccessary sources/header file from the new OpenSSL 1.1.1j version
   b) Removed sources files from crypto_sources.cmake that don't exist/deleted with the latest OpenSSL code
2.  Updated OpenSSL version to 1.1.1 specificied in CMakeList.txt
3.  Updates to SignatureValidator.cpp
    a) added a local macro definition for CRYPTO_NUM_LOCKS - as this macro support has been taken out from OpenSSL but MSIX SDK code consumes it with  std::lock constructs. It appears We should be fine using this constant, as code doesn't depend on OpenSSL Locking constructs which are out support.
    b) Comment M_ASN1_OCTET_STRING_print code as this function has been removed in the latest OpenSSL version.  Will have to discuss with experts for the alternatives.
    c) Also update  STACK_OF(X509_EXTENSION) *exts = cert->cert_info.extensions;  "cert_info.extensions" instead "cert_info->extensions" as it appears this type has been updated else it would cause compile error
    c) CRYPTO_THREADID_get_callback() == NULL) - comparison has been updated to use NULL else it would cause compile time error

   [How Validated:]
   - Compiled MSIX SDK code  with the helps of
    ./makelinux.sh
   - executed .vs/msixtest/msixtest and ensure all the tests passes

   [Test Result:]
   All tests passed (6268 assertions in 72 test cases)
2021-08-04 18:25:36 -07:00
Madhusudhan-MSFT 6024e04a6d Part1 - Neccessary changes to compile MSIX SDK with OpenSSL 1.1.1.j
The changes includes addition of:
1. bn_conf.h.cmake -  generated with the help of running Makefile on "\msix-packaging\lib\openssl\include\crypto\bn_conf.h.in"
2. dso_conf.h.cmake -  generated with the help of running Makefile on "\msix-packaging\lib\openssl\include\crypto\dso_conf.h.in"
3. opensslconf.h.cmake -  generated with the help of running Makefile on "\msix-packaging\lib\openssl\include\openssl\opensslconf.h.in"

Above cmake file has neccessary cmake macro expansion flag which get resolved inside  crypto.cmake when configure_file called on each of these
files

Additionally, crypto.cmake has some additional changes
- Copying the all the includes as per new OpenSSL source includes layout
- Additional flag settings to resolve certain compiler time definitions
2021-08-04 18:11:48 -07:00
Madhusudhan Gumbalapura Sudarshan 3474b96673 Update README.md such that OpenSSL Subtree reference now points to OpenSSL_1_0_2q and appropriate commit hash & web link 2021-07-08 13:42:13 -07:00
Madhusudhan Gumbalapura Sudarshan d9700bf48f Merge commit '52fe2b1ba04a3869933748605c98ca96f97e389c' as 'lib/openssl' 2021-07-08 13:36:37 -07:00
Madhusudhan Gumbalapura Sudarshan 52fe2b1ba0 Squashed 'lib/openssl/' content from commit ba90f266c7
git-subtree-dir: lib/openssl
git-subtree-split: ba90f266c71a821c041c1cbc9f86c4d9788d2359
2021-07-08 13:36:36 -07:00
Madhusudhan Gumbalapura Sudarshan 7aa4cdcba9 Removed OpenSSL_1_0_2q version of OpenSSL lib planning update it to latest version i.e OpenSSL_1_1_1j in the upcomming commit 2021-07-08 13:35:14 -07:00
Ruben Guerrero a8c86c68f1
Merge pull request #466 from Madhusudhan-MSFT/user/masudars/component_goverance_fixes
User/masudars/component goverance fixes
2021-07-08 07:50:38 -07:00
Madhusudhan Gumbalapura Sudarshan 56c5f06524 Re-apply commits from - Commit 542f6fd7: Add Xerces doc directory to XERCES_TEST switch (542f6fd788) 2021-07-07 14:24:43 -07:00
Madhusudhan Gumbalapura Sudarshan 061926813a Re-apply neccessary changes from - Commit cc323b62: Make changes to Xerces CMake files to compile in Android 19 (cc323b6216) 2021-07-07 14:21:47 -07:00
Madhusudhan Gumbalapura Sudarshan 66217bd3ad Updated README.md file such that Xerces-C now points to v3.2.1 tag, commit hash and the updated web link to a release 2021-07-07 14:12:27 -07:00
Madhusudhan Gumbalapura Sudarshan c78c4cac76 Merge commit '435abad3c242d62cfc1d5dc4f9432019dbbaeb9a' as 'lib/xerces' 2021-07-07 13:48:46 -07:00
Madhusudhan Gumbalapura Sudarshan 435abad3c2 Squashed 'lib/xerces/' content from commit 6500318cb
git-subtree-dir: lib/xerces
git-subtree-split: 6500318cb3d4ea3f6f3591e55e2e8acc9a71cf0e
2021-07-07 13:48:46 -07:00
Madhusudhan Gumbalapura Sudarshan 73d630dc5d deleting xcerces and will update it to v3.2.1 in the next commit 2021-07-07 13:48:24 -07:00
Chacón 34dc9941d7
Msix.Utils - Make reading of bundle optional packages happen only when needed (#464) 2021-06-30 16:28:48 -07:00
stephenk-msft 8d6b8fba9e
Handle long file paths during CIM creation (#463) 2021-06-30 09:27:05 -07:00
Ruben Guerrero 24d4ab1c04
Enable pipelines (#461) 2021-06-16 12:32:41 -07:00
Sayan Chaliha 0c8a78f9b1
Invalid Memory Access in SignatureValidator (#453)
* 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 <sachalih@microsoft.com>
2021-06-08 10:53:39 -07:00
Union Palenshus 5883559c90
Adding property on bundle object containing metadata about child packages (#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.
2021-05-13 12:06:17 -07:00
stephenk-msft d923b66fc0
Updated ApplyACls (#448) 2021-05-07 14:52:00 -07:00
Luis Chacón 4f7206f609
Bump DevOps Extension dependencies' version (#445) 2021-04-14 17:34:08 -07:00
rhuang-msft 3fbd28851b
Added option to AppxFactory to create package writer with file hash enabled (#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
2021-04-13 15:57:40 -07:00
dependabot[bot] c8af99506f
Bump y18n from 4.0.0 to 4.0.1 in /tools/pipelines-tasks (#441)
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] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-01 10:30:18 -07:00
Ruben Guerrero 3c058bf730
Validate timestamp in Windows (#438)
* Validate timestamp in Windows

* PR comments
2021-03-18 14:24:41 -07:00
rhuang-msft 874fce5265
Added latest Appx manifest schemas to MSIX SDK (#433) 2021-03-10 13:32:24 -08:00
Luis Chacón 28bf205c5c
Update localized strings (#428) 2021-03-03 13:03:52 -08:00
rhuang-msft f7e34e2edb
User/rhuang msft/add file hash to block map (#429)
* 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
2021-03-01 14:10:09 -08:00
Luis Chacón eca527a113
Re-target Msix.Utils package to .NET Standard 2.0 (#427) 2021-02-23 12:25:40 -08:00
Luis Chacón 3c41e74d4c
Add Azure Key Vault integration to signing AzDO task (#426) 2021-02-22 12:55:43 -08:00