Bugzilla Bug 298520: moved the RSA maximum size macros from rsa.c to

blapit.h.  Removed an out-of-date comment from blapit.h. r=nelsonb.
Modified files: blapit.h rsa.c
This commit is contained in:
wtchang%redhat.com 2006-05-22 22:10:40 +00:00
Родитель 06496e21ff
Коммит 68708d13f4
2 изменённых файлов: 8 добавлений и 11 удалений

Просмотреть файл

@ -38,7 +38,7 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: blapit.h,v 1.18 2005/11/07 18:44:21 wtchang%redhat.com Exp $ */
/* $Id: blapit.h,v 1.19 2006/05/22 22:10:40 wtchang%redhat.com Exp $ */
#ifndef _BLAPIT_H_
#define _BLAPIT_H_
@ -110,12 +110,12 @@
#define NSS_FREEBL_DEFAULT_CHUNKSIZE 2048
/*
* these values come from the intial key size limits from the PKCS #11
* module. They may be aribitarily adjusted to any value freebl supports
* RSA_MAX_MODULUS_BITS is not defined since there is only memory constraints
* on the largest RSA Modulus that PKCS #11 or freebl may support.
* These values come from the initial key size limits from the PKCS #11
* module. They may be arbitrarily adjusted to any value freebl supports.
*/
#define RSA_MIN_MODULUS_BITS 128
#define RSA_MAX_MODULUS_BITS 8192
#define RSA_MAX_EXPONENT_BITS 64
#define DH_MIN_P_BITS 128
#define DH_MAX_P_BITS 2236

Просмотреть файл

@ -37,7 +37,7 @@
/*
* RSA key generation, public key op, private key op.
*
* $Id: rsa.c,v 1.36 2005/05/27 23:53:19 wtchang%redhat.com Exp $
* $Id: rsa.c,v 1.37 2006/05/22 22:10:40 wtchang%redhat.com Exp $
*/
#include "secerr.h"
@ -63,13 +63,10 @@
*/
#define MAX_KEY_GEN_ATTEMPTS 10
#define MAX_RSA_MODULUS 1024 /* bytes, 8k bits */
#define MAX_RSA_EXPONENT 8 /* bytes, 64 bits */
/* exponent should not be greater than modulus */
#define BAD_RSA_KEY_SIZE(modLen, expLen) \
((expLen) > (modLen) || (modLen) > MAX_RSA_MODULUS || \
(expLen) > MAX_RSA_EXPONENT)
((expLen) > (modLen) || (modLen) > RSA_MAX_MODULUS_BITS/8 || \
(expLen) > RSA_MAX_EXPONENT_BITS/8)
/*
** RSABlindingParamsStr