| 1 | /** |
| 2 | * WinPR: Windows Portable Runtime |
| 3 | * Credential Security Support Provider (CredSSP) |
| 4 | * |
| 5 | * Copyright 2010-2014 Marc-Andre Moreau <[email protected]> |
| 6 | * |
| 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | * you may not use this file except in compliance with the License. |
| 9 | * You may obtain a copy of the License at |
| 10 | * |
| 11 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | * |
| 13 | * Unless required by applicable law or agreed to in writing, software |
| 14 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | * See the License for the specific language governing permissions and |
| 17 | * limitations under the License. |
| 18 | */ |
| 19 | |
| 20 | #include <winpr/config.h>cxx . . $ `<file>/build/winpr/include/winpr/config.h`/ |
| 21 | |
| 22 | #include <winpr/crt.h>cxx . . $ `<file>/winpr/include/winpr/crt.h`/ |
| 23 | #include <winpr/sspi.h>cxx . . $ `<file>/winpr/include/winpr/sspi.h`/ |
| 24 | |
| 25 | #include "credssp.h"cxx . . $ `<file>/winpr/libwinpr/sspi/CredSSP/credssp.h`/ |
| 26 | |
| 27 | #include "../sspi.h"cxx . . $ `<file>/winpr/libwinpr/sspi/sspi.h`/ |
| 28 | #include "../../log.h"cxx . . $ `<file>/winpr/libwinpr/log.h`/ |
| 29 | |
| 30 | #define TAGcxx . . $ `winpr/libwinpr/sspi/CredSSP/credssp.c:30:9`! WINPR_TAGcxx . . $ `winpr/libwinpr/log.h:25:9`!("sspi.CredSSP") |
| 31 | |
| 32 | static const char* CREDSSP_PACKAGE_NAMEcxx . . $ CREDSSP_PACKAGE_NAME. = "CredSSP"; |
| 33 | |
| 34 | static SECURITY_STATUScxx . . $ SECURITY_STATUS# SEC_ENTRYcxx . . $ `winpr/include/winpr/sspi.h:44:9`! credssp_InitializeSecurityContextWcxx . . $ credssp_InitializeSecurityContextW(422ccc8b6dd4c323).( |
| 35 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PCredHandlecxx . . $ PCredHandle# phCredential, WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PCtxtHandlecxx . . $ PCtxtHandle# phContext, |
| 36 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! SEC_WCHARcxx . . $ SEC_WCHAR#* pszTargetName, WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! ULONGcxx . . $ ULONG# fContextReq, |
| 37 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! ULONGcxx . . $ ULONG# Reserved1, WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! ULONGcxx . . $ ULONG# TargetDataRep, |
| 38 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PSecBufferDesccxx . . $ PSecBufferDesc# pInput, WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! ULONGcxx . . $ ULONG# Reserved2, |
| 39 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PCtxtHandlecxx . . $ PCtxtHandle# phNewContext, WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PSecBufferDesccxx . . $ PSecBufferDesc# pOutput, |
| 40 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PULONGcxx . . $ PULONG# pfContextAttr, WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PTimeStampcxx . . $ PTimeStamp# ptsExpiry) |
| 41 | { |
| 42 | WLog_ERRcxx . . $ `winpr/include/winpr/wlog.h:347:9`!(TAGcxx . . $ `winpr/libwinpr/sspi/CredSSP/credssp.c:30:9`!, "TODO: Implement"); |
| 43 | return SEC_E_UNSUPPORTED_FUNCTIONcxx . . $ `winpr/include/winpr/sspi.h:136:9`!; |
| 44 | } |
| 45 | |
| 46 | static SECURITY_STATUScxx . . $ SECURITY_STATUS# SEC_ENTRYcxx . . $ `winpr/include/winpr/sspi.h:44:9`! credssp_InitializeSecurityContextAcxx . . $ credssp_InitializeSecurityContextA(cf9633d63d9b9e60).( |
| 47 | PCredHandlecxx . . $ PCredHandle# phCredential, PCtxtHandlecxx . . $ PCtxtHandle# phContext, WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! SEC_CHARcxx . . $ SEC_CHAR#* pszTargetName, |
| 48 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! ULONGcxx . . $ ULONG# fContextReq, WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! ULONGcxx . . $ ULONG# Reserved1, |
| 49 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! ULONGcxx . . $ ULONG# TargetDataRep, WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PSecBufferDesccxx . . $ PSecBufferDesc# pInput, |
| 50 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! ULONGcxx . . $ ULONG# Reserved2, PCtxtHandlecxx . . $ PCtxtHandle# phNewContext, |
| 51 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PSecBufferDesccxx . . $ PSecBufferDesc# pOutput, WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PULONGcxx . . $ PULONG# pfContextAttr, |
| 52 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PTimeStampcxx . . $ PTimeStamp# ptsExpiry) |
| 53 | { |
| 54 | CREDSSP_CONTEXTcxx . . $ CREDSSP_CONTEXT#* context = nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!; |
| 55 | SSPI_CREDENTIALScxx . . $ SSPI_CREDENTIALS#* credentials = nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!; |
| 56 | |
| 57 | /* behave like windows SSPIs that don't want empty context */ |
| 58 | if (phContext && !phContext->dwLowercxx . . $ $anonymous_type_13c8ac8e1b4cb2c0_43#dwLower. && !phContext->dwUppercxx . . $ $anonymous_type_13c8ac8e1b4cb2c0_43#dwUpper.) |
| 59 | return SEC_E_INVALID_HANDLEcxx . . $ `winpr/include/winpr/sspi.h:135:9`!; |
| 60 | |
| 61 | context = (CREDSSP_CONTEXTcxx . . $ CREDSSP_CONTEXT#*)sspi_SecureHandleGetLowerPointercxx . . $ sspi_SecureHandleGetLowerPointer(850d8027e444f59b).(phContext); |
| 62 | |
| 63 | if (!context) |
| 64 | { |
| 65 | unioncxx . . $ credssp_InitializeSecurityContextA(cf9633d63d9b9e60).$anonymous_type_0# |
| 66 | { |
| 67 | const void* cpvcxx . . $ credssp_InitializeSecurityContextA(cf9633d63d9b9e60).$anonymous_type_0#cpv.; |
| 68 | void* pvcxx . . $ credssp_InitializeSecurityContextA(cf9633d63d9b9e60).$anonymous_type_0#pv.; |
| 69 | } cnv; |
| 70 | context = credssp_ContextNewcxx . . $ credssp_ContextNew(6347c68564f13b78).(); |
| 71 | |
| 72 | if (!context) |
| 73 | return SEC_E_INSUFFICIENT_MEMORYcxx . . $ `winpr/include/winpr/sspi.h:134:9`!; |
| 74 | |
| 75 | credentials = (SSPI_CREDENTIALScxx . . $ SSPI_CREDENTIALS#*)sspi_SecureHandleGetLowerPointercxx . . $ sspi_SecureHandleGetLowerPointer(850d8027e444f59b).(phCredential); |
| 76 | |
| 77 | if (!credentials) |
| 78 | { |
| 79 | credssp_ContextFreecxx . . $ credssp_ContextFree(7161bfc00e88df76).(context); |
| 80 | return SEC_E_INVALID_HANDLEcxx . . $ `winpr/include/winpr/sspi.h:135:9`!; |
| 81 | } |
| 82 | |
| 83 | sspi_SecureHandleSetLowerPointercxx . . $ sspi_SecureHandleSetLowerPointer(aaeae9b83d9844a8).(phNewContext, context); |
| 84 | |
| 85 | cnv.cpvcxx . . $ credssp_InitializeSecurityContextA(cf9633d63d9b9e60).$anonymous_type_0#cpv. = CREDSSP_PACKAGE_NAMEcxx . . $ CREDSSP_PACKAGE_NAME.; |
| 86 | sspi_SecureHandleSetUpperPointercxx . . $ sspi_SecureHandleSetUpperPointer(aaeae9b83d9844a8).(phNewContext, cnv.pvcxx . . $ credssp_InitializeSecurityContextA(cf9633d63d9b9e60).$anonymous_type_0#pv.); |
| 87 | } |
| 88 | |
| 89 | return SEC_E_OKcxx . . $ `winpr/include/winpr/sspi.h:133:9`!; |
| 90 | } |
| 91 | |
| 92 | CREDSSP_CONTEXTcxx . . $ CREDSSP_CONTEXT#* credssp_ContextNewcxx . . $ credssp_ContextNew(6347c68564f13b78).(void) |
| 93 | { |
| 94 | CREDSSP_CONTEXTcxx . . $ CREDSSP_CONTEXT#* context = nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!; |
| 95 | context = (CREDSSP_CONTEXTcxx . . $ CREDSSP_CONTEXT#*)calloccxx . . $ calloc(63a7bf2941bfcd7a).(1, sizeof(CREDSSP_CONTEXTcxx . . $ CREDSSP_CONTEXT#)); |
| 96 | |
| 97 | if (!context) |
| 98 | return nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!; |
| 99 | |
| 100 | return context; |
| 101 | } |
| 102 | |
| 103 | void credssp_ContextFreecxx . . $ credssp_ContextFree(7161bfc00e88df76).(CREDSSP_CONTEXTcxx . . $ CREDSSP_CONTEXT#* context) |
| 104 | { |
| 105 | freecxx . . $ free(5d22bdacc48458e8).(context); |
| 106 | } |
| 107 | |
| 108 | static SECURITY_STATUScxx . . $ SECURITY_STATUS# SEC_ENTRYcxx . . $ `winpr/include/winpr/sspi.h:44:9`! credssp_QueryContextAttributescxx . . $ credssp_QueryContextAttributes(998cea891dba569e).(PCtxtHandlecxx . . $ PCtxtHandle# phContext, |
| 109 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! ULONGcxx . . $ ULONG# ulAttribute, |
| 110 | void* pBuffer) |
| 111 | { |
| 112 | if (!phContext) |
| 113 | return SEC_E_INVALID_HANDLEcxx . . $ `winpr/include/winpr/sspi.h:135:9`!; |
| 114 | |
| 115 | if (!pBuffer) |
| 116 | return SEC_E_INSUFFICIENT_MEMORYcxx . . $ `winpr/include/winpr/sspi.h:134:9`!; |
| 117 | |
| 118 | WLog_ERRcxx . . $ `winpr/include/winpr/wlog.h:347:9`!(TAGcxx . . $ `winpr/libwinpr/sspi/CredSSP/credssp.c:30:9`!, "TODO: Implement"); |
| 119 | return SEC_E_UNSUPPORTED_FUNCTIONcxx . . $ `winpr/include/winpr/sspi.h:136:9`!; |
| 120 | } |
| 121 | |
| 122 | static SECURITY_STATUScxx . . $ SECURITY_STATUS# SEC_ENTRYcxx . . $ `winpr/include/winpr/sspi.h:44:9`! credssp_AcquireCredentialsHandleWcxx . . $ credssp_AcquireCredentialsHandleW(537031bd00bdbc62).( |
| 123 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! SEC_WCHARcxx . . $ SEC_WCHAR#* pszPrincipal, WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! SEC_WCHARcxx . . $ SEC_WCHAR#* pszPackage, |
| 124 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! ULONGcxx . . $ ULONG# fCredentialUse, WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! void* pvLogonID, |
| 125 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! void* pAuthData, WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! SEC_GET_KEY_FNcxx . . $ SEC_GET_KEY_FN# pGetKeyFn, |
| 126 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! void* pvGetKeyArgument, WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PCredHandlecxx . . $ PCredHandle# phCredential, |
| 127 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PTimeStampcxx . . $ PTimeStamp# ptsExpiry) |
| 128 | { |
| 129 | WLog_ERRcxx . . $ `winpr/include/winpr/wlog.h:347:9`!(TAGcxx . . $ `winpr/libwinpr/sspi/CredSSP/credssp.c:30:9`!, "TODO: Implement"); |
| 130 | return SEC_E_UNSUPPORTED_FUNCTIONcxx . . $ `winpr/include/winpr/sspi.h:136:9`!; |
| 131 | } |
| 132 | |
| 133 | static SECURITY_STATUScxx . . $ SECURITY_STATUS# SEC_ENTRYcxx . . $ `winpr/include/winpr/sspi.h:44:9`! credssp_AcquireCredentialsHandleAcxx . . $ credssp_AcquireCredentialsHandleA(ea7a2ba3fce4e22).( |
| 134 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! SEC_CHARcxx . . $ SEC_CHAR#* pszPrincipal, WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! SEC_CHARcxx . . $ SEC_CHAR#* pszPackage, |
| 135 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! ULONGcxx . . $ ULONG# fCredentialUse, WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! void* pvLogonID, |
| 136 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! void* pAuthData, WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! SEC_GET_KEY_FNcxx . . $ SEC_GET_KEY_FN# pGetKeyFn, |
| 137 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! void* pvGetKeyArgument, WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PCredHandlecxx . . $ PCredHandle# phCredential, |
| 138 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PTimeStampcxx . . $ PTimeStamp# ptsExpiry) |
| 139 | { |
| 140 | SSPI_CREDENTIALScxx . . $ SSPI_CREDENTIALS#* credentials = nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!; |
| 141 | SEC_WINNT_AUTH_IDENTITYcxx . . $ `winpr/include/winpr/sspi.h:739:9`!* identity = nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!; |
| 142 | |
| 143 | if (fCredentialUse == SECPKG_CRED_OUTBOUNDcxx . . $ `winpr/include/winpr/sspi.h:260:9`!) |
| 144 | { |
| 145 | unioncxx . . $ credssp_AcquireCredentialsHandleA(ea7a2ba3fce4e22).$anonymous_type_1# |
| 146 | { |
| 147 | const void* cpvcxx . . $ credssp_AcquireCredentialsHandleA(ea7a2ba3fce4e22).$anonymous_type_1#cpv.; |
| 148 | void* pvcxx . . $ credssp_AcquireCredentialsHandleA(ea7a2ba3fce4e22).$anonymous_type_1#pv.; |
| 149 | } cnv; |
| 150 | credentials = sspi_CredentialsNewcxx . . $ sspi_CredentialsNew(9e522d78a489027f).(); |
| 151 | |
| 152 | if (!credentials) |
| 153 | return SEC_E_INSUFFICIENT_MEMORYcxx . . $ `winpr/include/winpr/sspi.h:134:9`!; |
| 154 | |
| 155 | identity = (SEC_WINNT_AUTH_IDENTITYcxx . . $ `winpr/include/winpr/sspi.h:739:9`!*)pAuthData; |
| 156 | CopyMemorycxx . . $ `winpr/include/winpr/crt.h:123:9`!(&(credentials->identity), identity, sizeof(SEC_WINNT_AUTH_IDENTITYcxx . . $ `winpr/include/winpr/sspi.h:739:9`!)); |
| 157 | sspi_SecureHandleSetLowerPointercxx . . $ sspi_SecureHandleSetLowerPointer(aaeae9b83d9844a8).(phCredential, (void*)credentials); |
| 158 | |
| 159 | cnv.cpvcxx . . $ credssp_AcquireCredentialsHandleA(ea7a2ba3fce4e22).$anonymous_type_1#cpv. = CREDSSP_PACKAGE_NAMEcxx . . $ CREDSSP_PACKAGE_NAME.; |
| 160 | sspi_SecureHandleSetUpperPointercxx . . $ sspi_SecureHandleSetUpperPointer(aaeae9b83d9844a8).(phCredential, cnv.pvcxx . . $ credssp_AcquireCredentialsHandleA(ea7a2ba3fce4e22).$anonymous_type_1#pv.); |
| 161 | return SEC_E_OKcxx . . $ `winpr/include/winpr/sspi.h:133:9`!; |
| 162 | } |
| 163 | |
| 164 | WLog_ERRcxx . . $ `winpr/include/winpr/wlog.h:347:9`!(TAGcxx . . $ `winpr/libwinpr/sspi/CredSSP/credssp.c:30:9`!, "TODO: Implement"); |
| 165 | return SEC_E_UNSUPPORTED_FUNCTIONcxx . . $ `winpr/include/winpr/sspi.h:136:9`!; |
| 166 | } |
| 167 | |
| 168 | static SECURITY_STATUScxx . . $ SECURITY_STATUS# SEC_ENTRYcxx . . $ `winpr/include/winpr/sspi.h:44:9`! credssp_QueryCredentialsAttributesWcxx . . $ credssp_QueryCredentialsAttributesW(998cea891dba569e).( |
| 169 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PCredHandlecxx . . $ PCredHandle# phCredential, WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! ULONGcxx . . $ ULONG# ulAttribute, |
| 170 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! void* pBuffer) |
| 171 | { |
| 172 | WLog_ERRcxx . . $ `winpr/include/winpr/wlog.h:347:9`!(TAGcxx . . $ `winpr/libwinpr/sspi/CredSSP/credssp.c:30:9`!, "TODO: Implement"); |
| 173 | return SEC_E_UNSUPPORTED_FUNCTIONcxx . . $ `winpr/include/winpr/sspi.h:136:9`!; |
| 174 | } |
| 175 | |
| 176 | static SECURITY_STATUScxx . . $ SECURITY_STATUS# SEC_ENTRYcxx . . $ `winpr/include/winpr/sspi.h:44:9`! credssp_QueryCredentialsAttributesAcxx . . $ credssp_QueryCredentialsAttributesA(998cea891dba569e).( |
| 177 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PCredHandlecxx . . $ PCredHandle# phCredential, WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! ULONGcxx . . $ ULONG# ulAttribute, |
| 178 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! void* pBuffer) |
| 179 | { |
| 180 | if (ulAttribute == SECPKG_CRED_ATTR_NAMEScxx . . $ `winpr/include/winpr/sspi.h:485:9`!) |
| 181 | { |
| 182 | SSPI_CREDENTIALScxx . . $ SSPI_CREDENTIALS#* credentials = |
| 183 | (SSPI_CREDENTIALScxx . . $ SSPI_CREDENTIALS#*)sspi_SecureHandleGetLowerPointercxx . . $ sspi_SecureHandleGetLowerPointer(850d8027e444f59b).(phCredential); |
| 184 | |
| 185 | if (!credentials) |
| 186 | return SEC_E_INVALID_HANDLEcxx . . $ `winpr/include/winpr/sspi.h:135:9`!; |
| 187 | |
| 188 | return SEC_E_OKcxx . . $ `winpr/include/winpr/sspi.h:133:9`!; |
| 189 | } |
| 190 | |
| 191 | WLog_ERRcxx . . $ `winpr/include/winpr/wlog.h:347:9`!(TAGcxx . . $ `winpr/libwinpr/sspi/CredSSP/credssp.c:30:9`!, "TODO: Implement"); |
| 192 | return SEC_E_UNSUPPORTED_FUNCTIONcxx . . $ `winpr/include/winpr/sspi.h:136:9`!; |
| 193 | } |
| 194 | |
| 195 | static SECURITY_STATUScxx . . $ SECURITY_STATUS# SEC_ENTRYcxx . . $ `winpr/include/winpr/sspi.h:44:9`! credssp_FreeCredentialsHandlecxx . . $ credssp_FreeCredentialsHandle(e6bcc0180d974dfe).(PCredHandlecxx . . $ PCredHandle# phCredential) |
| 196 | { |
| 197 | if (!phCredential) |
| 198 | return SEC_E_INVALID_HANDLEcxx . . $ `winpr/include/winpr/sspi.h:135:9`!; |
| 199 | |
| 200 | SSPI_CREDENTIALScxx . . $ SSPI_CREDENTIALS#* credentials = |
| 201 | (SSPI_CREDENTIALScxx . . $ SSPI_CREDENTIALS#*)sspi_SecureHandleGetLowerPointercxx . . $ sspi_SecureHandleGetLowerPointer(850d8027e444f59b).(phCredential); |
| 202 | sspi_SecureHandleInvalidatecxx . . $ sspi_SecureHandleInvalidate(99ecaff645e5cbc5).(phCredential); |
| 203 | if (!credentials) |
| 204 | return SEC_E_INVALID_HANDLEcxx . . $ `winpr/include/winpr/sspi.h:135:9`!; |
| 205 | |
| 206 | sspi_CredentialsFreecxx . . $ sspi_CredentialsFree(da18fe57a5c5357d).(credentials); |
| 207 | return SEC_E_OKcxx . . $ `winpr/include/winpr/sspi.h:133:9`!; |
| 208 | } |
| 209 | |
| 210 | static SECURITY_STATUScxx . . $ SECURITY_STATUS# SEC_ENTRYcxx . . $ `winpr/include/winpr/sspi.h:44:9`! credssp_EncryptMessagecxx . . $ credssp_EncryptMessage(e5afddb57b5310d6).(WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PCtxtHandlecxx . . $ PCtxtHandle# phContext, |
| 211 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! ULONGcxx . . $ ULONG# fQOP, |
| 212 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PSecBufferDesccxx . . $ PSecBufferDesc# pMessage, |
| 213 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! ULONGcxx . . $ ULONG# MessageSeqNo) |
| 214 | { |
| 215 | WLog_ERRcxx . . $ `winpr/include/winpr/wlog.h:347:9`!(TAGcxx . . $ `winpr/libwinpr/sspi/CredSSP/credssp.c:30:9`!, "TODO: Implement"); |
| 216 | return SEC_E_UNSUPPORTED_FUNCTIONcxx . . $ `winpr/include/winpr/sspi.h:136:9`!; |
| 217 | } |
| 218 | |
| 219 | static SECURITY_STATUScxx . . $ SECURITY_STATUS# SEC_ENTRYcxx . . $ `winpr/include/winpr/sspi.h:44:9`! credssp_DecryptMessagecxx . . $ credssp_DecryptMessage(413abde90771aeb2).(WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PCtxtHandlecxx . . $ PCtxtHandle# phContext, |
| 220 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PSecBufferDesccxx . . $ PSecBufferDesc# pMessage, |
| 221 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! ULONGcxx . . $ ULONG# MessageSeqNo, |
| 222 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! ULONGcxx . . $ ULONG#* pfQOP) |
| 223 | { |
| 224 | WLog_ERRcxx . . $ `winpr/include/winpr/wlog.h:347:9`!(TAGcxx . . $ `winpr/libwinpr/sspi/CredSSP/credssp.c:30:9`!, "TODO: Implement"); |
| 225 | return SEC_E_UNSUPPORTED_FUNCTIONcxx . . $ `winpr/include/winpr/sspi.h:136:9`!; |
| 226 | } |
| 227 | |
| 228 | static SECURITY_STATUScxx . . $ SECURITY_STATUS# SEC_ENTRYcxx . . $ `winpr/include/winpr/sspi.h:44:9`! credssp_MakeSignaturecxx . . $ credssp_MakeSignature(e5afddb57b5310d6).(WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PCtxtHandlecxx . . $ PCtxtHandle# phContext, |
| 229 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! ULONGcxx . . $ ULONG# fQOP, |
| 230 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PSecBufferDesccxx . . $ PSecBufferDesc# pMessage, |
| 231 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! ULONGcxx . . $ ULONG# MessageSeqNo) |
| 232 | { |
| 233 | WLog_ERRcxx . . $ `winpr/include/winpr/wlog.h:347:9`!(TAGcxx . . $ `winpr/libwinpr/sspi/CredSSP/credssp.c:30:9`!, "TODO: Implement"); |
| 234 | return SEC_E_UNSUPPORTED_FUNCTIONcxx . . $ `winpr/include/winpr/sspi.h:136:9`!; |
| 235 | } |
| 236 | |
| 237 | static SECURITY_STATUScxx . . $ SECURITY_STATUS# SEC_ENTRYcxx . . $ `winpr/include/winpr/sspi.h:44:9`! credssp_VerifySignaturecxx . . $ credssp_VerifySignature(413abde90771aeb2).(WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PCtxtHandlecxx . . $ PCtxtHandle# phContext, |
| 238 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! PSecBufferDesccxx . . $ PSecBufferDesc# pMessage, |
| 239 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! ULONGcxx . . $ ULONG# MessageSeqNo, |
| 240 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! ULONGcxx . . $ ULONG#* pfQOP) |
| 241 | { |
| 242 | WLog_ERRcxx . . $ `winpr/include/winpr/wlog.h:347:9`!(TAGcxx . . $ `winpr/libwinpr/sspi/CredSSP/credssp.c:30:9`!, "TODO: Implement"); |
| 243 | return SEC_E_UNSUPPORTED_FUNCTIONcxx . . $ `winpr/include/winpr/sspi.h:136:9`!; |
| 244 | } |
| 245 | |
| 246 | const SecurityFunctionTableAcxx . . $ SecurityFunctionTableA# CREDSSP_SecurityFunctionTableAcxx . . $ CREDSSP_SecurityFunctionTableA. = { |
| 247 | 3, /* dwVersion */ |
| 248 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* EnumerateSecurityPackages */ |
| 249 | credssp_QueryCredentialsAttributesAcxx . . $ credssp_QueryCredentialsAttributesA(998cea891dba569e)., /* QueryCredentialsAttributes */ |
| 250 | credssp_AcquireCredentialsHandleAcxx . . $ credssp_AcquireCredentialsHandleA(ea7a2ba3fce4e22)., /* AcquireCredentialsHandle */ |
| 251 | credssp_FreeCredentialsHandlecxx . . $ credssp_FreeCredentialsHandle(e6bcc0180d974dfe)., /* FreeCredentialsHandle */ |
| 252 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* Reserved2 */ |
| 253 | credssp_InitializeSecurityContextAcxx . . $ credssp_InitializeSecurityContextA(cf9633d63d9b9e60)., /* InitializeSecurityContext */ |
| 254 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* AcceptSecurityContext */ |
| 255 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* CompleteAuthToken */ |
| 256 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* DeleteSecurityContext */ |
| 257 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* ApplyControlToken */ |
| 258 | credssp_QueryContextAttributescxx . . $ credssp_QueryContextAttributes(998cea891dba569e)., /* QueryContextAttributes */ |
| 259 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* ImpersonateSecurityContext */ |
| 260 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* RevertSecurityContext */ |
| 261 | credssp_MakeSignaturecxx . . $ credssp_MakeSignature(e5afddb57b5310d6)., /* MakeSignature */ |
| 262 | credssp_VerifySignaturecxx . . $ credssp_VerifySignature(413abde90771aeb2)., /* VerifySignature */ |
| 263 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* FreeContextBuffer */ |
| 264 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* QuerySecurityPackageInfo */ |
| 265 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* Reserved3 */ |
| 266 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* Reserved4 */ |
| 267 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* ExportSecurityContext */ |
| 268 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* ImportSecurityContext */ |
| 269 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* AddCredentials */ |
| 270 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* Reserved8 */ |
| 271 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* QuerySecurityContextToken */ |
| 272 | credssp_EncryptMessagecxx . . $ credssp_EncryptMessage(e5afddb57b5310d6)., /* EncryptMessage */ |
| 273 | credssp_DecryptMessagecxx . . $ credssp_DecryptMessage(413abde90771aeb2)., /* DecryptMessage */ |
| 274 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* SetContextAttributes */ |
| 275 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* SetCredentialsAttributes */ |
| 276 | }; |
| 277 | |
| 278 | const SecurityFunctionTableWcxx . . $ SecurityFunctionTableW# CREDSSP_SecurityFunctionTableWcxx . . $ CREDSSP_SecurityFunctionTableW. = { |
| 279 | 3, /* dwVersion */ |
| 280 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* EnumerateSecurityPackages */ |
| 281 | credssp_QueryCredentialsAttributesWcxx . . $ credssp_QueryCredentialsAttributesW(998cea891dba569e)., /* QueryCredentialsAttributes */ |
| 282 | credssp_AcquireCredentialsHandleWcxx . . $ credssp_AcquireCredentialsHandleW(537031bd00bdbc62)., /* AcquireCredentialsHandle */ |
| 283 | credssp_FreeCredentialsHandlecxx . . $ credssp_FreeCredentialsHandle(e6bcc0180d974dfe)., /* FreeCredentialsHandle */ |
| 284 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* Reserved2 */ |
| 285 | credssp_InitializeSecurityContextWcxx . . $ credssp_InitializeSecurityContextW(422ccc8b6dd4c323)., /* InitializeSecurityContext */ |
| 286 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* AcceptSecurityContext */ |
| 287 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* CompleteAuthToken */ |
| 288 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* DeleteSecurityContext */ |
| 289 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* ApplyControlToken */ |
| 290 | credssp_QueryContextAttributescxx . . $ credssp_QueryContextAttributes(998cea891dba569e)., /* QueryContextAttributes */ |
| 291 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* ImpersonateSecurityContext */ |
| 292 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* RevertSecurityContext */ |
| 293 | credssp_MakeSignaturecxx . . $ credssp_MakeSignature(e5afddb57b5310d6)., /* MakeSignature */ |
| 294 | credssp_VerifySignaturecxx . . $ credssp_VerifySignature(413abde90771aeb2)., /* VerifySignature */ |
| 295 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* FreeContextBuffer */ |
| 296 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* QuerySecurityPackageInfo */ |
| 297 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* Reserved3 */ |
| 298 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* Reserved4 */ |
| 299 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* ExportSecurityContext */ |
| 300 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* ImportSecurityContext */ |
| 301 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* AddCredentials */ |
| 302 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* Reserved8 */ |
| 303 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* QuerySecurityContextToken */ |
| 304 | credssp_EncryptMessagecxx . . $ credssp_EncryptMessage(e5afddb57b5310d6)., /* EncryptMessage */ |
| 305 | credssp_DecryptMessagecxx . . $ credssp_DecryptMessage(413abde90771aeb2)., /* DecryptMessage */ |
| 306 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* SetContextAttributes */ |
| 307 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* SetCredentialsAttributes */ |
| 308 | }; |
| 309 | |
| 310 | const SecPkgInfoAcxx . . $ SecPkgInfoA# CREDSSP_SecPkgInfoAcxx . . $ CREDSSP_SecPkgInfoA. = { |
| 311 | 0x000110733, /* fCapabilities */ |
| 312 | 1, /* wVersion */ |
| 313 | 0xFFFF, /* wRPCID */ |
| 314 | 0x000090A8, /* cbMaxToken */ |
| 315 | "CREDSSP", /* Name */ |
| 316 | "Microsoft CredSSP Security Provider" /* Comment */ |
| 317 | }; |
| 318 | |
| 319 | static WCHARcxx . . $ WCHAR# CREDSSP_SecPkgInfoW_NameBuffercxx . . $ CREDSSP_SecPkgInfoW_NameBuffer.[128] = WINPR_C_ARRAY_INITcxx . . $ `winpr/include/winpr/platform.h:87:9`!; |
| 320 | static WCHARcxx . . $ WCHAR# CREDSSP_SecPkgInfoW_CommentBuffercxx . . $ CREDSSP_SecPkgInfoW_CommentBuffer.[128] = WINPR_C_ARRAY_INITcxx . . $ `winpr/include/winpr/platform.h:87:9`!; |
| 321 | |
| 322 | const SecPkgInfoWcxx . . $ SecPkgInfoW# CREDSSP_SecPkgInfoWcxx . . $ CREDSSP_SecPkgInfoW. = { |
| 323 | 0x000110733, /* fCapabilities */ |
| 324 | 1, /* wVersion */ |
| 325 | 0xFFFF, /* wRPCID */ |
| 326 | 0x000090A8, /* cbMaxToken */ |
| 327 | CREDSSP_SecPkgInfoW_NameBuffercxx . . $ CREDSSP_SecPkgInfoW_NameBuffer., /* Name */ |
| 328 | CREDSSP_SecPkgInfoW_CommentBuffercxx . . $ CREDSSP_SecPkgInfoW_CommentBuffer. /* Comment */ |
| 329 | }; |
| 330 | |
| 331 | BOOLcxx . . $ BOOL# CREDSSP_initcxx . . $ CREDSSP_init(b126dc7c1de90089).(void) |
| 332 | { |
| 333 | InitializeConstWCharFromUtf8cxx . . $ InitializeConstWCharFromUtf8(937e1d3c9c433ddd).(CREDSSP_SecPkgInfoAcxx . . $ CREDSSP_SecPkgInfoA..Namecxx . . $ $anonymous_type_13c8ac8e1b4cb2c0_1#Name., CREDSSP_SecPkgInfoW_NameBuffercxx . . $ CREDSSP_SecPkgInfoW_NameBuffer., |
| 334 | ARRAYSIZEcxx . . $ `winpr/include/winpr/spec.h:962:9`!(CREDSSP_SecPkgInfoW_NameBuffer)); |
| 335 | InitializeConstWCharFromUtf8cxx . . $ InitializeConstWCharFromUtf8(937e1d3c9c433ddd).(CREDSSP_SecPkgInfoAcxx . . $ CREDSSP_SecPkgInfoA..Commentcxx . . $ $anonymous_type_13c8ac8e1b4cb2c0_1#Comment., CREDSSP_SecPkgInfoW_CommentBuffercxx . . $ CREDSSP_SecPkgInfoW_CommentBuffer., |
| 336 | ARRAYSIZEcxx . . $ `winpr/include/winpr/spec.h:962:9`!(CREDSSP_SecPkgInfoW_CommentBuffer)); |
| 337 | return TRUEcxx . . $ `winpr/include/winpr/wtypes.h:126:9`!; |
| 338 | } |