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
cb6e68c7
Commit
cb6e68c7
authored
Jul 02, 2014
by
Vicent Marti
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2449 from libgit2/cmn/maint-21
Maint fixes for ssl initing and ssh exposure
parents
c1bf2942
00b8c216
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
11 deletions
+19
-11
include/git2/transport.h
+12
-10
src/global.c
+7
-1
No files found.
include/git2/transport.h
View file @
cb6e68c7
...
...
@@ -11,10 +11,6 @@
#include "net.h"
#include "types.h"
#ifdef GIT_SSH
#include <libssh2.h>
#endif
/**
* @file git2/transport.h
* @brief Git transport interfaces and functions
...
...
@@ -61,14 +57,20 @@ typedef struct {
char
*
password
;
}
git_cred_userpass_plaintext
;
#ifdef GIT_SSH
typedef
LIBSSH2_USERAUTH_PUBLICKEY_SIGN_FUNC
((
*
git_cred_sign_callback
));
typedef
LIBSSH2_USERAUTH_KBDINT_RESPONSE_FUNC
((
*
git_cred_ssh_interactive_callback
));
#else
typedef
int
(
*
git_cred_sign_callback
)(
void
*
,
...);
typedef
int
(
*
git_cred_ssh_interactive_callback
)(
void
*
,
...);
/*
* If the user hasn't included libssh2.h before git2.h, we need to
* define a few types for the callback signatures.
*/
#ifndef LIBSSH2_VERSION
typedef
struct
_LIBSSH2_SESSION
LIBSSH2_SESSION
;
typedef
struct
_LIBSSH2_USERAUTH_KBDINT_PROMPT
LIBSSH2_USERAUTH_KBDINT_PROMPT
;
typedef
struct
_LIBSSH2_USERAUTH_KBDINT_RESPONSE
LIBSSH2_USERAUTH_KBDINT_RESPONSE
;
#endif
typedef
int
(
*
git_cred_sign_callback
)(
LIBSSH2_SESSION
*
session
,
unsigned
char
**
sig
,
size_t
*
sig_len
,
const
unsigned
char
*
data
,
size_t
data_len
,
void
**
abstract
);
typedef
int
(
*
git_cred_ssh_interactive_callback
)(
const
char
*
name
,
int
name_len
,
const
char
*
instruction
,
int
instruction_len
,
int
num_prompts
,
const
LIBSSH2_USERAUTH_KBDINT_PROMPT
*
prompts
,
LIBSSH2_USERAUTH_KBDINT_RESPONSE
*
responses
,
void
**
abstract
);
/**
* A ssh key from disk
*/
...
...
src/global.c
View file @
cb6e68c7
...
...
@@ -291,7 +291,13 @@ static git_global_st __state;
int
git_threads_init
(
void
)
{
init_ssl
();
static
int
ssl_inited
=
0
;
if
(
!
ssl_inited
)
{
init_ssl
();
ssl_inited
=
1
;
}
git_atomic_inc
(
&
git__n_inits
);
return
0
;
}
...
...
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