Skip to content

Commit c9f7185

Browse files
committed
5-5 C2
1 parent 32b8e7e commit c9f7185

File tree

5 files changed

+622
-1
lines changed

5 files changed

+622
-1
lines changed

contrib/win32/openssh/Win32-OpenSSH.sln

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 14
4-
VisualStudioVersion = 14.0.24720.0
4+
VisualStudioVersion = 14.0.23107.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssh", "ssh.vcxproj", "{74E69D5E-A1EF-46EA-9173-19A412774104}"
77
ProjectSection(ProjectDependencies) = postProject
@@ -94,6 +94,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssh-add", "ssh-add.vcxproj"
9494
{8660C2FE-9874-432D-B047-E042BB41DBE0} = {8660C2FE-9874-432D-B047-E042BB41DBE0}
9595
EndProjectSection
9696
EndProject
97+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssh-pubkey", "ssh-pubkey.vcxproj", "{029797FF-C986-43DE-95CD-2E771E86A0AD}"
98+
ProjectSection(ProjectDependencies) = postProject
99+
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
100+
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
101+
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
102+
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
103+
{8660C2FE-9874-432D-B047-E042BB41DBE0} = {8660C2FE-9874-432D-B047-E042BB41DBE0}
104+
EndProjectSection
105+
EndProject
97106
Global
98107
GlobalSection(SolutionConfigurationPlatforms) = preSolution
99108
Debug|x64 = Debug|x64
@@ -222,6 +231,14 @@ Global
222231
{029797FF-C986-43DE-95CD-2E771E86AEBC}.Release|x64.Build.0 = Release|x64
223232
{029797FF-C986-43DE-95CD-2E771E86AEBC}.Release|x86.ActiveCfg = Release|Win32
224233
{029797FF-C986-43DE-95CD-2E771E86AEBC}.Release|x86.Build.0 = Release|Win32
234+
{029797FF-C986-43DE-95CD-2E771E86A0AD}.Debug|x64.ActiveCfg = Debug|x64
235+
{029797FF-C986-43DE-95CD-2E771E86A0AD}.Debug|x64.Build.0 = Debug|x64
236+
{029797FF-C986-43DE-95CD-2E771E86A0AD}.Debug|x86.ActiveCfg = Debug|Win32
237+
{029797FF-C986-43DE-95CD-2E771E86A0AD}.Debug|x86.Build.0 = Debug|Win32
238+
{029797FF-C986-43DE-95CD-2E771E86A0AD}.Release|x64.ActiveCfg = Release|x64
239+
{029797FF-C986-43DE-95CD-2E771E86A0AD}.Release|x64.Build.0 = Release|x64
240+
{029797FF-C986-43DE-95CD-2E771E86A0AD}.Release|x86.ActiveCfg = Release|Win32
241+
{029797FF-C986-43DE-95CD-2E771E86A0AD}.Release|x86.Build.0 = Release|Win32
225242
EndGlobalSection
226243
GlobalSection(SolutionProperties) = preSolution
227244
HideSolutionNode = FALSE
Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="paths.targets" />
4+
<ItemGroup Label="ProjectConfigurations">
5+
<ProjectConfiguration Include="Debug|Win32">
6+
<Configuration>Debug</Configuration>
7+
<Platform>Win32</Platform>
8+
</ProjectConfiguration>
9+
<ProjectConfiguration Include="Release|Win32">
10+
<Configuration>Release</Configuration>
11+
<Platform>Win32</Platform>
12+
</ProjectConfiguration>
13+
<ProjectConfiguration Include="Debug|x64">
14+
<Configuration>Debug</Configuration>
15+
<Platform>x64</Platform>
16+
</ProjectConfiguration>
17+
<ProjectConfiguration Include="Release|x64">
18+
<Configuration>Release</Configuration>
19+
<Platform>x64</Platform>
20+
</ProjectConfiguration>
21+
</ItemGroup>
22+
<ItemGroup>
23+
<ClCompile Include="..\ssh-pubkey\pubkeyfd.c" />
24+
<ClCompile Include="..\ssh-pubkey\ssh-pubkey.c" />
25+
</ItemGroup>
26+
<ItemGroup>
27+
<ClInclude Include="..\ssh-pubkey\pubkeyfd.h" />
28+
</ItemGroup>
29+
<PropertyGroup Label="Globals">
30+
<ProjectGuid>{029797FF-C986-43DE-95CD-2E771E86A0AD}</ProjectGuid>
31+
<Keyword>Win32Proj</Keyword>
32+
<RootNamespace>Win32OpenSSH</RootNamespace>
33+
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
34+
<ProjectName>ssh-pubkey</ProjectName>
35+
</PropertyGroup>
36+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
37+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
38+
<ConfigurationType>Application</ConfigurationType>
39+
<UseDebugLibraries>true</UseDebugLibraries>
40+
<PlatformToolset>v140</PlatformToolset>
41+
<CharacterSet>MultiByte</CharacterSet>
42+
</PropertyGroup>
43+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
44+
<ConfigurationType>Application</ConfigurationType>
45+
<UseDebugLibraries>false</UseDebugLibraries>
46+
<PlatformToolset>v140</PlatformToolset>
47+
<WholeProgramOptimization>true</WholeProgramOptimization>
48+
<CharacterSet>MultiByte</CharacterSet>
49+
</PropertyGroup>
50+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
51+
<ConfigurationType>Application</ConfigurationType>
52+
<UseDebugLibraries>true</UseDebugLibraries>
53+
<PlatformToolset>v140</PlatformToolset>
54+
<CharacterSet>MultiByte</CharacterSet>
55+
</PropertyGroup>
56+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
57+
<ConfigurationType>Application</ConfigurationType>
58+
<UseDebugLibraries>false</UseDebugLibraries>
59+
<PlatformToolset>v140</PlatformToolset>
60+
<WholeProgramOptimization>true</WholeProgramOptimization>
61+
<CharacterSet>MultiByte</CharacterSet>
62+
</PropertyGroup>
63+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
64+
<ImportGroup Label="ExtensionSettings">
65+
</ImportGroup>
66+
<ImportGroup Label="Shared">
67+
</ImportGroup>
68+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
69+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
70+
</ImportGroup>
71+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
72+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
73+
</ImportGroup>
74+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
75+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
76+
</ImportGroup>
77+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
78+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
79+
</ImportGroup>
80+
<PropertyGroup Label="UserMacros" />
81+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
82+
<LinkIncremental>true</LinkIncremental>
83+
<OutDir>$(OpenSSH-Bin-Path)$(Platform)\$(Configuration)\</OutDir>
84+
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
85+
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
86+
</PropertyGroup>
87+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
88+
<LinkIncremental>true</LinkIncremental>
89+
<OutDir>$(OpenSSH-Bin-Path)$(Platform)\$(Configuration)\</OutDir>
90+
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
91+
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
92+
</PropertyGroup>
93+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
94+
<LinkIncremental>false</LinkIncremental>
95+
<OutDir>$(OpenSSH-Bin-Path)$(Platform)\$(Configuration)\</OutDir>
96+
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
97+
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
98+
</PropertyGroup>
99+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
100+
<LinkIncremental>false</LinkIncremental>
101+
<OutDir>$(OpenSSH-Bin-Path)$(Platform)\$(Configuration)\</OutDir>
102+
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
103+
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
104+
</PropertyGroup>
105+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
106+
<ClCompile>
107+
<PrecompiledHeader>
108+
</PrecompiledHeader>
109+
<WarningLevel>Level1</WarningLevel>
110+
<Optimization>Disabled</Optimization>
111+
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
112+
<SDLCheck>false</SDLCheck>
113+
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat\includes;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
114+
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
115+
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
116+
</ClCompile>
117+
<Link>
118+
<SubSystem>Console</SubSystem>
119+
<GenerateDebugInformation>true</GenerateDebugInformation>
120+
<AdditionalDependencies>win32iocompat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;win32compat.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
121+
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
122+
</Link>
123+
</ItemDefinitionGroup>
124+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
125+
<ClCompile>
126+
<PrecompiledHeader>
127+
</PrecompiledHeader>
128+
<WarningLevel>Level1</WarningLevel>
129+
<Optimization>Disabled</Optimization>
130+
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
131+
<SDLCheck>false</SDLCheck>
132+
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat\includes;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
133+
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
134+
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
135+
</ClCompile>
136+
<Link>
137+
<SubSystem>Console</SubSystem>
138+
<GenerateDebugInformation>true</GenerateDebugInformation>
139+
<AdditionalDependencies>win32iocompat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;win32compat.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
140+
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
141+
</Link>
142+
</ItemDefinitionGroup>
143+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
144+
<ClCompile>
145+
<WarningLevel>Level1</WarningLevel>
146+
<PrecompiledHeader>
147+
</PrecompiledHeader>
148+
<Optimization>MaxSpeed</Optimization>
149+
<FunctionLevelLinking>true</FunctionLevelLinking>
150+
<IntrinsicFunctions>true</IntrinsicFunctions>
151+
<PreprocessorDefinitions>_WIN32_WINNT=0x501;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
152+
<SDLCheck>false</SDLCheck>
153+
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat\includes;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
154+
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
155+
</ClCompile>
156+
<Link>
157+
<SubSystem>Console</SubSystem>
158+
<GenerateDebugInformation>No</GenerateDebugInformation>
159+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
160+
<OptimizeReferences>true</OptimizeReferences>
161+
<AdditionalDependencies>win32iocompat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;win32compat.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
162+
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
163+
</Link>
164+
</ItemDefinitionGroup>
165+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
166+
<ClCompile>
167+
<WarningLevel>Level1</WarningLevel>
168+
<PrecompiledHeader>
169+
</PrecompiledHeader>
170+
<Optimization>MaxSpeed</Optimization>
171+
<FunctionLevelLinking>true</FunctionLevelLinking>
172+
<IntrinsicFunctions>true</IntrinsicFunctions>
173+
<PreprocessorDefinitions>_WIN32_WINNT=0x501;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
174+
<SDLCheck>false</SDLCheck>
175+
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat\includes;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
176+
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
177+
</ClCompile>
178+
<Link>
179+
<SubSystem>Console</SubSystem>
180+
<GenerateDebugInformation>No</GenerateDebugInformation>
181+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
182+
<OptimizeReferences>true</OptimizeReferences>
183+
<AdditionalDependencies>win32iocompat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;win32compat.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
184+
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
185+
</Link>
186+
</ItemDefinitionGroup>
187+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
188+
<ImportGroup Label="ExtensionTargets">
189+
</ImportGroup>
190+
</Project>

