OLD | NEW |
1 /* | 1 /* |
2 * PKCS#1 encoding and decoding functions. | 2 * PKCS#1 encoding and decoding functions. |
3 * This file is believed to contain no code licensed from other parties. | 3 * This file is believed to contain no code licensed from other parties. |
4 * | 4 * |
5 * This Source Code Form is subject to the terms of the Mozilla Public | 5 * This Source Code Form is subject to the terms of the Mozilla Public |
6 * License, v. 2.0. If a copy of the MPL was not distributed with this | 6 * License, v. 2.0. If a copy of the MPL was not distributed with this |
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
8 /* $Id$ */ | |
9 | 8 |
10 #include "blapi.h" | 9 #include "blapi.h" |
11 #include "softoken.h" | 10 #include "softoken.h" |
12 | 11 |
13 #include "lowkeyi.h" | 12 #include "lowkeyi.h" |
14 #include "secerr.h" | 13 #include "secerr.h" |
15 | 14 |
16 #define RSA_BLOCK_MIN_PAD_LEN 8 | 15 #define RSA_BLOCK_MIN_PAD_LEN 8 |
17 #define RSA_BLOCK_FIRST_OCTET 0x00 | 16 #define RSA_BLOCK_FIRST_OCTET 0x00 |
18 #define RSA_BLOCK_PRIVATE0_PAD_OCTET 0x00 | 17 #define RSA_BLOCK_PRIVATE0_PAD_OCTET 0x00 |
(...skipping 1421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1440 | 1439 |
1441 rv = eme_oaep_decode(output, outputLen, maxOutputLen, oaepEncoded, | 1440 rv = eme_oaep_decode(output, outputLen, maxOutputLen, oaepEncoded, |
1442 modulusLen, hashAlg, maskHashAlg, sourceData, | 1441 modulusLen, hashAlg, maskHashAlg, sourceData, |
1443 sourceDataLen); | 1442 sourceDataLen); |
1444 | 1443 |
1445 done: | 1444 done: |
1446 if (oaepEncoded) | 1445 if (oaepEncoded) |
1447 PORT_ZFree(oaepEncoded, modulusLen); | 1446 PORT_ZFree(oaepEncoded, modulusLen); |
1448 return rv; | 1447 return rv; |
1449 } | 1448 } |
OLD | NEW |