mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-30 03:19:11 +08:00
Remove libssh
libssh is LGPL licensed, which means I would need to re-license the entire app since we are linking against it statically. I could dynamically link against it, but since I was only trying to use it for key-generation and that doesn' seem to be working, I may as well discard it. For now, I'm going to stick with jsch for the key generation. On ios side, I'm not sure what I will do. One option could be to compile openssh and call the ssh-keygen binary.
This commit is contained in:
@ -22,14 +22,6 @@ set_target_properties(crypto-lib
|
||||
PROPERTIES IMPORTED_LOCATION
|
||||
${lib_src_DIR}/lib/libcrypto.a)
|
||||
|
||||
add_library(ssh-lib
|
||||
STATIC
|
||||
IMPORTED)
|
||||
|
||||
set_target_properties(ssh-lib
|
||||
PROPERTIES IMPORTED_LOCATION
|
||||
${lib_src_DIR}/lib/libssh.a)
|
||||
|
||||
add_library(ssh2-lib
|
||||
STATIC
|
||||
IMPORTED)
|
||||
@ -55,4 +47,4 @@ add_library(native-lib
|
||||
|
||||
# The order of these libraries is super dooper important
|
||||
# Otherwise you'll get linker errors
|
||||
target_link_libraries(native-lib git2-lib ssh2-lib ssh-lib openssl-lib crypto-lib android log)
|
||||
target_link_libraries(native-lib git2-lib ssh2-lib openssl-lib crypto-lib android log)
|
||||
|
@ -1,4 +1,4 @@
|
||||
CC=clang
|
||||
|
||||
test: gitjournal.c test.c keygen.c
|
||||
$(CC) -o test -g test.c gitjournal.c keygen.c -lgit2 -lssh
|
||||
$(CC) -o test -g test.c gitjournal.c keygen.c -lgit2
|
||||
|
@ -4,9 +4,10 @@
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <git2.h>
|
||||
/*
|
||||
#include <libssh/libssh.h>
|
||||
#include <libssh/callbacks.h>
|
||||
*/
|
||||
|
||||
void change_pubickey_comment(const char *filename, const char *comment)
|
||||
{
|
||||
@ -40,6 +41,8 @@ void gj_ssh_log_callback(int priority, const char *function, const char *buffer,
|
||||
int gj_generate_ssh_keys(const char *private_key_path,
|
||||
const char *public_key_path, const char *comment)
|
||||
{
|
||||
return 1;
|
||||
/*
|
||||
ssh_key key;
|
||||
int err;
|
||||
|
||||
@ -79,4 +82,5 @@ int gj_generate_ssh_keys(const char *private_key_path,
|
||||
chmod(private_key_path, modeInt);
|
||||
|
||||
return 0;
|
||||
*/
|
||||
}
|
||||
|
Reference in New Issue
Block a user