summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dh/dh_depr.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/dh/dh_depr.c (renamed from src/lib/libssl/src/crypto/ec/ec2_smpt.c)43
1 files changed, 26 insertions, 17 deletions
diff --git a/src/lib/libssl/src/crypto/ec/ec2_smpt.c b/src/lib/libcrypto/dh/dh_depr.c
index 59d52bf663..acc05f252c 100644
--- a/src/lib/libssl/src/crypto/ec/ec2_smpt.c
+++ b/src/lib/libcrypto/dh/dh_depr.c
@@ -1,7 +1,4 @@
1/* crypto/ec/ec2_smpt.c */ 1/* crypto/dh/dh_depr.c */
2/* This code was originally written by Douglas Stebila
3 * <dstebila@student.math.uwaterloo.ca> for the OpenSSL project.
4 */
5/* ==================================================================== 2/* ====================================================================
6 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
7 * 4 *
@@ -57,18 +54,30 @@
57 */ 54 */
58 55
59 56
60/* Calaculates and sets the affine coordinates of an EC_POINT from the given 57/* This file contains deprecated functions as wrappers to the new ones */
61 * compressed coordinates. Uses algorithm 2.3.4 of SEC 1. 58
62 * Note that the simple implementation only uses affine coordinates. 59#include <stdio.h>
63 * 60#include "cryptlib.h"
64 * This algorithm is patented by Certicom Corp. under US Patent 6,141,420 61#include <openssl/bn.h>
65 * (for licensing information, contact licensing@certicom.com). 62#include <openssl/dh.h>
66 * This function is disabled by default and can be enabled by defining the 63
67 * preprocessor macro OPENSSL_EC_BIN_PT_COMP at Configure-time. 64static void *dummy=&dummy;
68 */ 65
69int ec_GF2m_simple_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *point, 66#ifndef OPENSSL_NO_DEPRECATED
70 const BIGNUM *x_, int y_bit, BN_CTX *ctx) 67DH *DH_generate_parameters(int prime_len, int generator,
68 void (*callback)(int,int,void *), void *cb_arg)
71 { 69 {
72 ECerr(EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES, ERR_R_DISABLED); 70 BN_GENCB cb;
73 return 0; 71 DH *ret=NULL;
72
73 if((ret=DH_new()) == NULL)
74 return NULL;
75
76 BN_GENCB_set_old(&cb, callback, cb_arg);
77
78 if(DH_generate_parameters_ex(ret, prime_len, generator, &cb))
79 return ret;
80 DH_free(ret);
81 return NULL;
74 } 82 }
83#endif