ftp://ftp.rsasecurity.com/pub/pkcs/ascii/pkcs-1.asc,
and RFC 2437.
- Copyright notice: All code, including the SILC PKCS API code that is
- not part of the Mozilla code, falls under the same license (MPL or GPL)
- found attached to this file, below.
+ Copyright notice: All code in this file, including the SILC PKCS API
+ code that is not part of the Mozilla code, falls under the same license
+ (MPL or GPL) found attached to this file, below.
*/
/*
unsigned char *block;
unsigned char *bp;
int padLen;
+ int i;
block = (unsigned char *) silc_malloc(modulusLen);
if (block == NULL)
* Blocks intended for public-key operation.
*/
case RSA_BlockPublic:
-
- /* XXX For now we can't do this because we can't get the
- SilcRNG object down to this level. */
- silc_free(block);
- return NULL;
-
-#if 0
- int i;
-
/*
* 0x00 || BT || Pad || 0x00 || ActualData
* 1 1 padLen 1 data_len
for (i = 0; i < padLen; i++) {
/* Pad with non-zero random data. */
do {
- RNG_GenerateGlobalRandomBytes(bp + i, 1);
+ silc_rng_global_get_byte(bp + i);
} while (bp[i] == RSA_BLOCK_AFTER_PAD_OCTET);
}
bp += padLen;
*bp++ = RSA_BLOCK_AFTER_PAD_OCTET;
memcpy(bp, data, data_len);
-#endif
-
break;
default: