| matrixCommon.h | | matrixCommon.h | |
| /* | | /* | |
| * matrixCommon.h | | * matrixCommon.h | |
|
| * Release $Name: MATRIXSSL_1_8_5_OPEN $ | | * Release $Name: MATRIXSSL_1_8_6_OPEN $ | |
| * | | * | |
| * Public common header file | | * Public common header file | |
| */ | | */ | |
| /* | | /* | |
| * Copyright (c) PeerSec Networks, 2002-2008. All Rights Reserved. | | * Copyright (c) PeerSec Networks, 2002-2008. All Rights Reserved. | |
| * The latest version of this code is available at http://www.matrixssl
.org | | * The latest version of this code is available at http://www.matrixssl
.org | |
| * | | * | |
| * This software is open source; you can redistribute it and/or modify | | * This software is open source; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| | | | |
| skipping to change at line 148 | | skipping to change at line 148 | |
| unsigned char *start; /* Pointer to start of valid data */ | | unsigned char *start; /* Pointer to start of valid data */ | |
| unsigned char *end; /* Pointer to first byte of invalid data */ | | unsigned char *end; /* Pointer to first byte of invalid data */ | |
| int32 size; /* Size of buffer in bytes */ | | int32 size; /* Size of buffer in bytes */ | |
| } sslBuf_t; | | } sslBuf_t; | |
| | | | |
| /**************************************************************************
****/ | | /**************************************************************************
****/ | |
| /* | | /* | |
| Information provided to user callback for validating certificates. | | Information provided to user callback for validating certificates. | |
| Register callback with call to matrixSslSetCertValidator | | Register callback with call to matrixSslSetCertValidator | |
| */ | | */ | |
|
| | | | |
| typedef struct { | | typedef struct { | |
| char *country; | | char *country; | |
| char *state; | | char *state; | |
| char *locality; | | char *locality; | |
| char *organization; | | char *organization; | |
| char *orgUnit; | | char *orgUnit; | |
| char *commonName; | | char *commonName; | |
| } sslDistinguishedName_t; | | } sslDistinguishedName_t; | |
| | | | |
|
| typedef struct { | | typedef struct sslSubjectAltNameEntry { | |
| char *dns; | | int32 id; | |
| char *uri; | | unsigned char name[16]; | |
| char *email; | | unsigned char *data; | |
| | | int32 dataLen; | |
| | | struct sslSubjectAltNameEntry *next; | |
| } sslSubjectAltName_t; | | } sslSubjectAltName_t; | |
| | | | |
| typedef struct sslCertInfo { | | typedef struct sslCertInfo { | |
| int32 verified; | | int32 verified; | |
| unsigned char *serialNumber; | | unsigned char *serialNumber; | |
| int32 serialNumberLen; | | int32 serialNumberLen; | |
| char *notBefore; | | char *notBefore; | |
| char *notAfter; | | char *notAfter; | |
| char *sigHash; | | char *sigHash; | |
| int32 sigHashLen; | | int32 sigHashLen; | |
|
| sslSubjectAltName_t subjectAltName; | | sslSubjectAltName_t *subjectAltName; | |
| sslDistinguishedName_t subject; | | sslDistinguishedName_t subject; | |
| sslDistinguishedName_t issuer; | | sslDistinguishedName_t issuer; | |
| struct sslCertInfo *next; | | struct sslCertInfo *next; | |
| } sslCertInfo_t; | | } sslCertInfo_t; | |
| | | | |
| /**************************************************************************
****/ | | /**************************************************************************
****/ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
End of changes. 4 change blocks. |
| 7 lines changed or deleted | | 8 lines changed or added | |
|
| matrixCrypto.h | | matrixCrypto.h | |
| /* | | /* | |
| * matrixCrypto.h | | * matrixCrypto.h | |
|
| * Release $Name: MATRIXSSL_1_8_5_OPEN $ | | * Release $Name: MATRIXSSL_1_8_6_OPEN $ | |
| * | | * | |
| * Public API set for matrixCrypto | | * Public API set for matrixCrypto | |
| */ | | */ | |
| /* | | /* | |
| * Copyright (c) PeerSec Networks, 2002-2008. All Rights Reserved. | | * Copyright (c) PeerSec Networks, 2002-2008. All Rights Reserved. | |
| * The latest version of this code is available at http://www.matrixssl
.org | | * The latest version of this code is available at http://www.matrixssl
.org | |
| * | | * | |
| * This software is open source; you can redistribute it and/or modify | | * This software is open source; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| | | | |
| skipping to change at line 99 | | skipping to change at line 99 | |
| MATRIXPUBLIC void matrixHmacSha1Update(sslHmacContext_t *ctx, | | MATRIXPUBLIC void matrixHmacSha1Update(sslHmacContext_t *ctx, | |
| const unsign
ed char *buf, unsigned long len); | | const unsign
ed char *buf, unsigned long len); | |
| MATRIXPUBLIC int32 matrixHmacSha1Final(sslHmacContext_t *ctx, | | MATRIXPUBLIC int32 matrixHmacSha1Final(sslHmacContext_t *ctx, | |
| u
nsigned char *hash); | | u
nsigned char *hash); | |
| | | | |
| MATRIXPUBLIC void matrixSha1Init(sslSha1Context_t *ctx); | | MATRIXPUBLIC void matrixSha1Init(sslSha1Context_t *ctx); | |
| MATRIXPUBLIC void matrixSha1Update(sslSha1Context_t *ctx, | | MATRIXPUBLIC void matrixSha1Update(sslSha1Context_t *ctx, | |
| const unsigned char *buf, un
signed long len); | | const unsigned char *buf, un
signed long len); | |
| MATRIXPUBLIC int32 matrixSha1Final(sslSha1Context_t *ctx, unsigned char *ha
sh); | | MATRIXPUBLIC int32 matrixSha1Final(sslSha1Context_t *ctx, unsigned char *ha
sh); | |
| | | | |
|
| #ifdef USE_SHA256 | | | |
| MATRIXPUBLIC void matrixSha256Init(sslSha256Context_t *ctx); | | | |
| MATRIXPUBLIC void matrixSha256Update(sslSha256Context_t *ctx, | | | |
| const unsigned char *buf, un | | | |
| signed long len); | | | |
| MATRIXPUBLIC int32 matrixSha256Final(sslSha256Context_t *ctx, | | | |
| unsigned cha | | | |
| r *hash); | | | |
| #endif /* USE_SHA256 */ | | | |
| | | | |
| MATRIXPUBLIC void matrixMd5Init(sslMd5Context_t *ctx); | | MATRIXPUBLIC void matrixMd5Init(sslMd5Context_t *ctx); | |
| MATRIXPUBLIC void matrixMd5Update(sslMd5Context_t *ctx, | | MATRIXPUBLIC void matrixMd5Update(sslMd5Context_t *ctx, | |
| const unsigned char
*buf, unsigned long len); | | const unsigned char
*buf, unsigned long len); | |
| MATRIXPUBLIC int32 matrixMd5Final(sslMd5Context_t *ctx, unsigned char *hash
); | | MATRIXPUBLIC int32 matrixMd5Final(sslMd5Context_t *ctx, unsigned char *hash
); | |
| | | | |
| #ifdef USE_MD2 | | #ifdef USE_MD2 | |
| /* | | /* | |
| MD2 is provided for compatibility with V2 and older X509 certificate
s, | | MD2 is provided for compatibility with V2 and older X509 certificate
s, | |
| it is known to have security problems and should not be used for any
current | | it is known to have security problems and should not be used for any
current | |
| development. | | development. | |
| | | | |
End of changes. 2 change blocks. |
| 11 lines changed or deleted | | 1 lines changed or added | |
|
| matrixInternal.h | | matrixInternal.h | |
| /* | | /* | |
| * matrixInternal.h | | * matrixInternal.h | |
|
| * Release $Name: MATRIXSSL_1_8_5_OPEN $ | | * Release $Name: MATRIXSSL_1_8_6_OPEN $ | |
| * | | * | |
| * Internal header file used for the MatrixSSL implementation. | | * Internal header file used for the MatrixSSL implementation. | |
| * Only modifiers of the library should be intersted in this file | | * Only modifiers of the library should be intersted in this file | |
| */ | | */ | |
| /* | | /* | |
| * Copyright (c) PeerSec Networks, 2002-2008. All Rights Reserved. | | * Copyright (c) PeerSec Networks, 2002-2008. All Rights Reserved. | |
| * The latest version of this code is available at http://www.matrixssl
.org | | * The latest version of this code is available at http://www.matrixssl
.org | |
| * | | * | |
| * This software is open source; you can redistribute it and/or modify | | * This software is open source; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| | | | |
| skipping to change at line 273 | | skipping to change at line 273 | |
| | | | |
| int32 flags; | | int32 flags; | |
| int32 hsState; /* Next expected han
dshake message type */ | | int32 hsState; /* Next expected han
dshake message type */ | |
| int32 err; /* SSL errno of last
api call */ | | int32 err; /* SSL errno of last
api call */ | |
| int32 ignoredMessageCount; | | int32 ignoredMessageCount; | |
| | | | |
| unsigned char reqMajVer; | | unsigned char reqMajVer; | |
| unsigned char reqMinVer; | | unsigned char reqMinVer; | |
| unsigned char majVer; | | unsigned char majVer; | |
| unsigned char minVer; | | unsigned char minVer; | |
|
| int32 recordHeadLen; | | int32 recordHeadLen; | |
| int32 hshakeHeadLen; | | int32 hshakeHeadLen; | |
| } ssl_t; | | } ssl_t; | |
| | | | |
| typedef struct { | | typedef struct { | |
| unsigned char id[SSL_MAX_SESSION_ID_SIZE]; | | unsigned char id[SSL_MAX_SESSION_ID_SIZE]; | |
| unsigned char masterSecret[SSL_HS_MASTER_SIZE]; | | unsigned char masterSecret[SSL_HS_MASTER_SIZE]; | |
| uint32 cipherId; | | uint32 cipherId; | |
| } sslSessionId_t; | | } sslSessionId_t; | |
| | | | |
| typedef struct { | | typedef struct { | |
| unsigned char id[SSL_MAX_SESSION_ID_SIZE]; | | unsigned char id[SSL_MAX_SESSION_ID_SIZE]; | |
| | | | |
| skipping to change at line 317 | | skipping to change at line 317 | |
| extern int32 psWriteHandshakeHeader(ssl_t *ssl, unsigned char type, int32 l
en, | | extern int32 psWriteHandshakeHeader(ssl_t *ssl, unsigned char type, int32 l
en, | |
| int32 seq, i
nt32 fragOffset, int32 fragLen, | | int32 seq, i
nt32 fragOffset, int32 fragLen, | |
| unsigned cha
r *c); | | unsigned cha
r *c); | |
| extern int32 sslEncodeResponse(ssl_t *ssl, sslBuf_t *out); | | extern int32 sslEncodeResponse(ssl_t *ssl, sslBuf_t *out); | |
| extern int32 sslActivateReadCipher(ssl_t *ssl); | | extern int32 sslActivateReadCipher(ssl_t *ssl); | |
| extern int32 sslActivateWriteCipher(ssl_t *ssl); | | extern int32 sslActivateWriteCipher(ssl_t *ssl); | |
| extern int32 sslActivatePublicCipher(ssl_t *ssl); | | extern int32 sslActivatePublicCipher(ssl_t *ssl); | |
| extern int32 sslUpdateHSHash(ssl_t *ssl, unsigned char *in, int32 len); | | extern int32 sslUpdateHSHash(ssl_t *ssl, unsigned char *in, int32 len); | |
| extern int32 sslInitHSHash(ssl_t *ssl); | | extern int32 sslInitHSHash(ssl_t *ssl); | |
| extern int32 sslSnapshotHSHash(ssl_t *ssl, unsigned char *out, int32 sender
Flag); | | extern int32 sslSnapshotHSHash(ssl_t *ssl, unsigned char *out, int32 sender
Flag); | |
|
| | | extern int32 sslWritePad(unsigned char *p, unsigned char padLen); | |
| extern void sslResetContext(ssl_t *ssl); | | extern void sslResetContext(ssl_t *ssl); | |
| | | | |
| #ifdef USE_SERVER_SIDE_SSL | | #ifdef USE_SERVER_SIDE_SSL | |
| extern int32 matrixRegisterSession(ssl_t *ssl); | | extern int32 matrixRegisterSession(ssl_t *ssl); | |
| extern int32 matrixResumeSession(ssl_t *ssl); | | extern int32 matrixResumeSession(ssl_t *ssl); | |
| extern int32 matrixClearSession(ssl_t *ssl, int32 remove); | | extern int32 matrixClearSession(ssl_t *ssl, int32 remove); | |
| extern int32 matrixUpdateSession(ssl_t *ssl); | | extern int32 matrixUpdateSession(ssl_t *ssl); | |
| #endif /* USE_SERVER_SIDE_SSL */ | | #endif /* USE_SERVER_SIDE_SSL */ | |
| | | | |
| /* | | /* | |
| | | | |
End of changes. 3 change blocks. |
| 4 lines changed or deleted | | 4 lines changed or added | |
|
| mpi.h | | mpi.h | |
| /* | | /* | |
| * mpi.h | | * mpi.h | |
|
| * Release $Name: MATRIXSSL_1_8_5_OPEN $ | | * Release $Name: MATRIXSSL_1_8_6_OPEN $ | |
| * | | * | |
| * multiple-precision integer library | | * multiple-precision integer library | |
| */ | | */ | |
| /* | | /* | |
| * Copyright (c) PeerSec Networks, 2002-2008. All Rights Reserved. | | * Copyright (c) PeerSec Networks, 2002-2008. All Rights Reserved. | |
| * The latest version of this code is available at http://www.matrixssl
.org | | * The latest version of this code is available at http://www.matrixssl
.org | |
| * | | * | |
| * This software is open source; you can redistribute it and/or modify | | * This software is open source; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| | | | |
| skipping to change at line 339 | | skipping to change at line 339 | |
| | | | |
| /* | | /* | |
| c = a - b | | c = a - b | |
| */ | | */ | |
| extern int32 mp_sub(mp_int *a, mp_int *b, mp_int *c); | | extern int32 mp_sub(mp_int *a, mp_int *b, mp_int *c); | |
| | | | |
| /* | | /* | |
| c = a * b | | c = a * b | |
| b = a*a | | b = a*a | |
| */ | | */ | |
|
| /* STEVE - moved mp_mul out of SLOW case */ | | /* moved mp_mul out of SLOW case */ | |
| extern int32 mp_mul(psPool_t *pool, mp_int *a, mp_int *b, mp_int *c); | | extern int32 mp_mul(psPool_t *pool, mp_int *a, mp_int *b, mp_int *c); | |
| #ifdef USE_SMALL_WORD | | #ifdef USE_SMALL_WORD | |
| extern int32 mp_sqr(psPool_t *pool, mp_int *a, mp_int *b); | | extern int32 mp_sqr(psPool_t *pool, mp_int *a, mp_int *b); | |
| #endif | | #endif | |
| | | | |
| /* | | /* | |
| a/b => cb + d == a | | a/b => cb + d == a | |
| */ | | */ | |
| extern int32 mp_div(psPool_t *pool, mp_int *a, mp_int *b, mp_int *c, mp_int
*d); | | extern int32 mp_div(psPool_t *pool, mp_int *a, mp_int *b, mp_int *c, mp_int
*d); | |
| | | | |
| | | | |
| skipping to change at line 427 | | skipping to change at line 427 | |
| Otherwise, we include the slow versions as well and which version to
use | | Otherwise, we include the slow versions as well and which version to
use | |
| is done at runtime. | | is done at runtime. | |
| */ | | */ | |
| #ifdef USE_SMALL_WORD | | #ifdef USE_SMALL_WORD | |
| extern int32 s_mp_mul_digs(psPool_t *pool, mp_int *a, mp_int *b, mp_int *c, | | extern int32 s_mp_mul_digs(psPool_t *pool, mp_int *a, mp_int *b, mp_int *c, | |
| int32 digs); | | int32 digs); | |
| extern int32 s_mp_sqr(psPool_t *pool, mp_int *a, mp_int *b); | | extern int32 s_mp_sqr(psPool_t *pool, mp_int *a, mp_int *b); | |
| #else | | #else | |
| #define mp_montgomery_reduce fast_mp_montgomery_reduce | | #define mp_montgomery_reduce fast_mp_montgomery_reduce | |
| #define mp_sqr fast_s_mp_sqr | | #define mp_sqr fast_s_mp_sqr | |
|
| #if STEVE | | | |
| #define mp_mul(P, A, B, C) fast_s_mp_mul_digs(P, A, B, C, (A)->used + (B)-> | | | |
| used + 1) | | | |
| #endif | | | |
| #define s_mp_mul_digs fast_s_mp_mul_digs | | #define s_mp_mul_digs fast_s_mp_mul_digs | |
| #define mp_invmod fast_mp_invmod | | #define mp_invmod fast_mp_invmod | |
| #endif | | #endif | |
| | | | |
| /**************************************************************************
****/ | | /**************************************************************************
****/ | |
| /* | | /* | |
| radix conversion | | radix conversion | |
| */ | | */ | |
| extern int32 mp_count_bits(mp_int *a); | | extern int32 mp_count_bits(mp_int *a); | |
| | | | |
| extern int32 mp_unsigned_bin_size(mp_int *a); | | extern int32 mp_unsigned_bin_size(mp_int *a); | |
| extern int32 mp_read_unsigned_bin(mp_int *a, unsigned char *b, int32 c); | | extern int32 mp_read_unsigned_bin(mp_int *a, unsigned char *b, int32 c); | |
| extern int32 mp_to_unsigned_bin(psPool_t *pool, mp_int *a, unsigned char *b
); | | extern int32 mp_to_unsigned_bin(psPool_t *pool, mp_int *a, unsigned char *b
); | |
| | | | |
| extern int32 mp_signed_bin_size(mp_int *a); | | extern int32 mp_signed_bin_size(mp_int *a); | |
| | | | |
| /* | | /* | |
| lowlevel functions, do not call! | | lowlevel functions, do not call! | |
| */ | | */ | |
|
| #if STEVE | | /* define this in all cases for now FUTURE*/ | |
| #ifdef USE_SMALL_WORD | | | |
| #define s_mp_mul(P, A, B, C) s_mp_mul_digs(P, A, B, C, (A)->used + (B)->use | | | |
| d + 1) | | | |
| #else | | | |
| #define s_mp_mul(P, A, B, C) sslAssert(); | | | |
| #endif | | | |
| #endif /* STEVE */ | | | |
| /* define this in all cases for now STEVE */ | | | |
| #define s_mp_mul(P, A, B, C) s_mp_mul_digs(P, A, B, C, (A)->used + (B)->use
d + 1) | | #define s_mp_mul(P, A, B, C) s_mp_mul_digs(P, A, B, C, (A)->used + (B)->use
d + 1) | |
| | | | |
| /* | | /* | |
| b = a*2 | | b = a*2 | |
| */ | | */ | |
| extern int32 mp_mul_2(mp_int *a, mp_int *b); | | extern int32 mp_mul_2(mp_int *a, mp_int *b); | |
| | | | |
| extern int32 s_mp_add(mp_int *a, mp_int *b, mp_int *c); | | extern int32 s_mp_add(mp_int *a, mp_int *b, mp_int *c); | |
| extern int32 s_mp_sub(mp_int *a, mp_int *b, mp_int *c); | | extern int32 s_mp_sub(mp_int *a, mp_int *b, mp_int *c); | |
| | | | |
| | | | |
End of changes. 4 change blocks. |
| 15 lines changed or deleted | | 3 lines changed or added | |
|
| osLayer.h | | osLayer.h | |
| /* | | /* | |
| * osLayer.h | | * osLayer.h | |
|
| * Release $Name: MATRIXSSL_1_8_5_OPEN $ | | * Release $Name: MATRIXSSL_1_8_6_OPEN $ | |
| * | | * | |
| * Layered header for OS specific functions | | * Layered header for OS specific functions | |
| * Contributors adding new OS support must implement all functions | | * Contributors adding new OS support must implement all functions | |
| * externed below. | | * externed below. | |
| */ | | */ | |
| /* | | /* | |
| * Copyright (c) PeerSec Networks, 2002-2008. All Rights Reserved. | | * Copyright (c) PeerSec Networks, 2002-2008. All Rights Reserved. | |
| * The latest version of this code is available at http://www.matrixssl
.org | | * The latest version of this code is available at http://www.matrixssl
.org | |
| * | | * | |
| * This software is open source; you can redistribute it and/or modify | | * This software is open source; you can redistribute it and/or modify | |
| | | | |
| skipping to change at line 177 | | skipping to change at line 177 | |
| | | | |
| If DEBUG is defined matrixStrDebugMsg and matrixIntDebugMsg messages
are | | If DEBUG is defined matrixStrDebugMsg and matrixIntDebugMsg messages
are | |
| output to stdout, sslAsserts go to stderror and call psBreak. | | output to stdout, sslAsserts go to stderror and call psBreak. | |
| | | | |
| In non-DEBUG builds matrixStrDebugMsg and matrixIntDebugMsg are | | In non-DEBUG builds matrixStrDebugMsg and matrixIntDebugMsg are | |
| compiled out. sslAsserts still go to stderr, but psBreak is not cal
led. | | compiled out. sslAsserts still go to stderr, but psBreak is not cal
led. | |
| | | | |
| */ | | */ | |
| | | | |
| #if DEBUG | | #if DEBUG | |
|
| extern void psBreak(); | | extern void psBreak(void); | |
| extern void matrixStrDebugMsg(char *message, char *arg); | | extern void matrixStrDebugMsg(char *message, char *arg); | |
| extern void matrixIntDebugMsg(char *message, int32 arg); | | extern void matrixIntDebugMsg(char *message, int32 arg); | |
| extern void matrixPtrDebugMsg(char *message, void *arg); | | extern void matrixPtrDebugMsg(char *message, void *arg); | |
| #define sslAssert(C) if (C) ; else \ | | #define sslAssert(C) if (C) ; else \ | |
| {fprintf(stderr, "%s:%d sslAssert(%s)\n",__FILE__, __LINE__, #C); ps
Break(); } | | {fprintf(stderr, "%s:%d sslAssert(%s)\n",__FILE__, __LINE__, #C); ps
Break(); } | |
| #else | | #else | |
| #define matrixStrDebugMsg(x, y) | | #define matrixStrDebugMsg(x, y) | |
| #define matrixIntDebugMsg(x, y) | | #define matrixIntDebugMsg(x, y) | |
| #define matrixPtrDebugMsg(x, y) | | #define matrixPtrDebugMsg(x, y) | |
| #define sslAssert(C) if (C) ; else \ | | #define sslAssert(C) if (C) ; else \ | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| pkiInternal.h | | pkiInternal.h | |
| /* | | /* | |
| * pkiInternal.h | | * pkiInternal.h | |
|
| * Release $Name: MATRIXSSL_1_8_5_OPEN $ | | * Release $Name: MATRIXSSL_1_8_6_OPEN $ | |
| * | | * | |
| * Public header file for MatrixSSL PKI extension | | * Public header file for MatrixSSL PKI extension | |
| * Implementations interacting with the PKI portion of the | | * Implementations interacting with the PKI portion of the | |
| * matrixssl library should only use the APIs and definitions | | * matrixssl library should only use the APIs and definitions | |
| * used in this file. | | * used in this file. | |
| */ | | */ | |
| /* | | /* | |
| * Copyright (c) PeerSec Networks, 2002-2008. All Rights Reserved. | | * Copyright (c) PeerSec Networks, 2002-2008. All Rights Reserved. | |
| * The latest version of this code is available at http://www.matrixssl
.org | | * The latest version of this code is available at http://www.matrixssl
.org | |
| * | | * | |
| | | | |
| skipping to change at line 141 | | skipping to change at line 141 | |
| } DNattributes_t; | | } DNattributes_t; | |
| | | | |
| #ifdef USE_X509 | | #ifdef USE_X509 | |
| | | | |
| typedef struct { | | typedef struct { | |
| int32 ca; | | int32 ca; | |
| int32 pathLenConstraint; | | int32 pathLenConstraint; | |
| } extBasicConstraints_t; | | } extBasicConstraints_t; | |
| | | | |
| typedef struct { | | typedef struct { | |
|
| unsigned char *dns; | | int32 len; | |
| unsigned char *uri; | | | |
| unsigned char *email; | | | |
| } extSubjectAltName_t; | | | |
| | | | |
| typedef struct { | | | |
| int32 len; | | | |
| unsigned char *id; | | unsigned char *id; | |
| } extSubjectKeyId_t; | | } extSubjectKeyId_t; | |
| | | | |
| typedef struct { | | typedef struct { | |
| int32 keyLen; | | int32 keyLen; | |
| unsigned char *keyId; | | unsigned char *keyId; | |
| DNattributes_t attribs; | | DNattributes_t attribs; | |
|
| int32 serialNumLen; | | int32 serialNumLen; | |
| unsigned char *serialNum; | | unsigned char *serialNum; | |
| } extAuthKeyId_t; | | } extAuthKeyId_t; | |
| /* | | /* | |
| FUTURE: add support for the other extensions | | FUTURE: add support for the other extensions | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| extBasicConstraints_t bc; | | extBasicConstraints_t bc; | |
|
| extSubjectAltName_t san; | | sslSubjectAltName_t *san; | |
| #ifdef USE_FULL_CERT_PARSE | | #ifdef USE_FULL_CERT_PARSE | |
| extSubjectKeyId_t sk; | | extSubjectKeyId_t sk; | |
| extAuthKeyId_t ak; | | extAuthKeyId_t ak; | |
| unsigned char *keyUsage; | | unsigned char *keyUsage; | |
| int32 keyUsageLen; | | int32 keyUsageLen; | |
| #endif /* USE_FULL_CERT_PARSE */ | | #endif /* USE_FULL_CERT_PARSE */ | |
| } v3extensions_t; | | } v3extensions_t; | |
| | | | |
| typedef struct sslRsaCert { | | typedef struct sslRsaCert { | |
| int32 version; | | int32 version; | |
| | | | |
End of changes. 4 change blocks. |
| 10 lines changed or deleted | | 4 lines changed or added | |
|
| pscrypto.h | | pscrypto.h | |
| /* | | /* | |
| * pscrypto.h | | * pscrypto.h | |
|
| * Release $Name: MATRIXSSL_1_8_5_OPEN $ | | * Release $Name: MATRIXSSL_1_8_6_OPEN $ | |
| * | | * | |
| * Internal definitions for PeerSec Networks MatrixSSL cryptography pro
vider | | * Internal definitions for PeerSec Networks MatrixSSL cryptography pro
vider | |
| */ | | */ | |
| /* | | /* | |
| * Copyright (c) PeerSec Networks, 2002-2008. All Rights Reserved. | | * Copyright (c) PeerSec Networks, 2002-2008. All Rights Reserved. | |
| * The latest version of this code is available at http://www.matrixssl
.org | | * The latest version of this code is available at http://www.matrixssl
.org | |
| * | | * | |
| * This software is open source; you can redistribute it and/or modify | | * This software is open source; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| | | | |
| skipping to change at line 167 | | skipping to change at line 167 | |
| unsigned char buf[64]; | | unsigned char buf[64]; | |
| }; | | }; | |
| | | | |
| #ifdef USE_MD2 | | #ifdef USE_MD2 | |
| struct md2_state { | | struct md2_state { | |
| unsigned char chksum[16], X[48], buf[16]; | | unsigned char chksum[16], X[48], buf[16]; | |
| unsigned long curlen; | | unsigned long curlen; | |
| }; | | }; | |
| #endif /* USE_MD2 */ | | #endif /* USE_MD2 */ | |
| | | | |
|
| #ifdef USE_SHA256 | | | |
| struct sha256_state { | | | |
| ulong64 length; | | | |
| ulong32 state[8], curlen; | | | |
| unsigned char buf[64]; | | | |
| }; | | | |
| #endif /* USE_SHA256 */ | | | |
| | | | |
| typedef union { | | typedef union { | |
| struct sha1_state sha1; | | struct sha1_state sha1; | |
| struct md5_state md5; | | struct md5_state md5; | |
| #ifdef USE_MD2 | | #ifdef USE_MD2 | |
| struct md2_state md2; | | struct md2_state md2; | |
| #endif /* USE_MD2 */ | | #endif /* USE_MD2 */ | |
|
| #ifdef USE_SHA256 | | | |
| struct sha256_state sha256; | | | |
| #endif | | | |
| } hash_state; | | } hash_state; | |
| | | | |
| typedef hash_state sslSha1Context_t; | | typedef hash_state sslSha1Context_t; | |
| typedef hash_state sslMd5Context_t; | | typedef hash_state sslMd5Context_t; | |
| #ifdef USE_MD2 | | #ifdef USE_MD2 | |
| typedef hash_state sslMd2Context_t; | | typedef hash_state sslMd2Context_t; | |
| #endif /* USE_MD2 */ | | #endif /* USE_MD2 */ | |
|
| #ifdef USE_SHA256 | | | |
| typedef hash_state sslSha256Context_t; | | | |
| #endif /* USE_SHA256 */ | | | |
| | | | |
| typedef struct { | | typedef struct { | |
| unsigned char pad[64]; | | unsigned char pad[64]; | |
| union { | | union { | |
| sslMd5Context_t md5; | | sslMd5Context_t md5; | |
| sslSha1Context_t sha1; | | sslSha1Context_t sha1; | |
| } u; | | } u; | |
| } sslHmacContext_t; | | } sslHmacContext_t; | |
| | | | |
| /**************************************************************************
****/ | | /**************************************************************************
****/ | |
| | | | |
End of changes. 4 change blocks. |
| 15 lines changed or deleted | | 1 lines changed or added | |
|