Changeset View
Changeset View
Standalone View
Standalone View
kexdh.c
/* $OpenBSD: kexdh.c,v 1.32 2019/01/21 10:40:11 djm Exp $ */ | /* $OpenBSD: kexdh.c,v 1.33 2020/05/08 05:13:14 djm Exp $ */ | ||||
/* | /* | ||||
* Copyright (c) 2019 Markus Friedl. All rights reserved. | * Copyright (c) 2019 Markus Friedl. All rights reserved. | ||||
* | * | ||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
* modification, are permitted provided that the following conditions | * modification, are permitted provided that the following conditions | ||||
* are met: | * are met: | ||||
* 1. Redistributions of source code must retain the above copyright | * 1. Redistributions of source code must retain the above copyright | ||||
* notice, this list of conditions and the following disclaimer. | * notice, this list of conditions and the following disclaimer. | ||||
Show All 27 Lines | |||||
#include <openssl/dh.h> | #include <openssl/dh.h> | ||||
#include "sshkey.h" | #include "sshkey.h" | ||||
#include "kex.h" | #include "kex.h" | ||||
#include "sshbuf.h" | #include "sshbuf.h" | ||||
#include "digest.h" | #include "digest.h" | ||||
#include "ssherr.h" | #include "ssherr.h" | ||||
#include "dh.h" | #include "dh.h" | ||||
#include "log.h" | |||||
int | int | ||||
kex_dh_keygen(struct kex *kex) | kex_dh_keygen(struct kex *kex) | ||||
{ | { | ||||
switch (kex->kex_type) { | switch (kex->kex_type) { | ||||
case KEX_DH_GRP1_SHA1: | case KEX_DH_GRP1_SHA1: | ||||
kex->dh = dh_new_group1(); | kex->dh = dh_new_group1(); | ||||
break; | break; | ||||
▲ Show 20 Lines • Show All 149 Lines • Show Last 20 Lines |