version 1.20.2.1, 2006/09/30 04:06:51 |
version 1.21, 2006/03/19 18:51:18 |
|
|
/* $OpenBSD$ */ |
|
/* |
/* |
* Copyright (c) 2002 Markus Friedl. All rights reserved. |
* Copyright (c) 2002 Markus Friedl. All rights reserved. |
* |
* |
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
*/ |
|
#include "includes.h" |
|
|
#include <sys/types.h> |
#include <paths.h> |
|
|
#include <openssl/evp.h> |
#include <openssl/evp.h> |
#include <openssl/rand.h> |
#include <openssl/rand.h> |
#include <openssl/rsa.h> |
#include <openssl/rsa.h> |
|
|
#include <fcntl.h> |
|
#include <paths.h> |
|
#include <pwd.h> |
|
#include <stdlib.h> |
|
#include <string.h> |
|
#include <unistd.h> |
|
|
|
#include "xmalloc.h" |
|
#include "log.h" |
#include "log.h" |
#include "key.h" |
#include "key.h" |
#include "ssh.h" |
#include "ssh.h" |
#include "ssh2.h" |
#include "ssh2.h" |
#include "misc.h" |
#include "misc.h" |
|
#include "xmalloc.h" |
#include "buffer.h" |
#include "buffer.h" |
|
#include "bufaux.h" |
#include "authfile.h" |
#include "authfile.h" |
#include "msg.h" |
#include "msg.h" |
#include "canohost.h" |
#include "canohost.h" |
|
|
buffer_init(&b); |
buffer_init(&b); |
buffer_append(&b, data, datalen); |
buffer_append(&b, data, datalen); |
|
|
/* session id, currently limited to SHA1 (20 bytes) or SHA256 (32) */ |
/* session id, currently limited to SHA1 (20 bytes) */ |
p = buffer_get_string(&b, &len); |
p = buffer_get_string(&b, &len); |
if (len != 20 && len != 32) |
if (len != 20) |
fail++; |
fail++; |
xfree(p); |
xfree(p); |
|
|