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

Side by Side Diff: mozilla/security/nss/lib/pki/certdecode.c

Issue 14249009: Change the NSS and NSPR source tree to the new directory structure to be (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Created 7 years, 8 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 | « mozilla/security/nss/lib/pki/asymmkey.c ('k') | mozilla/security/nss/lib/pki/certificate.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 #ifdef DEBUG
6 static const char CVS_ID[] = "@(#) $RCSfile: certdecode.c,v $ $Revision: 1.18 $ $Date: 2012/04/25 14:50:07 $";
7 #endif /* DEBUG */
8
9 #ifndef PKIT_H
10 #include "pkit.h"
11 #endif /* PKIT_H */
12
13 #ifndef PKIM_H
14 #include "pkim.h"
15 #endif /* PKIM_H */
16
17 /* This is defined in pki3hack.c */
18 NSS_EXTERN nssDecodedCert *
19 nssDecodedPKIXCertificate_Create (
20 NSSArena *arenaOpt,
21 NSSDER *encoding
22 );
23
24 NSS_IMPLEMENT PRStatus
25 nssDecodedPKIXCertificate_Destroy (
26 nssDecodedCert *dc
27 );
28
29 NSS_IMPLEMENT nssDecodedCert *
30 nssDecodedCert_Create (
31 NSSArena *arenaOpt,
32 NSSDER *encoding,
33 NSSCertificateType type
34 )
35 {
36 nssDecodedCert *rvDC = NULL;
37 switch(type) {
38 case NSSCertificateType_PKIX:
39 rvDC = nssDecodedPKIXCertificate_Create(arenaOpt, encoding);
40 break;
41 default:
42 #if 0
43 nss_SetError(NSS_ERROR_INVALID_ARGUMENT);
44 #endif
45 return (nssDecodedCert *)NULL;
46 }
47 return rvDC;
48 }
49
50 NSS_IMPLEMENT PRStatus
51 nssDecodedCert_Destroy (
52 nssDecodedCert *dc
53 )
54 {
55 if (!dc) {
56 return PR_FAILURE;
57 }
58 switch(dc->type) {
59 case NSSCertificateType_PKIX:
60 return nssDecodedPKIXCertificate_Destroy(dc);
61 default:
62 #if 0
63 nss_SetError(NSS_ERROR_INVALID_ARGUMENT);
64 #endif
65 break;
66 }
67 return PR_FAILURE;
68 }
69
OLDNEW
« no previous file with comments | « mozilla/security/nss/lib/pki/asymmkey.c ('k') | mozilla/security/nss/lib/pki/certificate.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698