contrib/win32/ssh-pubkey/pubkeyfd.c

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
* Author: Manoj Ampalam <[email protected]>
3+
*
4+
* Copyright (c) 2015 Microsoft Corp.
5+
* All rights reserved
6+
*
7+
* Protocol code that talks to public key agent using
8+
* https://tools.ietf.org/html/rfc4819
9+
*
10+
* Redistribution and use in source and binary forms, with or without
11+
* modification, are permitted provided that the following conditions
12+
* are met:
13+
*
14+
* 1. Redistributions of source code must retain the above copyright
15+
* notice, this list of conditions and the following disclaimer.
16+
* 2. Redistributions in binary form must reproduce the above copyright
17+
* notice, this list of conditions and the following disclaimer in the
18+
* documentation and/or other materials provided with the distribution.
19+
*
20+
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21+
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22+
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23+
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24+
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25+
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26+
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27+
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29+
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30+
*/
31+
32+
#include "includes.h"
33+
34+
#include <sys/types.h>
35+
#include <sys/un.h>
36+
#include <sys/socket.h>
37+
38+
#include <fcntl.h>
39+
#include <stdlib.h>
40+
#include <signal.h>
41+
#include <stdarg.h>
42+
#include <string.h>
43+
#include <unistd.h>
44+
#include <errno.h>
45+
46+
#include "xmalloc.h"
47+
#include "ssh.h"
48+
#include "rsa.h"
49+
#include "sshbuf.h"
50+
#include "sshkey.h"
51+
#include "authfd.h"
52+
#include "cipher.h"
53+
#include "compat.h"
54+
#include "log.h"
55+
#include "atomicio.h"
56+
#include "misc.h"
57+
#include "ssherr.h"
58+
59+
#define MAX_AGENT_IDENTITIES 2048 /* Max keys in agent reply */
60+
#define MAX_AGENT_REPLY_LEN (256 * 1024) /* Max bytes in agent reply */
61+
62+
/* macro to check for "agent failure" message */
63+
#define agent_failed(x) \
64+
((x == SSH_AGENT_FAILURE) || \
65+
(x == SSH_COM_AGENT2_FAILURE) || \
66+
(x == SSH2_AGENT_FAILURE))
67+
68+
69+
int ssh_add_pubkey(int sock, struct sshkey *key, const char *comment) {
70+
return 0;
71+
}
72+
73+
int ssh_list_pubkeys(int sock, struct ssh_identitylist **idlp) {
74+
return 0;
75+
}
76+
77+
int ssh_remove_pubkey(int sock, struct sshkey *key) {
78+
return 0;
79+
}
80+
81+
int ssh_remove_pubkey_by_fp(int sock, const char *fingerprint) {
82+
return 0;
83+
}
84+
85+
int ssh_remove_all_pubkeys(int sock) {
86+
return 0;
87+
}

contrib/win32/ssh-pubkey/pubkeyfd.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
#ifndef PUBKEYFD_H
3+
#define PUBKEYFD_H
4+
5+
#define PK_REQUEST_ADD "add"
6+
#define PK_REQUEST_LIST "list"
7+
#define PK_REQUEST_REMOVE "remove"
8+
#define PK_REQUEST_REMOVE_ALL "removeall"
9+
#define PK_REQUEST_REMOVE_BY_FP "removebyfp"
10+
11+
int ssh_add_pubkey(int sock, struct sshkey *key, const char *comment);
12+
int ssh_list_pubkeys(int sock, struct ssh_identitylist **idlp);
13+
int ssh_remove_pubkey(int sock, struct sshkey *key);
14+
int ssh_remove_pubkey_by_fp(int sock, const char *fingerprint);
15+
int ssh_remove_all_pubkeys(int sock);
16+
17+
#endif

0 commit comments

Comments
 (0)