Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: nss/lib/util/nssb64e.c

Issue 16132005: Allow NSS to be built with NO_NSPR_10_SUPPORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « nss/lib/util/nssb64d.c ('k') | nss/lib/util/quickder.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* This Source Code Form is subject to the terms of the Mozilla Public 1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 4
5 /* 5 /*
6 * Base64 encoding (binary to ascii). 6 * Base64 encoding (binary to ascii).
7 */ 7 */
8 8
9 #include "nssb64.h" 9 #include "nssb64.h"
10 #include "nspr.h" 10 #include "nspr.h"
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 * is NULL, "maxOutLen" is ignored.) 620 * is NULL, "maxOutLen" is ignored.)
621 * 621 *
622 * If "outStrOpt" is NULL, allocation will happen out of the passed-in 622 * If "outStrOpt" is NULL, allocation will happen out of the passed-in
623 * "arenaOpt", if *it* is non-NULL, otherwise standard allocation (heap) 623 * "arenaOpt", if *it* is non-NULL, otherwise standard allocation (heap)
624 * will be used. 624 * will be used.
625 * 625 *
626 * Return value is NULL on error, the output buffer (allocated or provided) 626 * Return value is NULL on error, the output buffer (allocated or provided)
627 * otherwise. 627 * otherwise.
628 */ 628 */
629 char * 629 char *
630 NSSBase64_EncodeItem (PRArenaPool *arenaOpt, char *outStrOpt, 630 NSSBase64_EncodeItem (PLArenaPool *arenaOpt, char *outStrOpt,
631 unsigned int maxOutLen, SECItem *inItem) 631 unsigned int maxOutLen, SECItem *inItem)
632 { 632 {
633 char *out_string = outStrOpt; 633 char *out_string = outStrOpt;
634 PRUint32 max_out_len; 634 PRUint32 max_out_len;
635 PRUint32 out_len; 635 PRUint32 out_len;
636 void *mark = NULL; 636 void *mark = NULL;
637 char *dummy; 637 char *dummy;
638 638
639 PORT_Assert(inItem != NULL && inItem->data != NULL && inItem->len != 0); 639 PORT_Assert(inItem != NULL && inItem->data != NULL && inItem->len != 0);
640 if (inItem == NULL || inItem->data == NULL || inItem->len == 0) { 640 if (inItem == NULL || inItem->data == NULL || inItem->len == 0) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 } 722 }
723 723
724 /* 724 /*
725 ** Convert from binary encoding of an item to ascii. 725 ** Convert from binary encoding of an item to ascii.
726 */ 726 */
727 char * 727 char *
728 BTOA_ConvertItemToAscii (SECItem *binary_item) 728 BTOA_ConvertItemToAscii (SECItem *binary_item)
729 { 729 {
730 return NSSBase64_EncodeItem (NULL, NULL, 0, binary_item); 730 return NSSBase64_EncodeItem (NULL, NULL, 0, binary_item);
731 } 731 }
OLDNEW
« no previous file with comments | « nss/lib/util/nssb64d.c ('k') | nss/lib/util/quickder.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698