diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2018-12-16 21:19:24 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2018-12-16 21:20:40 -0600 |
| commit | 95a5a8f9efef02ddcec5b3f69be99a00d71a802a (patch) | |
| tree | f0a92b8e8e37e17af6053db11f1b8a7a532cd12c /src/ca/scassl7.cpp | |
| parent | aec6e9a4b21accd2e8aeb2cb36ad1cdc8f308f79 (diff) | |
| download | wix-95a5a8f9efef02ddcec5b3f69be99a00d71a802a.tar.gz wix-95a5a8f9efef02ddcec5b3f69be99a00d71a802a.tar.bz2 wix-95a5a8f9efef02ddcec5b3f69be99a00d71a802a.zip | |
Import implementation of IisCA from old repo's scasched/scaexec.
Diffstat (limited to 'src/ca/scassl7.cpp')
| -rw-r--r-- | src/ca/scassl7.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/ca/scassl7.cpp b/src/ca/scassl7.cpp new file mode 100644 index 00000000..47c16a9d --- /dev/null +++ b/src/ca/scassl7.cpp | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | #include "precomp.h" | ||
| 4 | |||
| 5 | HRESULT ScaSslCertificateWrite7( | ||
| 6 | __in_z LPCWSTR wzWebBase, | ||
| 7 | __in SCA_WEB_SSL_CERTIFICATE* pswscList | ||
| 8 | ) | ||
| 9 | { | ||
| 10 | HRESULT hr = S_OK; | ||
| 11 | WCHAR wzEncodedCertificateHash[CB_CERTIFICATE_HASH * 2 + 1] = { 0 }; | ||
| 12 | |||
| 13 | for (SCA_WEB_SSL_CERTIFICATE* pswsc = pswscList; pswsc; pswsc = pswsc->pNext) | ||
| 14 | { | ||
| 15 | hr = ScaWriteConfigID(IIS_SSL_BINDING); | ||
| 16 | ExitOnFailure(hr, "Failed write SSL binding ID"); | ||
| 17 | hr = ScaWriteConfigID(IIS_CREATE); // Need to determine site action | ||
| 18 | ExitOnFailure(hr, "Failed write binding action"); | ||
| 19 | |||
| 20 | hr = ScaWriteConfigString(wzWebBase); //site name key | ||
| 21 | ExitOnFailure(hr, "Failed to write SSL website"); | ||
| 22 | hr = ScaWriteConfigString(pswsc->wzStoreName); //ssl store name | ||
| 23 | ExitOnFailure(hr, "Failed to write SSL store name"); | ||
| 24 | |||
| 25 | hr = StrHexEncode(pswsc->rgbSHA1Hash, countof(pswsc->rgbSHA1Hash), wzEncodedCertificateHash, countof(wzEncodedCertificateHash)); | ||
| 26 | ExitOnFailure(hr, "Failed to encode SSL hash"); | ||
| 27 | |||
| 28 | hr = ScaWriteConfigString(wzEncodedCertificateHash); //ssl hash | ||
| 29 | ExitOnFailure(hr, "Failed to write SSL hash"); | ||
| 30 | } | ||
| 31 | LExit: | ||
| 32 | |||
| 33 | return hr; | ||
| 34 | } | ||
