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 * Code for dealing with X509.V3 extensions. | 6 * Code for dealing with X509.V3 extensions. |
7 * | |
8 * $Id$ | |
9 */ | 7 */ |
10 | 8 |
11 #include "cert.h" | 9 #include "cert.h" |
12 #include "secitem.h" | 10 #include "secitem.h" |
13 #include "secoid.h" | 11 #include "secoid.h" |
14 #include "secder.h" | 12 #include "secder.h" |
15 #include "secasn1.h" | 13 #include "secasn1.h" |
16 #include "certxutl.h" | 14 #include "certxutl.h" |
17 #include "secerr.h" | 15 #include "secerr.h" |
18 | 16 |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 if (rv == SECFailure) { | 356 if (rv == SECFailure) { |
359 rv = (PORT_GetError () == SEC_ERROR_EXTENSION_NOT_FOUND) ? | 357 rv = (PORT_GetError () == SEC_ERROR_EXTENSION_NOT_FOUND) ? |
360 SECSuccess : SECFailure; | 358 SECSuccess : SECFailure; |
361 } else if (!(keyUsage.data[0] & usage)) { | 359 } else if (!(keyUsage.data[0] & usage)) { |
362 PORT_SetError (SEC_ERROR_CERT_USAGES_INVALID); | 360 PORT_SetError (SEC_ERROR_CERT_USAGES_INVALID); |
363 rv = SECFailure; | 361 rv = SECFailure; |
364 } | 362 } |
365 PORT_Free (keyUsage.data); | 363 PORT_Free (keyUsage.data); |
366 return (rv); | 364 return (rv); |
367 } | 365 } |
OLD | NEW |