| OLD | NEW |
| 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 #include "cert.h" | 5 #include "cert.h" |
| 6 #include "secoid.h" | 6 #include "secoid.h" |
| 7 #include "secder.h" /* XXX remove this when remove the DERTemplates */ | 7 #include "secder.h" /* XXX remove this when remove the DERTemplates */ |
| 8 #include "secasn1.h" | 8 #include "secasn1.h" |
| 9 #include "secitem.h" | 9 #include "secitem.h" |
| 10 #include <stdarg.h> | 10 #include <stdarg.h> |
| (...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 SECITEM_FreeItem(bVal, PR_TRUE); | 530 SECITEM_FreeItem(bVal, PR_TRUE); |
| 531 } else if (a->value.data[0] == 0x13) { /* both are printable strings. */ | 531 } else if (a->value.data[0] == 0x13) { /* both are printable strings. */ |
| 532 /* printable strings */ | 532 /* printable strings */ |
| 533 rv = CERT_CompareDERPrintableStrings(&a->value, &b->value); | 533 rv = CERT_CompareDERPrintableStrings(&a->value, &b->value); |
| 534 } | 534 } |
| 535 } | 535 } |
| 536 return rv; | 536 return rv; |
| 537 } | 537 } |
| 538 | 538 |
| 539 SECComparison | 539 SECComparison |
| 540 CERT_CompareRDN(CERTRDN *a, CERTRDN *b) | 540 CERT_CompareRDN(const CERTRDN *a, const CERTRDN *b) |
| 541 { | 541 { |
| 542 CERTAVA **aavas, *aava; | 542 CERTAVA **aavas, *aava; |
| 543 CERTAVA **bavas, *bava; | 543 CERTAVA **bavas, *bava; |
| 544 int ac, bc; | 544 int ac, bc; |
| 545 SECComparison rv = SECEqual; | 545 SECComparison rv = SECEqual; |
| 546 | 546 |
| 547 aavas = a->avas; | 547 aavas = a->avas; |
| 548 bavas = b->avas; | 548 bavas = b->avas; |
| 549 | 549 |
| 550 /* | 550 /* |
| (...skipping 15 matching lines...) Expand all Loading... |
| 566 break; | 566 break; |
| 567 } | 567 } |
| 568 } | 568 } |
| 569 if (!bava) /* didn't find a match */ | 569 if (!bava) /* didn't find a match */ |
| 570 return SECGreaterThan; | 570 return SECGreaterThan; |
| 571 } | 571 } |
| 572 return rv; | 572 return rv; |
| 573 } | 573 } |
| 574 | 574 |
| 575 SECComparison | 575 SECComparison |
| 576 CERT_CompareName(CERTName *a, CERTName *b) | 576 CERT_CompareName(const CERTName *a, const CERTName *b) |
| 577 { | 577 { |
| 578 CERTRDN **ardns, *ardn; | 578 CERTRDN **ardns, *ardn; |
| 579 CERTRDN **brdns, *brdn; | 579 CERTRDN **brdns, *brdn; |
| 580 int ac, bc; | 580 int ac, bc; |
| 581 SECComparison rv = SECEqual; | 581 SECComparison rv = SECEqual; |
| 582 | 582 |
| 583 ardns = a->rdns; | 583 ardns = a->rdns; |
| 584 brdns = b->rdns; | 584 brdns = b->rdns; |
| 585 | 585 |
| 586 /* | 586 /* |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 } | 700 } |
| 701 | 701 |
| 702 avaValue.data = utf8Val; | 702 avaValue.data = utf8Val; |
| 703 avaValue.len = utf8ValLen; | 703 avaValue.len = utf8ValLen; |
| 704 } | 704 } |
| 705 | 705 |
| 706 retItem = SECITEM_DupItem(&avaValue); | 706 retItem = SECITEM_DupItem(&avaValue); |
| 707 PORT_FreeArena(newarena, PR_FALSE); | 707 PORT_FreeArena(newarena, PR_FALSE); |
| 708 return retItem; | 708 return retItem; |
| 709 } | 709 } |
| OLD | NEW |