Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
1c3f29a9
Unverified
Commit
1c3f29a9
authored
Dec 23, 2020
by
Edward Thomson
Committed by
GitHub
Dec 23, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5750 from arroz/missing_hostkey_types
Add support for additional SSH hostkey types.
parents
381991a1
8dc0ba75
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
3 deletions
+29
-3
ci/docker/focal
+3
-3
include/git2/cert.h
+8
-0
src/transports/ssh.c
+18
-0
No files found.
ci/docker/focal
View file @
1c3f29a9
...
...
@@ -48,9 +48,9 @@ RUN cd /tmp && \
FROM mbedtls AS libssh2
RUN cd /tmp && \
curl --insecure --location --silent --show-error https://www.libssh2.org/download/libssh2-1.
8.2
.tar.gz | \
curl --insecure --location --silent --show-error https://www.libssh2.org/download/libssh2-1.
9.0
.tar.gz | \
tar -xz && \
cd libssh2-1.
8.2
&& \
cd libssh2-1.
9.0
&& \
mkdir build build-msan && \
cd build && \
CC=clang-10 CFLAGS="-fPIC" cmake -G Ninja -DBUILD_SHARED_LIBS=ON -DCRYPTO_BACKEND=Libgcrypt -DCMAKE_PREFIX_PATH=/usr/local -DCMAKE_INSTALL_PREFIX=/usr/local .. && \
...
...
@@ -59,7 +59,7 @@ RUN cd /tmp && \
CC=clang-10 CFLAGS="-fPIC -fsanitize=memory -fno-optimize-sibling-calls -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer" LDFLAGS="-fsanitize=memory" cmake -G Ninja -DBUILD_SHARED_LIBS=ON -DCRYPTO_BACKEND=mbedTLS -DCMAKE_PREFIX_PATH=/usr/local/msan -DCMAKE_INSTALL_PREFIX=/usr/local/msan .. && \
ninja install && \
cd .. && \
rm -rf libssh2-1.
8.2
rm -rf libssh2-1.
9.0
FROM libssh2 AS valgrind
RUN cd /tmp && \
...
...
include/git2/cert.h
View file @
1c3f29a9
...
...
@@ -91,6 +91,14 @@ typedef enum {
GIT_CERT_SSH_RAW_TYPE_RSA
=
1
,
/** The raw key is a DSS key. */
GIT_CERT_SSH_RAW_TYPE_DSS
=
2
,
/** The raw key is a ECDSA 256 key. */
GIT_CERT_SSH_RAW_TYPE_KEY_ECDSA_256
=
3
,
/** The raw key is a ECDSA 384 key. */
GIT_CERT_SSH_RAW_TYPE_KEY_ECDSA_384
=
4
,
/** The raw key is a ECDSA 521 key. */
GIT_CERT_SSH_RAW_TYPE_KEY_ECDSA_521
=
5
,
/** The raw key is a ED25519 key. */
GIT_CERT_SSH_RAW_TYPE_KEY_ED25519
=
6
}
git_cert_ssh_raw_type_t
;
/**
...
...
src/transports/ssh.c
View file @
1c3f29a9
...
...
@@ -580,6 +580,24 @@ post_extract:
case
LIBSSH2_HOSTKEY_TYPE_DSS
:
cert
.
raw_type
=
GIT_CERT_SSH_RAW_TYPE_DSS
;
break
;
#ifdef LIBSSH2_HOSTKEY_TYPE_ECDSA_256
case
LIBSSH2_HOSTKEY_TYPE_ECDSA_256
:
cert
.
raw_type
=
GIT_CERT_SSH_RAW_TYPE_KEY_ECDSA_256
;
break
;
case
LIBSSH2_HOSTKEY_TYPE_ECDSA_384
:
cert
.
raw_type
=
GIT_CERT_SSH_RAW_TYPE_KEY_ECDSA_384
;
break
;
case
LIBSSH2_KNOWNHOST_KEY_ECDSA_521
:
cert
.
raw_type
=
GIT_CERT_SSH_RAW_TYPE_KEY_ECDSA_521
;
break
;
#endif
#ifdef LIBSSH2_HOSTKEY_TYPE_ED25519
case
LIBSSH2_HOSTKEY_TYPE_ED25519
:
cert
.
raw_type
=
GIT_CERT_SSH_RAW_TYPE_KEY_ED25519
;
break
;
#endif
default:
cert
.
raw_type
=
GIT_CERT_SSH_RAW_TYPE_UNKNOWN
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment