Hello community,

here is the log from the commit of package libssh for openSUSE:Factory checked 
in at 2015-10-14 16:43:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libssh (Old)
 and      /work/SRC/openSUSE:Factory/.libssh.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libssh"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libssh/libssh.changes    2015-07-23 
15:22:11.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libssh.new/libssh.changes       2015-10-14 
16:43:58.000000000 +0200
@@ -1,0 +2,11 @@
+Wed Oct  7 08:25:18 UTC 2015 - a...@cryptomilk.org
+
+- Update to version 0.7.2
+  * Fixed OpenSSL detection on Windows
+  * Fixed return status for ssh_userauth_agent()
+  * Fixed KEX to prefer hmac-sha2-256
+  * Fixed sftp packet handling
+  * Fixed return values of ssh_key_is_(public|private)
+  * Fixed bug in global success reply
+
+-------------------------------------------------------------------

Old:
----
  libssh-0.7.1.tar.xz

New:
----
  libssh-0.7.2.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libssh.spec ++++++
--- /var/tmp/diff_new_pack.yK5uDT/_old  2015-10-14 16:43:59.000000000 +0200
+++ /var/tmp/diff_new_pack.yK5uDT/_new  2015-10-14 16:43:59.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           libssh
-Version:        0.7.1
+Version:        0.7.2
 Release:        0
 Summary:        The SSH library
 License:        LGPL-2.1+

++++++ libssh-0.7.1.tar.xz -> libssh-0.7.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libssh-0.7.1/CMakeLists.txt 
new/libssh-0.7.2/CMakeLists.txt
--- old/libssh-0.7.1/CMakeLists.txt     2015-06-29 11:16:03.000000000 +0200
+++ new/libssh-0.7.2/CMakeLists.txt     2015-09-16 08:44:35.000000000 +0200
@@ -8,7 +8,7 @@
 
 set(APPLICATION_VERSION_MAJOR "0")
 set(APPLICATION_VERSION_MINOR "7")
-set(APPLICATION_VERSION_PATCH "1")
+set(APPLICATION_VERSION_PATCH "2")
 
 set(APPLICATION_VERSION 
"${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}")
 
@@ -84,8 +84,8 @@
 add_subdirectory(src)
 
 # pkg-config file
+if (UNIX)
 configure_file(libssh.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc)
-configure_file(libssh_threads.pc.cmake 
${CMAKE_CURRENT_BINARY_DIR}/libssh_threads.pc)
 install(
   FILES
     ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc
@@ -96,6 +96,20 @@
     pkgconfig
 )
 
+    if (LIBSSH_THREADS)
+        configure_file(libssh_threads.pc.cmake 
${CMAKE_CURRENT_BINARY_DIR}/libssh_threads.pc)
+        install(
+          FILES
+            ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc
+            ${CMAKE_CURRENT_BINARY_DIR}/libssh_threads.pc
+          DESTINATION
+            ${LIB_INSTALL_DIR}/pkgconfig
+          COMPONENT
+            pkgconfig
+        )
+    endif (LIBSSH_THREADS)
+endif (UNIX)
+
 # cmake config files
 set(LIBSSH_LIBRARY_NAME 
${CMAKE_SHARED_LIBRARY_PREFIX}ssh${CMAKE_SHARED_LIBRARY_SUFFIX})
 set(LIBSSH_THREADS_LIBRARY_NAME 
${CMAKE_SHARED_LIBRARY_PREFIX}ssh${CMAKE_SHARED_LIBRARY_SUFFIX})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libssh-0.7.1/CPackConfig.cmake 
new/libssh-0.7.2/CPackConfig.cmake
--- old/libssh-0.7.1/CPackConfig.cmake  2015-06-24 18:36:08.000000000 +0200
+++ new/libssh-0.7.2/CPackConfig.cmake  2015-09-16 08:34:58.000000000 +0200
@@ -18,7 +18,7 @@
 
 
 ### source generator
-set(CPACK_SOURCE_GENERATOR "TGZ")
+set(CPACK_SOURCE_GENERATOR "TXZ")
 set(CPACK_SOURCE_IGNORE_FILES 
"~$;[.]swp$;/[.]svn/;/[.]git/;.gitignore;/build/;/obj/;tags;cscope.*")
 set(CPACK_SOURCE_PACKAGE_FILE_NAME 
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libssh-0.7.1/ChangeLog new/libssh-0.7.2/ChangeLog
--- old/libssh-0.7.1/ChangeLog  2015-06-29 11:15:56.000000000 +0200
+++ new/libssh-0.7.2/ChangeLog  2015-09-16 08:44:35.000000000 +0200
@@ -1,6 +1,14 @@
 ChangeLog
 ==========
 
+version 0.7.2 (released 2015-09-15)
+  * Fixed OpenSSL detection on Windows
+  * Fixed return status for ssh_userauth_agent()
+  * Fixed KEX to prefer hmac-sha2-256
+  * Fixed sftp packet handling
+  * Fixed return values of ssh_key_is_(public|private)
+  * Fixed bug in global success reply
+
 version 0.7.1 (released 2015-06-30)
   * Fixed SSH_AUTH_PARTIAL auth with auto public key
   * Fixed memory leak in session options
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libssh-0.7.1/ConfigureChecks.cmake 
new/libssh-0.7.2/ConfigureChecks.cmake
--- old/libssh-0.7.1/ConfigureChecks.cmake      2015-05-08 13:55:13.000000000 
+0200
+++ new/libssh-0.7.2/ConfigureChecks.cmake      2015-08-21 15:58:17.000000000 
+0200
@@ -65,23 +65,31 @@
   check_include_files("winsock2.h;ws2tcpip.h" HAVE_WS2TCPIP_H)
 endif (WIN32)
 
-set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
-check_include_file(openssl/aes.h HAVE_OPENSSL_AES_H)
-
-set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
-check_include_file(openssl/blowfish.h HAVE_OPENSSL_BLOWFISH_H)
-
-set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
-check_include_file(openssl/des.h HAVE_OPENSSL_DES_H)
-
-set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
-check_include_file(openssl/ecdh.h HAVE_OPENSSL_ECDH_H)
-
-set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
-check_include_file(openssl/ec.h HAVE_OPENSSL_EC_H)
-
-set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
-check_include_file(openssl/ecdsa.h HAVE_OPENSSL_ECDSA_H)
+if (OPENSSL_FOUND)
+    set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
+    check_include_file(openssl/des.h HAVE_OPENSSL_DES_H)
+    if (NOT HAVE_OPENSSL_DES_H)
+        message(FATAL_ERROR "Could not detect openssl/des.h")
+    endif()
+
+    set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
+    check_include_file(openssl/aes.h HAVE_OPENSSL_AES_H)
+    if (NOT HAVE_OPENSSL_AES_H)
+        message(FATAL_ERROR "Could not detect openssl/aes.h")
+    endif()
+
+    set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
+    check_include_file(openssl/blowfish.h HAVE_OPENSSL_BLOWFISH_H)
+
+    set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
+    check_include_file(openssl/ecdh.h HAVE_OPENSSL_ECDH_H)
+
+    set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
+    check_include_file(openssl/ec.h HAVE_OPENSSL_EC_H)
+
+    set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
+    check_include_file(openssl/ecdsa.h HAVE_OPENSSL_ECDSA_H)
+endif()
 
 if (CMAKE_HAVE_PTHREAD_H)
   set(HAVE_PTHREAD_H 1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libssh-0.7.1/doc/sftp.dox 
new/libssh-0.7.2/doc/sftp.dox
--- old/libssh-0.7.1/doc/sftp.dox       2015-04-23 11:12:36.000000000 +0200
+++ new/libssh-0.7.2/doc/sftp.dox       2015-08-21 15:58:17.000000000 +0200
@@ -253,7 +253,7 @@
           return SSH_ERROR;
       }
 
-      nwritten = write(fd, buf, nbytes);
+      nwritten = write(fd, buffer, nbytes);
       if (nwritten != nbytes) {
           fprintf(stderr, "Error writing: %s\n",
                   strerror(errno));
@@ -282,7 +282,7 @@
 call sftp_file_set_nonblocking() right after you opened it. Default is 
blocking mode.
 
 The example below reads a very big file in asynchronous, nonblocking, mode. 
Each
-time the data are not ready yet, a counter is incrementer.
+time the data is not ready yet, a counter is incremented.
 
 @code
 // Good chunk size
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libssh-0.7.1/include/libssh/libssh.h 
new/libssh-0.7.2/include/libssh/libssh.h
--- old/libssh-0.7.1/include/libssh/libssh.h    2015-06-29 11:16:10.000000000 
+0200
+++ new/libssh-0.7.2/include/libssh/libssh.h    2015-09-16 08:44:35.000000000 
+0200
@@ -78,7 +78,7 @@
 /* libssh version */
 #define LIBSSH_VERSION_MAJOR  0
 #define LIBSSH_VERSION_MINOR  7
-#define LIBSSH_VERSION_MICRO  1
+#define LIBSSH_VERSION_MICRO  2
 
 #define LIBSSH_VERSION_INT SSH_VERSION_INT(LIBSSH_VERSION_MAJOR, \
                                            LIBSSH_VERSION_MINOR, \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libssh-0.7.1/include/libssh/priv.h 
new/libssh-0.7.2/include/libssh/priv.h
--- old/libssh-0.7.1/include/libssh/priv.h      2015-06-24 16:24:12.000000000 
+0200
+++ new/libssh-0.7.2/include/libssh/priv.h      2015-08-21 15:58:17.000000000 
+0200
@@ -60,6 +60,7 @@
 
 # ifdef _MSC_VER
 #  include <stdio.h>
+#  include <stdarg.h> /* va_copy define check */
 
 /* On Microsoft compilers define inline to __inline on all others use inline */
 #  undef inline
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libssh-0.7.1/src/CMakeLists.txt 
new/libssh-0.7.2/src/CMakeLists.txt
--- old/libssh-0.7.1/src/CMakeLists.txt 2015-06-24 18:36:08.000000000 +0200
+++ new/libssh-0.7.2/src/CMakeLists.txt 2015-09-16 08:34:58.000000000 +0200
@@ -54,7 +54,7 @@
 if (WITH_ZLIB)
   set(LIBSSH_PRIVATE_INCLUDE_DIRS
     ${LIBSSH_PRIVATE_INCLUDE_DIRS}
-    ${ZLIB_INCLUDE_DIRS}
+    ${ZLIB_INCLUDE_DIR}
   )
 
   set(LIBSSH_LINK_LIBRARIES
@@ -300,6 +300,7 @@
   )
 endif (WITH_STATIC_LIB)
 
+message(STATUS "Threads_FOUND=${Threads_FOUND}")
 if (Threads_FOUND)
     add_subdirectory(threads)
 endif (Threads_FOUND)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libssh-0.7.1/src/auth.c new/libssh-0.7.2/src/auth.c
--- old/libssh-0.7.1/src/auth.c 2015-06-29 11:11:26.000000000 +0200
+++ new/libssh-0.7.2/src/auth.c 2015-09-16 08:44:35.000000000 +0200
@@ -786,6 +786,11 @@
     state = session->agent_state;
     if (state->pubkey == NULL)
         state->pubkey = ssh_agent_get_first_ident(session, &state->comment);
+
+    if (state->pubkey == NULL) {
+        return SSH_AUTH_DENIED;
+    }
+
     while (state->pubkey != NULL) {
         if(state->state == SSH_AGENT_STATE_NONE){
             SSH_LOG(SSH_LOG_DEBUG,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libssh-0.7.1/src/bignum.c 
new/libssh-0.7.2/src/bignum.c
--- old/libssh-0.7.1/src/bignum.c       2015-05-08 13:55:13.000000000 +0200
+++ new/libssh-0.7.2/src/bignum.c       2015-09-16 08:34:58.000000000 +0200
@@ -103,5 +103,9 @@
 #endif
   fprintf(stderr, "%s value: ", which);
   fprintf(stderr, "%s\n", (hex == NULL) ? "(null)" : (char *) hex);
+#ifdef HAVE_LIBGCRYPT
   SAFE_FREE(hex);
+#elif defined HAVE_LIBCRYPTO
+  OPENSSL_free(hex);
+#endif
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libssh-0.7.1/src/kex.c new/libssh-0.7.2/src/kex.c
--- old/libssh-0.7.1/src/kex.c  2015-06-24 16:24:08.000000000 +0200
+++ new/libssh-0.7.2/src/kex.c  2015-09-16 08:34:58.000000000 +0200
@@ -94,8 +94,8 @@
   HOSTKEYS,
   AES BLOWFISH DES,
   AES BLOWFISH DES,
-  "hmac-sha1,hmac-sha2-256,hmac-sha2-512",
-  "hmac-sha1,hmac-sha2-256,hmac-sha2-512",
+  "hmac-sha2-256,hmac-sha2-512,hmac-sha1",
+  "hmac-sha2-256,hmac-sha2-512,hmac-sha1",
   "none",
   "none",
   "",
@@ -109,8 +109,8 @@
   HOSTKEYS,
   AES BLOWFISH DES_SUPPORTED,
   AES BLOWFISH DES_SUPPORTED,
-  "hmac-sha1,hmac-sha2-256,hmac-sha2-512",
-  "hmac-sha1,hmac-sha2-256,hmac-sha2-512",
+  "hmac-sha2-256,hmac-sha2-512,hmac-sha1",
+  "hmac-sha2-256,hmac-sha2-512,hmac-sha1",
   ZLIB,
   ZLIB,
   "",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libssh-0.7.1/src/pki.c new/libssh-0.7.2/src/pki.c
--- old/libssh-0.7.1/src/pki.c  2015-05-08 13:55:13.000000000 +0200
+++ new/libssh-0.7.2/src/pki.c  2015-09-16 08:44:35.000000000 +0200
@@ -271,7 +271,7 @@
         return 0;
     }
 
-    return (k->flags & SSH_KEY_FLAG_PUBLIC);
+    return (k->flags & SSH_KEY_FLAG_PUBLIC) == SSH_KEY_FLAG_PUBLIC;
 }
 
 /**
@@ -286,7 +286,7 @@
         return 0;
     }
 
-    return (k->flags & SSH_KEY_FLAG_PRIVATE);
+    return (k->flags & SSH_KEY_FLAG_PRIVATE) == SSH_KEY_FLAG_PRIVATE;
 }
 
 /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libssh-0.7.1/src/server.c 
new/libssh-0.7.2/src/server.c
--- old/libssh-0.7.1/src/server.c       2015-05-08 13:55:13.000000000 +0200
+++ new/libssh-0.7.2/src/server.c       2015-08-21 15:58:18.000000000 +0200
@@ -746,7 +746,7 @@
         if(msg->global_request.type == SSH_GLOBAL_REQUEST_TCPIP_FORWARD 
                                 && msg->global_request.bind_port == 0) {
             rc = ssh_buffer_pack(msg->session->out_buffer, "d", bound_port);
-            if (rc != SSH_ERROR) {
+            if (rc != SSH_OK) {
                 ssh_set_error_oom(msg->session);
                 goto error;
             }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libssh-0.7.1/src/sftp.c new/libssh-0.7.2/src/sftp.c
--- old/libssh-0.7.1/src/sftp.c 2015-05-08 13:55:13.000000000 +0200
+++ new/libssh-0.7.2/src/sftp.c 2015-09-16 08:44:35.000000000 +0200
@@ -315,7 +315,7 @@
   sftp_packet packet = NULL;
   uint32_t tmp;
   size_t size;
-  int r;
+  int r, s;
 
   packet = malloc(sizeof(struct sftp_packet_struct));
   if (packet == NULL) {
@@ -330,12 +330,18 @@
     return NULL;
   }
 
-  r=ssh_channel_read(sftp->channel, buffer, 4, 0);
-  if (r < 0) {
-    ssh_buffer_free(packet->payload);
-    SAFE_FREE(packet);
-    return NULL;
-  }
+  r=0;
+  do {
+    // read from channel until 4 bytes have been read or an error occurs
+    s=ssh_channel_read(sftp->channel, buffer+r, 4-r, 0);
+    if (s < 0) {
+      ssh_buffer_free(packet->payload);
+      SAFE_FREE(packet);
+      return NULL;
+    } else {
+      r += s;
+    }
+  } while (r<4);
   ssh_buffer_add_data(packet->payload, buffer, r);
   if (buffer_get_u32(packet->payload, &tmp) != sizeof(uint32_t)) {
     ssh_set_error(sftp->session, SSH_FATAL, "Short sftp packet!");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libssh-0.7.1/src/threads/CMakeLists.txt 
new/libssh-0.7.2/src/threads/CMakeLists.txt
--- old/libssh-0.7.1/src/threads/CMakeLists.txt 2015-04-23 11:12:36.000000000 
+0200
+++ new/libssh-0.7.2/src/threads/CMakeLists.txt 2015-09-16 08:34:58.000000000 
+0200
@@ -27,8 +27,9 @@
     ${LIBSSH_SHARED_LIBRARY}
 )
 
-set(libssh_threads_SRCS
-)
+message(STATUS "threads library: Threads_FOUND=${Threads_FOUND}")
+
+set(libssh_threads_SRCS) # empty SRC
 
 # build and link pthread
 if (CMAKE_USE_PTHREADS_INIT)
@@ -41,6 +42,8 @@
         ${LIBSSH_THREADS_LINK_LIBRARIES}
         ${CMAKE_THREAD_LIBS_INIT}
     )
+
+    message(STATUS "libssh_threads_SRCS=${libssh_threads_SRCS}")
 endif (CMAKE_USE_PTHREADS_INIT)
 
 set(LIBSSH_THREADS_LINK_LIBRARIES
@@ -54,6 +57,8 @@
 )
 
 if (libssh_threads_SRCS)
+    set(LIBSSH_THREADS ON CACHE "libssh threads lib" INTERNAL)
+
     add_library(${LIBSSH_THREADS_SHARED_LIBRARY} SHARED ${libssh_threads_SRCS})
 
     target_link_libraries(${LIBSSH_THREADS_SHARED_LIBRARY} 
${LIBSSH_THREADS_LINK_LIBRARIES})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libssh-0.7.1/tests/CMakeLists.txt 
new/libssh-0.7.2/tests/CMakeLists.txt
--- old/libssh-0.7.1/tests/CMakeLists.txt       2015-06-24 18:36:08.000000000 
+0200
+++ new/libssh-0.7.2/tests/CMakeLists.txt       2015-09-16 08:34:58.000000000 
+0200
@@ -9,9 +9,9 @@
 include_directories(
   ${LIBSSH_PUBLIC_INCLUDE_DIRS}
   ${CMOCKA_INCLUDE_DIR}
-  ${OPENSSL_INCLUDE_DIRS}
-  ${GCRYPT_INCLUDE_DIRS}
-  ${ZLIB_INCLUDE_DIRS}
+  ${OPENSSL_INCLUDE_DIR}
+  ${GCRYPT_INCLUDE_DIR}
+  ${ZLIB_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}
   ${CMAKE_SOURCE_DIR}/src
   ${CMAKE_CURRENT_SOURCE_DIR}
@@ -22,12 +22,12 @@
     ${LIBSSH_STATIC_LIBRARY}
     ${LIBSSH_LINK_LIBRARIES})
 
-if (Threads_FOUND)
+if (LIBSSH_THREADS)
     set(TORTURE_LINK_LIBRARIES
         ${TORTURE_LINK_LIBRARIES}
         ${LIBSSH_THREADS_STATIC_LIBRARY}
         ${LIBSSH_THREADS_LINK_LIBRARIES})
-endif ()
+endif (LIBSSH_THREADS)
 
 # create test library
 add_library(${TORTURE_LIBRARY} STATIC cmdline.c torture.c)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libssh-0.7.1/tests/pkd/CMakeLists.txt 
new/libssh-0.7.2/tests/pkd/CMakeLists.txt
--- old/libssh-0.7.1/tests/pkd/CMakeLists.txt   2015-05-08 13:55:13.000000000 
+0200
+++ new/libssh-0.7.2/tests/pkd/CMakeLists.txt   2015-08-21 15:58:18.000000000 
+0200
@@ -5,9 +5,9 @@
 include_directories(
   ${LIBSSH_PUBLIC_INCLUDE_DIRS}
   ${CMOCKA_INCLUDE_DIR}
-  ${OPENSSL_INCLUDE_DIRS}
-  ${GCRYPT_INCLUDE_DIRS}
-  ${ZLIB_INCLUDE_DIRS}
+  ${OPENSSL_INCLUDE_DIR}
+  ${GCRYPT_INCLUDE_DIR}
+  ${ZLIB_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}
   ${CMAKE_SOURCE_DIR}/src
   ${CMAKE_CURRENT_SOURCE_DIR}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libssh-0.7.1/tests/unittests/CMakeLists.txt 
new/libssh-0.7.2/tests/unittests/CMakeLists.txt
--- old/libssh-0.7.1/tests/unittests/CMakeLists.txt     2015-05-08 
13:55:13.000000000 +0200
+++ new/libssh-0.7.2/tests/unittests/CMakeLists.txt     2015-09-16 
08:34:58.000000000 +0200
@@ -14,11 +14,13 @@
     # requires ssh-keygen
     add_cmocka_test(torture_keyfiles torture_keyfiles.c ${TORTURE_LIBRARY})
     add_cmocka_test(torture_pki torture_pki.c ${TORTURE_LIBRARY})
-    # requires pthread
-    add_cmocka_test(torture_rand torture_rand.c ${TORTURE_LIBRARY})
     # requires /dev/null
     add_cmocka_test(torture_channel torture_channel.c ${TORTURE_LIBRARY})
-    if (WITH_SERVER AND Threads_FOUND)
-        add_cmocka_test(torture_server_x11 torture_server_x11.c 
${TORTURE_LIBRARY})
-    endif (WITH_SERVER AND Threads_FOUND)
+    # requires pthread
+    if (LIBSSH_THREADS)
+        add_cmocka_test(torture_rand torture_rand.c ${TORTURE_LIBRARY})
+        if (WITH_SERVER)
+            add_cmocka_test(torture_server_x11 torture_server_x11.c 
${TORTURE_LIBRARY})
+        endif (WITH_SERVER)
+    endif (LIBSSH_THREADS)
 endif (UNIX AND NOT WIN32)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libssh-0.7.1/tests/unittests/torture_pki.c 
new/libssh-0.7.2/tests/unittests/torture_pki.c
--- old/libssh-0.7.1/tests/unittests/torture_pki.c      2015-05-08 
13:55:13.000000000 +0200
+++ new/libssh-0.7.2/tests/unittests/torture_pki.c      2015-09-16 
08:44:35.000000000 +0200
@@ -212,6 +212,9 @@
     type = ssh_key_type(key);
     assert_true(type == SSH_KEYTYPE_RSA);
 
+    rc = ssh_key_is_private(key);
+    assert_true(rc == 1);
+
     rc = ssh_key_is_public(key);
     assert_true(rc == 1);
 
@@ -281,6 +284,9 @@
     rc = ssh_pki_import_privkey_base64(key_str, passphrase, NULL, NULL, &key);
     assert_true(rc == 0);
 
+    rc = ssh_key_is_private(key);
+    assert_true(rc == 1);
+
     free(key_str);
     ssh_key_free(key);
 }
@@ -300,6 +306,10 @@
                                        NULL,
                                        &key);
     assert_true(rc == 0);
+
+    rc = ssh_key_is_private(key);
+    assert_true(rc == 1);
+
     ssh_key_free(key);
 
     /* test if it returns -1 if passphrase is wrong */
@@ -329,6 +339,10 @@
                                        NULL,
                                        &key);
     assert_true(rc == 0);
+
+    rc = ssh_key_is_private(key);
+    assert_true(rc == 1);
+
     ssh_key_free(key);
 
     /* test if it returns -1 if passphrase is wrong */
@@ -358,6 +372,10 @@
                                        NULL,
                                        &key);
     assert_true(rc == 0);
+
+    rc = ssh_key_is_private(key);
+    assert_true(rc == 1);
+
     ssh_key_free(key);
 
     /* test if it returns -1 if passphrase is wrong */
@@ -388,6 +406,9 @@
     type = ssh_key_type(key);
     assert_true(type == SSH_KEYTYPE_ED25519);
 
+    rc = ssh_key_is_private(key);
+    assert_true(rc == 1);
+
     rc = ssh_key_is_public(key);
     assert_true(rc == 1);
 
@@ -411,6 +432,9 @@
                                        &key);
     assert_true(rc == 0);
 
+    rc = ssh_key_is_private(key);
+    assert_true(rc == 1);
+
     rc = ssh_pki_export_privkey_to_pubkey(key, &pubkey);
     assert_true(rc == SSH_OK);
 
@@ -433,6 +457,9 @@
                                        &key);
     assert_true(rc == 0);
 
+    rc = ssh_key_is_private(key);
+    assert_true(rc == 1);
+
     rc = ssh_pki_export_privkey_to_pubkey(key, &pubkey);
     assert_true(rc == SSH_OK);
 
@@ -455,6 +482,9 @@
                                        &key);
     assert_true(rc == 0);
 
+    rc = ssh_key_is_private(key);
+    assert_true(rc == 1);
+
     rc = ssh_pki_export_privkey_to_pubkey(key, &pubkey);
     assert_true(rc == SSH_OK);
 


Reply via email to