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 #ifndef NSSPKI_H | 5 #ifndef NSSPKI_H |
6 #include "nsspki.h" | 6 #include "nsspki.h" |
7 #endif /* NSSPKI_H */ | 7 #endif /* NSSPKI_H */ |
8 | 8 |
9 #ifndef PKIT_H | 9 #ifndef PKIT_H |
10 #include "pkit.h" | 10 #include "pkit.h" |
(...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1115 /* XXX should choose instance based on some criteria */ | 1115 /* XXX should choose instance based on some criteria */ |
1116 status = nssCryptokiCRL_GetAttributes(object->instances[0], | 1116 status = nssCryptokiCRL_GetAttributes(object->instances[0], |
1117 NULL, /* XXX sessionOpt */ | 1117 NULL, /* XXX sessionOpt */ |
1118 arena, | 1118 arena, |
1119 &rvCRL->encoding, | 1119 &rvCRL->encoding, |
1120 NULL, /* subject */ | 1120 NULL, /* subject */ |
1121 NULL, /* class */ | 1121 NULL, /* class */ |
1122 &rvCRL->url, | 1122 &rvCRL->url, |
1123 &rvCRL->isKRL); | 1123 &rvCRL->isKRL); |
1124 if (status != PR_SUCCESS) { | 1124 if (status != PR_SUCCESS) { |
| 1125 if (!arena) { |
| 1126 nssPKIObject_Destroy((nssPKIObject *)rvCRL); |
| 1127 } |
1125 return (NSSCRL *)NULL; | 1128 return (NSSCRL *)NULL; |
1126 } | 1129 } |
1127 return rvCRL; | 1130 return rvCRL; |
1128 } | 1131 } |
1129 | 1132 |
1130 NSS_IMPLEMENT NSSCRL * | 1133 NSS_IMPLEMENT NSSCRL * |
1131 nssCRL_AddRef ( | 1134 nssCRL_AddRef ( |
1132 NSSCRL *crl | 1135 NSSCRL *crl |
1133 ) | 1136 ) |
1134 { | 1137 { |
(...skipping 27 matching lines...) Expand all Loading... |
1162 nssCRL_GetEncoding ( | 1165 nssCRL_GetEncoding ( |
1163 NSSCRL *crl | 1166 NSSCRL *crl |
1164 ) | 1167 ) |
1165 { | 1168 { |
1166 if (crl && crl->encoding.data != NULL && crl->encoding.size > 0) { | 1169 if (crl && crl->encoding.data != NULL && crl->encoding.size > 0) { |
1167 return &crl->encoding; | 1170 return &crl->encoding; |
1168 } else { | 1171 } else { |
1169 return (NSSDER *)NULL; | 1172 return (NSSDER *)NULL; |
1170 } | 1173 } |
1171 } | 1174 } |
OLD | NEW |