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 /* | 5 /* |
6 * cert.h - public data structures and prototypes for the certificate library | 6 * cert.h - public data structures and prototypes for the certificate library |
7 */ | 7 */ |
8 | 8 |
9 #ifndef _CERT_H_ | 9 #ifndef _CERT_H_ |
10 #define _CERT_H_ | 10 #define _CERT_H_ |
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1165 | 1165 |
1166 extern CERTPrivKeyUsagePeriod * | 1166 extern CERTPrivKeyUsagePeriod * |
1167 CERT_DecodePrivKeyUsagePeriodExtension(PLArenaPool *arena, SECItem *extnValue); | 1167 CERT_DecodePrivKeyUsagePeriodExtension(PLArenaPool *arena, SECItem *extnValue); |
1168 | 1168 |
1169 extern CERTGeneralName * | 1169 extern CERTGeneralName * |
1170 CERT_GetNextGeneralName(CERTGeneralName *current); | 1170 CERT_GetNextGeneralName(CERTGeneralName *current); |
1171 | 1171 |
1172 extern CERTGeneralName * | 1172 extern CERTGeneralName * |
1173 CERT_GetPrevGeneralName(CERTGeneralName *current); | 1173 CERT_GetPrevGeneralName(CERTGeneralName *current); |
1174 | 1174 |
| 1175 /* |
| 1176 * Look up name constraints for some certs that do not include name constraints |
| 1177 * (Most importantly, root certificates) |
| 1178 * |
| 1179 * If a matching subject is found, |extensions| will be populated with a copy of
the |
| 1180 * DER-encoded name constraints extension. The data in |extensions| will point t
o |
| 1181 * memory that the caller owns. |
| 1182 * |
| 1183 * There is no mechanism to configure imposed name constraints right now. All |
| 1184 * imposed name constraints are built into NSS. |
| 1185 */ |
| 1186 SECStatus |
| 1187 CERT_GetImposedNameConstraints(const SECItem *derSubject, SECItem *extensions); |
| 1188 |
1175 CERTNameConstraint * | 1189 CERTNameConstraint * |
1176 CERT_GetNextNameConstraint(CERTNameConstraint *current); | 1190 CERT_GetNextNameConstraint(CERTNameConstraint *current); |
1177 | 1191 |
1178 CERTNameConstraint * | 1192 CERTNameConstraint * |
1179 CERT_GetPrevNameConstraint(CERTNameConstraint *current); | 1193 CERT_GetPrevNameConstraint(CERTNameConstraint *current); |
1180 | 1194 |
1181 void | 1195 void |
1182 CERT_DestroyUserNotice(CERTUserNotice *userNotice); | 1196 CERT_DestroyUserNotice(CERTUserNotice *userNotice); |
1183 | 1197 |
1184 typedef char * (* CERTPolicyStringCallback)(char *org, | 1198 typedef char * (* CERTPolicyStringCallback)(char *org, |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1536 * Verify name against all the constraints relevant to that type of | 1550 * Verify name against all the constraints relevant to that type of |
1537 * the name. | 1551 * the name. |
1538 */ | 1552 */ |
1539 extern SECStatus | 1553 extern SECStatus |
1540 CERT_CheckNameSpace(PLArenaPool *arena, | 1554 CERT_CheckNameSpace(PLArenaPool *arena, |
1541 const CERTNameConstraints *constraints, | 1555 const CERTNameConstraints *constraints, |
1542 const CERTGeneralName *currentName); | 1556 const CERTGeneralName *currentName); |
1543 | 1557 |
1544 /* | 1558 /* |
1545 * Extract and allocate the name constraints extension from the CA cert. | 1559 * Extract and allocate the name constraints extension from the CA cert. |
| 1560 * If the certificate contains no name constraints extension, but |
| 1561 * CERT_GetImposedNameConstraints returns a name constraints extension |
| 1562 * for the subject of the certificate, then that extension will be returned. |
1546 */ | 1563 */ |
1547 extern SECStatus | 1564 extern SECStatus |
1548 CERT_FindNameConstraintsExten(PLArenaPool *arena, | 1565 CERT_FindNameConstraintsExten(PLArenaPool *arena, |
1549 CERTCertificate *cert, | 1566 CERTCertificate *cert, |
1550 CERTNameConstraints **constraints); | 1567 CERTNameConstraints **constraints); |
1551 | 1568 |
1552 /* | 1569 /* |
1553 * Initialize a new GERTGeneralName fields (link) | 1570 * Initialize a new GERTGeneralName fields (link) |
1554 */ | 1571 */ |
1555 extern CERTGeneralName * | 1572 extern CERTGeneralName * |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1660 /* | 1677 /* |
1661 * Destroy the arrays inside flags, | 1678 * Destroy the arrays inside flags, |
1662 * and destroy the object pointed to by flags, too. | 1679 * and destroy the object pointed to by flags, too. |
1663 */ | 1680 */ |
1664 extern void | 1681 extern void |
1665 CERT_DestroyCERTRevocationFlags(CERTRevocationFlags *flags); | 1682 CERT_DestroyCERTRevocationFlags(CERTRevocationFlags *flags); |
1666 | 1683 |
1667 SEC_END_PROTOS | 1684 SEC_END_PROTOS |
1668 | 1685 |
1669 #endif /* _CERT_H_ */ | 1686 #endif /* _CERT_H_ */ |
OLD | NEW |