Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
mbedtls
Commits
40e46940
Commit
40e46940
authored
Jan 03, 2009
by
Paul Bakker
Browse files
- First replacement of xyssl by polarssl where needed
parent
8e831edc
Changes
70
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
153 additions
and
153 deletions
+153
-153
XySSL.png
XySSL.png
+0
-0
include/polarssl/aes.h
include/polarssl/aes.h
+2
-2
include/polarssl/arc4.h
include/polarssl/arc4.h
+2
-2
include/polarssl/base64.h
include/polarssl/base64.h
+7
-7
include/polarssl/bignum.h
include/polarssl/bignum.h
+26
-26
include/polarssl/bn_mul.h
include/polarssl/bn_mul.h
+7
-7
include/polarssl/certs.h
include/polarssl/certs.h
+2
-2
include/polarssl/config.h
include/polarssl/config.h
+35
-35
include/polarssl/debug.h
include/polarssl/debug.h
+1
-1
include/polarssl/des.h
include/polarssl/des.h
+2
-2
include/polarssl/dhm.h
include/polarssl/dhm.h
+13
-13
include/polarssl/havege.h
include/polarssl/havege.h
+2
-2
include/polarssl/md2.h
include/polarssl/md2.h
+2
-2
include/polarssl/md4.h
include/polarssl/md4.h
+2
-2
include/polarssl/md5.h
include/polarssl/md5.h
+2
-2
include/polarssl/net.h
include/polarssl/net.h
+22
-22
include/polarssl/openssl.h
include/polarssl/openssl.h
+2
-2
include/polarssl/padlock.h
include/polarssl/padlock.h
+4
-4
include/polarssl/rsa.h
include/polarssl/rsa.h
+18
-18
include/polarssl/sha1.h
include/polarssl/sha1.h
+2
-2
No files found.
XySSL.png
deleted
100644 → 0
View file @
8e831edc
27.1 KB
include/polarssl/aes.h
View file @
40e46940
/**
* \file aes.h
*/
#ifndef
XY
SSL_AES_H
#define
XY
SSL_AES_H
#ifndef
POLAR
SSL_AES_H
#define
POLAR
SSL_AES_H
#define AES_ENCRYPT 1
#define AES_DECRYPT 0
...
...
include/polarssl/arc4.h
View file @
40e46940
/**
* \file arc4.h
*/
#ifndef
XY
SSL_ARC4_H
#define
XY
SSL_ARC4_H
#ifndef
POLAR
SSL_ARC4_H
#define
POLAR
SSL_ARC4_H
/**
* \brief ARC4 context structure
...
...
include/polarssl/base64.h
View file @
40e46940
/**
* \file base64.h
*/
#ifndef
XY
SSL_BASE64_H
#define
XY
SSL_BASE64_H
#ifndef
POLAR
SSL_BASE64_H
#define
POLAR
SSL_BASE64_H
#define
XY
SSL_ERR_BASE64_BUFFER_TOO_SMALL -0x0010
#define
XY
SSL_ERR_BASE64_INVALID_CHARACTER -0x0012
#define
POLAR
SSL_ERR_BASE64_BUFFER_TOO_SMALL -0x0010
#define
POLAR
SSL_ERR_BASE64_INVALID_CHARACTER -0x0012
#ifdef __cplusplus
extern
"C"
{
...
...
@@ -19,7 +19,7 @@ extern "C" {
* \param src source buffer
* \param slen amount of data to be encoded
*
* \return 0 if successful, or
XY
SSL_ERR_BASE64_BUFFER_TOO_SMALL.
* \return 0 if successful, or
POLAR
SSL_ERR_BASE64_BUFFER_TOO_SMALL.
* *dlen is always updated to reflect the amount
* of data that has (or would have) been written.
*
...
...
@@ -37,8 +37,8 @@ int base64_encode( unsigned char *dst, int *dlen,
* \param src source buffer
* \param slen amount of data to be decoded
*
* \return 0 if successful,
XY
SSL_ERR_BASE64_BUFFER_TOO_SMALL, or
*
XY
SSL_ERR_BASE64_INVALID_DATA if the input data is not
* \return 0 if successful,
POLAR
SSL_ERR_BASE64_BUFFER_TOO_SMALL, or
*
POLAR
SSL_ERR_BASE64_INVALID_DATA if the input data is not
* correct. *dlen is always updated to reflect the amount
* of data that has (or would have) been written.
*
...
...
include/polarssl/bignum.h
View file @
40e46940
/**
* \file bignum.h
*/
#ifndef
XY
SSL_BIGNUM_H
#define
XY
SSL_BIGNUM_H
#ifndef
POLAR
SSL_BIGNUM_H
#define
POLAR
SSL_BIGNUM_H
#include <stdio.h>
#define
XY
SSL_ERR_MPI_FILE_IO_ERROR -0x0002
#define
XY
SSL_ERR_MPI_BAD_INPUT_DATA -0x0004
#define
XY
SSL_ERR_MPI_INVALID_CHARACTER -0x0006
#define
XY
SSL_ERR_MPI_BUFFER_TOO_SMALL -0x0008
#define
XY
SSL_ERR_MPI_NEGATIVE_VALUE -0x000A
#define
XY
SSL_ERR_MPI_DIVISION_BY_ZERO -0x000C
#define
XY
SSL_ERR_MPI_NOT_ACCEPTABLE -0x000E
#define
POLAR
SSL_ERR_MPI_FILE_IO_ERROR -0x0002
#define
POLAR
SSL_ERR_MPI_BAD_INPUT_DATA -0x0004
#define
POLAR
SSL_ERR_MPI_INVALID_CHARACTER -0x0006
#define
POLAR
SSL_ERR_MPI_BUFFER_TOO_SMALL -0x0008
#define
POLAR
SSL_ERR_MPI_NEGATIVE_VALUE -0x000A
#define
POLAR
SSL_ERR_MPI_DIVISION_BY_ZERO -0x000C
#define
POLAR
SSL_ERR_MPI_NOT_ACCEPTABLE -0x000E
#define MPI_CHK(f) if( ( ret = f ) != 0 ) goto cleanup
/*
* Define the base integer type, architecture-wise
*/
#if defined(
XY
SSL_HAVE_INT8)
#if defined(
POLAR
SSL_HAVE_INT8)
typedef
unsigned
char
t_int
;
typedef
unsigned
short
t_dbl
;
#else
#if defined(
XY
SSL_HAVE_INT16)
#if defined(
POLAR
SSL_HAVE_INT16)
typedef
unsigned
short
t_int
;
typedef
unsigned
long
t_dbl
;
#else
...
...
@@ -118,7 +118,7 @@ int mpi_size( mpi *X );
* \param radix input numeric base
* \param s null-terminated string buffer
*
* \return 0 if successful, or an
XY
SSL_ERR_MPI_XXX error code
* \return 0 if successful, or an
POLAR
SSL_ERR_MPI_XXX error code
*/
int
mpi_read_string
(
mpi
*
X
,
int
radix
,
char
*
s
);
...
...
@@ -130,7 +130,7 @@ int mpi_read_string( mpi *X, int radix, char *s );
* \param s string buffer
* \param slen string buffer size
*
* \return 0 if successful, or an
XY
SSL_ERR_MPI_XXX error code
* \return 0 if successful, or an
POLAR
SSL_ERR_MPI_XXX error code
*
* \note Call this function with *slen = 0 to obtain the
* minimum required buffer size in *slen.
...
...
@@ -144,7 +144,7 @@ int mpi_write_string( mpi *X, int radix, char *s, int *slen );
* \param radix input numeric base
* \param fin input file handle
*
* \return 0 if successful, or an
XY
SSL_ERR_MPI_XXX error code
* \return 0 if successful, or an
POLAR
SSL_ERR_MPI_XXX error code
*/
int
mpi_read_file
(
mpi
*
X
,
int
radix
,
FILE
*
fin
);
...
...
@@ -156,7 +156,7 @@ int mpi_read_file( mpi *X, int radix, FILE *fin );
* \param radix output numeric base
* \param fout output file handle
*
* \return 0 if successful, or an
XY
SSL_ERR_MPI_XXX error code
* \return 0 if successful, or an
POLAR
SSL_ERR_MPI_XXX error code
*
* \note Set fout == NULL to print X on the console.
*/
...
...
@@ -182,7 +182,7 @@ int mpi_read_binary( mpi *X, unsigned char *buf, int buflen );
* \param buflen output buffer size
*
* \return 0 if successful,
*
XY
SSL_ERR_MPI_BUFFER_TOO_SMALL if buf isn't large enough
*
POLAR
SSL_ERR_MPI_BUFFER_TOO_SMALL if buf isn't large enough
*
* \note Call this function with *buflen = 0 to obtain the
* minimum required buffer size in *buflen.
...
...
@@ -244,7 +244,7 @@ int mpi_add_abs( mpi *X, mpi *A, mpi *B );
* \brief Unsigned substraction: X = |A| - |B|
*
* \return 0 if successful,
*
XY
SSL_ERR_MPI_NEGATIVE_VALUE if B is greater than A
*
POLAR
SSL_ERR_MPI_NEGATIVE_VALUE if B is greater than A
*/
int
mpi_sub_abs
(
mpi
*
X
,
mpi
*
A
,
mpi
*
B
);
...
...
@@ -301,7 +301,7 @@ int mpi_mul_int( mpi *X, mpi *A, t_int b );
*
* \return 0 if successful,
* 1 if memory allocation failed,
*
XY
SSL_ERR_MPI_DIVISION_BY_ZERO if B == 0
*
POLAR
SSL_ERR_MPI_DIVISION_BY_ZERO if B == 0
*
* \note Either Q or R can be NULL.
*/
...
...
@@ -312,7 +312,7 @@ int mpi_div_mpi( mpi *Q, mpi *R, mpi *A, mpi *B );
*
* \return 0 if successful,
* 1 if memory allocation failed,
*
XY
SSL_ERR_MPI_DIVISION_BY_ZERO if b == 0
*
POLAR
SSL_ERR_MPI_DIVISION_BY_ZERO if b == 0
*
* \note Either Q or R can be NULL.
*/
...
...
@@ -323,7 +323,7 @@ int mpi_div_int( mpi *Q, mpi *R, mpi *A, int b );
*
* \return 0 if successful,
* 1 if memory allocation failed,
*
XY
SSL_ERR_MPI_DIVISION_BY_ZERO if B == 0
*
POLAR
SSL_ERR_MPI_DIVISION_BY_ZERO if B == 0
*/
int
mpi_mod_mpi
(
mpi
*
R
,
mpi
*
A
,
mpi
*
B
);
...
...
@@ -332,7 +332,7 @@ int mpi_mod_mpi( mpi *R, mpi *A, mpi *B );
*
* \return 0 if successful,
* 1 if memory allocation failed,
*
XY
SSL_ERR_MPI_DIVISION_BY_ZERO if b == 0
*
POLAR
SSL_ERR_MPI_DIVISION_BY_ZERO if b == 0
*/
int
mpi_mod_int
(
t_int
*
r
,
mpi
*
A
,
int
b
);
...
...
@@ -341,7 +341,7 @@ int mpi_mod_int( t_int *r, mpi *A, int b );
*
* \return 0 if successful,
* 1 if memory allocation failed,
*
XY
SSL_ERR_MPI_BAD_INPUT_DATA if N is negative or even
*
POLAR
SSL_ERR_MPI_BAD_INPUT_DATA if N is negative or even
*
* \note _RR is used to avoid re-computing R*R mod N across
* multiple calls, which speeds up things a bit. It can
...
...
@@ -362,8 +362,8 @@ int mpi_gcd( mpi *G, mpi *A, mpi *B );
*
* \return 0 if successful,
* 1 if memory allocation failed,
*
XY
SSL_ERR_MPI_BAD_INPUT_DATA if N is negative or nil
*
XY
SSL_ERR_MPI_NOT_ACCEPTABLE if A has no inverse mod N
*
POLAR
SSL_ERR_MPI_BAD_INPUT_DATA if N is negative or nil
*
POLAR
SSL_ERR_MPI_NOT_ACCEPTABLE if A has no inverse mod N
*/
int
mpi_inv_mod
(
mpi
*
X
,
mpi
*
A
,
mpi
*
N
);
...
...
@@ -372,7 +372,7 @@ int mpi_inv_mod( mpi *X, mpi *A, mpi *N );
*
* \return 0 if successful (probably prime),
* 1 if memory allocation failed,
*
XY
SSL_ERR_MPI_NOT_ACCEPTABLE if X is not prime
*
POLAR
SSL_ERR_MPI_NOT_ACCEPTABLE if X is not prime
*/
int
mpi_is_prime
(
mpi
*
X
,
int
(
*
f_rng
)(
void
*
),
void
*
p_rng
);
...
...
@@ -387,7 +387,7 @@ int mpi_is_prime( mpi *X, int (*f_rng)(void *), void *p_rng );
*
* \return 0 if successful (probably prime),
* 1 if memory allocation failed,
*
XY
SSL_ERR_MPI_BAD_INPUT_DATA if nbits is < 3
*
POLAR
SSL_ERR_MPI_BAD_INPUT_DATA if nbits is < 3
*/
int
mpi_gen_prime
(
mpi
*
X
,
int
nbits
,
int
dh_flag
,
int
(
*
f_rng
)(
void
*
),
void
*
p_rng
);
...
...
include/polarssl/bn_mul.h
View file @
40e46940
...
...
@@ -15,12 +15,12 @@
* . Alpha . MIPS32
* . C, longlong . C, generic
*/
#ifndef
XY
SSL_BN_MUL_H
#define
XY
SSL_BN_MUL_H
#ifndef
POLAR
SSL_BN_MUL_H
#define
POLAR
SSL_BN_MUL_H
#include "polarssl/config.h"
#if defined(
XY
SSL_HAVE_ASM)
#if defined(
POLAR
SSL_HAVE_ASM)
#if defined(__GNUC__)
#if defined(__i386__)
...
...
@@ -42,7 +42,7 @@
asm( "movl %edx, %ecx " ); \
asm( "stosl " );
#if defined(
XY
SSL_HAVE_SSE2)
#if defined(
POLAR
SSL_HAVE_SSE2)
#define MULADDC_HUIT \
asm( "movd %ecx, %mm1 " ); \
...
...
@@ -565,7 +565,7 @@
__asm mov ecx, edx \
__asm stosd
#if defined(
XY
SSL_HAVE_SSE2)
#if defined(
POLAR
SSL_HAVE_SSE2)
#define EMIT __asm _emit
...
...
@@ -648,10 +648,10 @@
#endif
/* SSE2 */
#endif
/* MSVC */
#endif
/*
XY
SSL_HAVE_ASM */
#endif
/*
POLAR
SSL_HAVE_ASM */
#if !defined(MULADDC_CORE)
#if defined(
XY
SSL_HAVE_LONGLONG)
#if defined(
POLAR
SSL_HAVE_LONGLONG)
#define MULADDC_INIT \
{ \
...
...
include/polarssl/certs.h
View file @
40e46940
/**
* \file certs.h
*/
#ifndef
XY
SSL_CERTS_H
#define
XY
SSL_CERTS_H
#ifndef
POLAR
SSL_CERTS_H
#define
POLAR
SSL_CERTS_H
#ifdef __cplusplus
extern
"C"
{
...
...
include/polarssl/config.h
View file @
40e46940
...
...
@@ -5,8 +5,8 @@
* or disable features selectively, and reduce the global
* memory footprint.
*/
#ifndef
XY
SSL_CONFIG_H
#define
XY
SSL_CONFIG_H
#ifndef
POLAR
SSL_CONFIG_H
#define
POLAR
SSL_CONFIG_H
#ifndef _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_NO_DEPRECATE 1
...
...
@@ -15,51 +15,51 @@
/*
* Uncomment if native integers are 8-bit wide.
*
#define
XY
SSL_HAVE_INT8
#define
POLAR
SSL_HAVE_INT8
*/
/*
* Uncomment if native integers are 16-bit wide.
*
#define
XY
SSL_HAVE_INT16
#define
POLAR
SSL_HAVE_INT16
*/
/*
* Uncomment if the compiler supports long long.
*
#define
XY
SSL_HAVE_LONGLONG
#define
POLAR
SSL_HAVE_LONGLONG
*/
/*
* Uncomment to enable the use of assembly code.
*/
#define
XY
SSL_HAVE_ASM
#define
POLAR
SSL_HAVE_ASM
/*
* Uncomment if the CPU supports SSE2 (IA-32 specific).
*
#define
XY
SSL_HAVE_SSE2
#define
POLAR
SSL_HAVE_SSE2
*/
/*
* Enable all SSL/TLS debugging messages.
*/
#define
XY
SSL_DEBUG_MSG
#define
POLAR
SSL_DEBUG_MSG
/*
* Enable the checkup functions (*_self_test).
*/
#define
XY
SSL_SELF_TEST
#define
POLAR
SSL_SELF_TEST
/*
* Enable the prime-number generation code.
*/
#define
XY
SSL_GENPRIME
#define
POLAR
SSL_GENPRIME
/*
* Uncomment this macro to store the AES tables in ROM.
*
#define
XY
SSL_AES_ROM_TABLES
#define
POLAR
SSL_AES_ROM_TABLES
*/
/*
...
...
@@ -71,7 +71,7 @@
* SSL_RSA_AES_256_SHA
* SSL_EDH_RSA_AES_256_SHA
*/
#define
XY
SSL_AES_C
#define
POLAR
SSL_AES_C
/*
* Module: library/arc4.c
...
...
@@ -81,7 +81,7 @@
* SSL_RSA_RC4_128_MD5
* SSL_RSA_RC4_128_SHA
*/
#define
XY
SSL_ARC4_C
#define
POLAR
SSL_ARC4_C
/*
* Module: library/base64.c
...
...
@@ -89,7 +89,7 @@
*
* This module is required for X.509 support.
*/
#define
XY
SSL_BASE64_C
#define
POLAR
SSL_BASE64_C
/*
* Module: library/bignum.c
...
...
@@ -100,7 +100,7 @@
*
* This module is required for RSA and DHM support.
*/
#define
XY
SSL_BIGNUM_C
#define
POLAR
SSL_BIGNUM_C
/*
* Module: library/certs.c
...
...
@@ -108,7 +108,7 @@
*
* This module is used for testing (ssl_client/server).
*/
#define
XY
SSL_CERTS_C
#define
POLAR
SSL_CERTS_C
/*
* Module: library/debug.c
...
...
@@ -118,7 +118,7 @@
*
* This module provides debugging functions.
*/
#define
XY
SSL_DEBUG_C
#define
POLAR
SSL_DEBUG_C
/*
* Module: library/des.c
...
...
@@ -128,7 +128,7 @@
* SSL_RSA_DES_168_SHA
* SSL_EDH_RSA_DES_168_SHA
*/
#define
XY
SSL_DES_C
#define
POLAR
SSL_DES_C
/*
* Module: library/dhm.c
...
...
@@ -139,7 +139,7 @@
* SSL_EDH_RSA_DES_168_SHA
* SSL_EDH_RSA_AES_256_SHA
*/
#define
XY
SSL_DHM_C
#define
POLAR
SSL_DHM_C
/*
* Module: library/havege.c
...
...
@@ -147,7 +147,7 @@
*
* This module enables the HAVEGE random number generator.
*/
#define
XY
SSL_HAVEGE_C
#define
POLAR
SSL_HAVEGE_C
/*
* Module: library/md2.c
...
...
@@ -155,7 +155,7 @@
*
* Uncomment to enable support for (rare) MD2-signed X.509 certs.
*
#define
XY
SSL_MD2_C
#define
POLAR
SSL_MD2_C
*/
/*
...
...
@@ -164,7 +164,7 @@
*
* Uncomment to enable support for (rare) MD4-signed X.509 certs.
*
#define
XY
SSL_MD4_C
#define
POLAR
SSL_MD4_C
*/
/*
...
...
@@ -174,7 +174,7 @@
*
* This module is required for SSL/TLS and X.509.
*/
#define
XY
SSL_MD5_C
#define
POLAR
SSL_MD5_C
/*
* Module: library/net.c
...
...
@@ -182,7 +182,7 @@
*
* This module provides TCP/IP networking routines.
*/
#define
XY
SSL_NET_C
#define
POLAR
SSL_NET_C
/*
* Module: library/padlock.c
...
...
@@ -190,7 +190,7 @@
*
* This modules adds support for the VIA PadLock on x86.
*/
#define
XY
SSL_PADLOCK_C
#define
POLAR
SSL_PADLOCK_C
/*
* Module: library/rsa.c
...
...
@@ -201,7 +201,7 @@
*
* This module is required for SSL/TLS and MD5-signed certificates.
*/
#define
XY
SSL_RSA_C
#define
POLAR
SSL_RSA_C
/*
* Module: library/sha1.c
...
...
@@ -212,7 +212,7 @@
*
* This module is required for SSL/TLS and SHA1-signed certificates.
*/
#define
XY
SSL_SHA1_C
#define
POLAR
SSL_SHA1_C
/*
* Module: library/sha2.c
...
...
@@ -220,7 +220,7 @@
*
* This module adds support for SHA-224 and SHA-256.
*/
#define
XY
SSL_SHA2_C
#define
POLAR
SSL_SHA2_C
/*
* Module: library/sha4.c
...
...
@@ -228,7 +228,7 @@
*
* This module adds support for SHA-384 and SHA-512.
*/
#define
XY
SSL_SHA4_C
#define
POLAR
SSL_SHA4_C
/*
* Module: library/ssl_cli.c
...
...
@@ -236,7 +236,7 @@
*
* This module is required for SSL/TLS client support.
*/
#define
XY
SSL_SSL_CLI_C
#define
POLAR
SSL_SSL_CLI_C
/*
* Module: library/ssl_srv.c
...
...
@@ -244,7 +244,7 @@
*
* This module is required for SSL/TLS server support.
*/
#define
XY
SSL_SSL_SRV_C
#define
POLAR
SSL_SSL_SRV_C
/*
* Module: library/ssl_tls.c
...
...
@@ -253,7 +253,7 @@
*
* This module is required for SSL/TLS.
*/
#define
XY
SSL_SSL_TLS_C
#define
POLAR
SSL_SSL_TLS_C
/*
* Module: library/timing.c
...
...
@@ -261,7 +261,7 @@
*
* This module is used by the HAVEGE random number generator.
*/
#define
XY
SSL_TIMING_C
#define
POLAR
SSL_TIMING_C
/*
* Module: library/x509parse.c
...
...
@@ -271,7 +271,7 @@
*
* This module is required for X.509 certificate parsing.
*/
#define
XY
SSL_X509_PARSE_C
#define
POLAR
SSL_X509_PARSE_C
/*
* Module: library/x509_write.c
...
...
@@ -279,6 +279,6 @@
*
* This module is required for X.509 certificate writing.
*/
#define
XY
SSL_X509_WRITE_C
#define
POLAR
SSL_X509_WRITE_C
#endif
/* config.h */
include/polarssl/debug.h
View file @
40e46940
...
...
@@ -7,7 +7,7 @@
#include "polarssl/config.h"
#include "polarssl/ssl.h"
#if defined(
XY
SSL_DEBUG_MSG)
#if defined(
POLAR
SSL_DEBUG_MSG)
#define SSL_DEBUG_MSG( level, args ) \
debug_print_msg( ssl, level, __FILE__, __LINE__, debug_fmt args );
...
...
include/polarssl/des.h
View file @
40e46940
/**
* \file des.h
*/
#ifndef
XY
SSL_DES_H
#define
XY
SSL_DES_H
#ifndef
POLAR
SSL_DES_H
#define
POLAR
SSL_DES_H
#define DES_ENCRYPT 1
#define DES_DECRYPT 0
...
...
include/polarssl/dhm.h
View file @
40e46940
/**
* \file dhm.h
*/
#ifndef
XY
SSL_DHM_H
#define
XY
SSL_DHM_H
#ifndef
POLAR
SSL_DHM_H
#define
POLAR
SSL_DHM_H
#include "polarssl/bignum.h"
#define
XY
SSL_ERR_DHM_BAD_INPUT_DATA -0x0480
#define
XY
SSL_ERR_DHM_READ_PARAMS_FAILED -0x0490
#define
XY
SSL_ERR_DHM_MAKE_PARAMS_FAILED -0x04A0
#define
XY
SSL_ERR_DHM_READ_PUBLIC_FAILED -0x04B0
#define
XY
SSL_ERR_DHM_MAKE_PUBLIC_FAILED -0x04C0
#define
XY
SSL_ERR_DHM_CALC_SECRET_FAILED -0x04D0
#define
POLAR
SSL_ERR_DHM_BAD_INPUT_DATA -0x0480
#define
POLAR
SSL_ERR_DHM_READ_PARAMS_FAILED -0x0490
#define
POLAR
SSL_ERR_DHM_MAKE_PARAMS_FAILED -0x04A0
#define
POLAR
SSL_ERR_DHM_READ_PUBLIC_FAILED -0x04B0
#define
POLAR
SSL_ERR_DHM_MAKE_PUBLIC_FAILED -0x04C0
#define
POLAR
SSL_ERR_DHM_CALC_SECRET_FAILED -0x04D0
typedef
struct
{
...
...
@@ -37,7 +37,7 @@ extern "C" {
* \param p &(start of input buffer)
* \param end end of buffer
*
* \return 0 if successful, or an
XY
SSL_ERR_DHM_XXX error code
* \return 0 if successful, or an
POLAR
SSL_ERR_DHM_XXX error code
*/
int
dhm_read_params
(
dhm_context
*
ctx
,
unsigned
char
**
p
,
...
...
@@ -57,7 +57,7 @@ int dhm_read_params( dhm_context *ctx,
* have already been properly set (for example
* using mpi_read_string or mpi_read_binary).
*
* \return 0 if successful, or an
XY
SSL_ERR_DHM_XXX error code
* \return 0 if successful, or an
POLAR
SSL_ERR_DHM_XXX error code
*/
int
dhm_make_params
(
dhm_context
*
ctx
,
int
s_size
,
unsigned
char
*
output
,
int
*
olen
,
...
...
@@ -70,7 +70,7 @@ int dhm_make_params( dhm_context *ctx, int s_size,
* \param input input buffer
* \param ilen size of buffer
*
* \return 0 if successful, or an
XY
SSL_ERR_DHM_XXX error code
* \return 0 if successful, or an
POLAR
SSL_ERR_DHM_XXX error code
*/
int
dhm_read_public
(
dhm_context
*
ctx
,
unsigned
char
*
input
,
int
ilen
);
...
...
@@ -85,7 +85,7 @@ int dhm_read_public( dhm_context *ctx,
* \param f_rng RNG function
* \param p_rng RNG parameter
*
* \return 0 if successful, or an
XY
SSL_ERR_DHM_XXX error code
* \return 0 if successful, or an
POLAR
SSL_ERR_DHM_XXX error code
*/
int
dhm_make_public
(
dhm_context
*
ctx
,
int
s_size
,
unsigned
char
*
output
,
int
olen
,
...
...
@@ -98,7 +98,7 @@ int dhm_make_public( dhm_context *ctx, int s_size,
* \param output destination buffer
* \param olen number of chars written
*
* \return 0 if successful, or an
XY
SSL_ERR_DHM_XXX error code
* \return 0 if successful, or an
POLAR
SSL_ERR_DHM_XXX error code
*/
int
dhm_calc_secret
(
dhm_context
*
ctx
,
unsigned
char
*
output
,
int
*
olen
);
...
...
include/polarssl/havege.h