~ubuntu-branches/ubuntu/lucid/nss/lucid-security

« back to all changes in this revision

Viewing changes to mozilla/security/nss/cmd/pp/pp.c

  • Committer: Package Import Robot
  • Author(s): Jamie Strandboge
  • Date: 2013-01-11 14:47:38 UTC
  • mfrom: (1.2.5)
  • Revision ID: package-import@ubuntu.com-20130111144738-iybbas2ln824kgoz
Tags: 3.14.1-0ckbi1.93ubuntu.0.10.04.1
* New upstream release. Dropped the following patches:
  - debian/patches/25_entropy.patch (was bz51429 obsoleted by fix for
    bz174993)
  - debian/patches/38_mips64_build.patch (we don't build on mips)
  - debian/patches/90_realpath.patch (included upstream)
    upstream)
  - debian/patches/diginotar.patch (included upstream)
  - debian/patches/CVE-2012-0441.patch (included upstream)
* debian/patches/01_dont_build_nspr.patch: refresh
* debian/patches/38_kbsd.patch: refresh/update based on Debian
* debian/patches/80_security_build.patch: refresh
* debian/patches/85_security_load.patch: refresh/update based on Debian
* debian/patches/97_SSL_RENEGOTIATE_TRANSITIONAL.patch: refresh/update based
  on Debian
* SECURITY UPDATE: distrust improperly issued TURKTRUST intermediate CAs
  - debian/patches/94_ckbi-1.9.patch: update to CKBI 1.93 by using
    mozilla/security/nss/lib/ckfw/builtins/certdata.txt from upstream and
    updating mozilla/security/nss/lib/ckfw/builtins/nssckbi.h. Apply this
    before 95_add_spi+cacert_ca_certs.patch since it keeps this patch clean
    and underscores that SPI and CACERT are not part of upstream Roots.
  - CVE-2013-0743
* debian/libnss3-0d.symbols: updated for *_3.12.10 through *_3.14.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* ***** BEGIN LICENSE BLOCK *****
2
 
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
3
 
 *
4
 
 * The contents of this file are subject to the Mozilla Public License Version
5
 
 * 1.1 (the "License"); you may not use this file except in compliance with
6
 
 * the License. You may obtain a copy of the License at
7
 
 * http://www.mozilla.org/MPL/
8
 
 *
9
 
 * Software distributed under the License is distributed on an "AS IS" basis,
10
 
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11
 
 * for the specific language governing rights and limitations under the
12
 
 * License.
13
 
 *
14
 
 * The Original Code is the Netscape security libraries.
15
 
 *
16
 
 * The Initial Developer of the Original Code is
17
 
 * Netscape Communications Corporation.
18
 
 * Portions created by the Initial Developer are Copyright (C) 1994-2000
19
 
 * the Initial Developer. All Rights Reserved.
20
 
 *
21
 
 * Contributor(s):
22
 
 *
23
 
 * Alternatively, the contents of this file may be used under the terms of
24
 
 * either the GNU General Public License Version 2 or later (the "GPL"), or
25
 
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
26
 
 * in which case the provisions of the GPL or the LGPL are applicable instead
27
 
 * of those above. If you wish to allow use of your version of this file only
28
 
 * under the terms of either the GPL or the LGPL, and not to allow others to
29
 
 * use your version of this file under the terms of the MPL, indicate your
30
 
 * decision by deleting the provisions above and replace them with the notice
31
 
 * and other provisions required by the GPL or the LGPL. If you do not delete
32
 
 * the provisions above, a recipient may use your version of this file under
33
 
 * the terms of any one of the MPL, the GPL or the LGPL.
34
 
 *
35
 
 * ***** END LICENSE BLOCK ***** */
 
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/. */
36
4
 
37
5
/*
38
6
 * Pretty-print some well-known BER or DER encoded data (e.g. certificates,
39
7
 * keys, pkcs7)
40
8
 *
41
 
 * $Id: pp.c,v 1.9 2007/09/25 03:46:23 nelson%bolyard.com Exp $
 
9
 * $Id: pp.c,v 1.12 2012/08/16 06:57:24 kaie%kuix.de Exp $
42
10
 */
43
11
 
44
12
#include "secutil.h"
62
30
            "-t type", SEC_CT_PRIVATE_KEY);
63
31
    fprintf(stderr, "%-20s %s, %s, %s,\n", "", SEC_CT_PUBLIC_KEY,
64
32
            SEC_CT_CERTIFICATE, SEC_CT_CERTIFICATE_REQUEST);
65
 
    fprintf(stderr, "%-20s %s or %s)\n", "", SEC_CT_PKCS7, SEC_CT_CRL);    
 
33
    fprintf(stderr, "%-20s %s, %s, %s or %s)\n", "", SEC_CT_CERTIFICATE_ID,
 
34
            SEC_CT_PKCS7, SEC_CT_CRL, SEC_CT_NAME);
66
35
    fprintf(stderr, "%-20s Input is in ascii encoded form (RFC1113)\n",
67
36
            "-a");
68
37
    fprintf(stderr, "%-20s Define an input file to use (default is stdin)\n",
152
121
    if (PORT_Strcmp(typeTag, SEC_CT_CERTIFICATE) == 0) {
153
122
        rv = SECU_PrintSignedData(outFile, &data, "Certificate", 0,
154
123
                             SECU_PrintCertificate);
 
124
    } else if (PORT_Strcmp(typeTag, SEC_CT_CERTIFICATE_ID) == 0) {
 
125
        PRBool saveWrapeState = SECU_GetWrapEnabled();
 
126
        SECU_EnableWrap(PR_FALSE);
 
127
        rv = SECU_PrintSignedContent(outFile, &data, 0, 0,
 
128
                                     SECU_PrintDumpDerIssuerAndSerial);
 
129
        SECU_EnableWrap(saveWrapeState);
155
130
    } else if (PORT_Strcmp(typeTag, SEC_CT_CERTIFICATE_REQUEST) == 0) {
156
131
        rv = SECU_PrintSignedData(outFile, &data, "Certificate Request", 0,
157
132
                             SECU_PrintCertificateRequest);
166
141
    } else if (PORT_Strcmp(typeTag, SEC_CT_PKCS7) == 0) {
167
142
        rv = SECU_PrintPKCS7ContentInfo(outFile, &data,
168
143
                                        "PKCS #7 Content Info", 0);
 
144
    } else if (PORT_Strcmp(typeTag, SEC_CT_NAME) == 0) {
 
145
        rv = SECU_PrintDERName(outFile, &data, "Name", 0);
169
146
    } else {
170
147
        fprintf(stderr, "%s: don't know how to print out '%s' files\n",
171
148
                progName, typeTag);