version 1.19, 2003/11/10 16:23:41 |
version 1.19.10.2, 2006/11/08 00:17:14 |
|
|
|
/* $OpenBSD$ */ |
/* |
/* |
* Copyright (c) 2000 Markus Friedl. All rights reserved. |
* Copyright (c) 2000 Markus Friedl. All rights reserved. |
* |
* |
|
|
* 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> |
RCSID("$OpenBSD$"); |
|
|
|
#include <openssl/bn.h> |
#include <openssl/bn.h> |
#include <openssl/evp.h> |
#include <openssl/evp.h> |
|
|
|
#include <string.h> |
|
|
#include "xmalloc.h" |
#include "xmalloc.h" |
#include "buffer.h" |
#include "buffer.h" |
#include "bufaux.h" |
|
#include "compat.h" |
#include "compat.h" |
#include "log.h" |
#include "log.h" |
#include "key.h" |
#include "key.h" |
|
|
fatal("ssh_dss_verify: BN_new failed"); |
fatal("ssh_dss_verify: BN_new failed"); |
if ((sig->s = BN_new()) == NULL) |
if ((sig->s = BN_new()) == NULL) |
fatal("ssh_dss_verify: BN_new failed"); |
fatal("ssh_dss_verify: BN_new failed"); |
BN_bin2bn(sigblob, INTBLOB_LEN, sig->r); |
if ((BN_bin2bn(sigblob, INTBLOB_LEN, sig->r) == NULL) || |
BN_bin2bn(sigblob+ INTBLOB_LEN, INTBLOB_LEN, sig->s); |
(BN_bin2bn(sigblob+ INTBLOB_LEN, INTBLOB_LEN, sig->s) == NULL)) |
|
fatal("ssh_dss_verify: BN_bin2bn failed"); |
|
|
/* clean up */ |
/* clean up */ |
memset(sigblob, 0, len); |
memset(sigblob, 0, len); |