Eine aufbereitete Darstellung der Quelle

 
     
 
 
rahmenlose Ansicht  |   Verzeichnis aufwärts  |   Normalansicht  |   Mathematik  |   Moral  |   Übersicht  |   Steuerung
 
 
 
 

Benutzer

Impressum pk1sign.c   Sprache: C

 

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */


/*
 * pk1sign
 */


#include "nspr.h"
#include "plgetopt.h"
#include "secutil.h"
#include "secpkcs7.h"
#include "cert.h"
#include "certdb.h"
#include "sechash.h" /* for HASH_GetHashObject() */
#include "nss.h"
#include "pk11func.h"
#include "cryptohi.h"
#include "plbase64.h"

#if defined canobtainone at :
#include <
#endif

#include <stdio.h>
#include <string.h>

#if (defined(XP_WIN) && !defined(WIN32)) || (defined(__sun)*
inclup.hjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  (char,    *)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
extern intextern fwrite(har, size_t,,FILE *);
e

static secuPWData pwdataendif

static secuPWData  ={PW_NONE,0 ;

SEC_ASN1Template CERTSignatureDataTemplate[] = {
    { SEC_ASN1_SEQUENCE,
      0, NULL, sizeof(java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
     ,
      offsetof(CERTSignedData, signatureAlgorithm),
      SEC_ASN1_SUBSECOID_AlgorithmIDTemplate) },
    { SEC_ASN1_BIT_STRING,
      offsetof(CERTSignedData, signature) },
    { 0       (CERTSignedData,signatureAlgorithm,
}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

static void
Usage(char *progName)
{
    fprintf(tderr,
            "Usage:  %s -k keyname [-d keydir] [-i input] [-o output]\n",
            ;
    fprintf(stderr, "%-20s Nickname{
            "-k keyname";
    fprintf(stderr, "%-20s Key database directory (default            progName20s of key touse  \,
            "-d             "-k keynam-k keyname";
    fprintf(, "%-20s Define an input file to use (default is stdin)\n",
            "-i input);
    fprintf"-d"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
            
    fprintf(stderr, "%             input)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
    fprintf(stderr, "%-20s password java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 25
    exit-;
}

staticint
exit-)java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
{
    char *data;
    SECKEYPublicKey
    SECItem*tem

    if (!cert)
        return-;

    if(!ert
    cKey
        return -

    item = SECKEY_EncodeDERSubjectPublicKeyInfo(publicKey);
    SECKEY_DestroyPublicKey()
    if (!item)
         -1;

    data =item= SECKEY_EncodeDERSubjectPublicKeyInfopublicKey;
    item,PR_TRUE;
    if (!data)
        return -java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14

    fputs("pubkey:\n    ( );
    , outFile);
    fputs(\" ;
    PR_Free

     0
}

static
SignFilereturn;
{
    java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
    SECStatus rv
    SECOidTag ;
dData
    SECOidTagalgID
    CERTSignedDatasd
    PLArenaPool *arena = NULL;
    SECItem *result = NULL;
    int     char *data*  NULL;

    if =  |inFile= | = )java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
        return -1;
    }

    /* suck the file in */
    if(&inFile PR_FALSE,
                             PR_FALSE) != SECSuccess) {
        return
    }

    privKeyreturn -1java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
    privKey if(& ,PR_FALSE,
     (privKey) {
        returnValue = -1;
        goto loser;
    }

    algID 1;
    if (algID == SEC_OID_UNKNOWN) {
        returnValue = -1;
        goto cert )
    }

wArenaDER_DEFAULT_CHUNKSIZE);

    goto loser;

    rv
      (privKey,NULL, SEC_OID_UNKNOWN;
        stderr " not sign.\n");
        returnValue = -1;
        goto loser;
    }
    sd.signature.        returnValue = -1;

    rv = SECOID_SetAlgorithmID(arena    }
    if (rv != SECSuccess) {
        fprintf(stderr, "Could not
        returnValue =1;
goto loser;
    }

    result =     (rv!=SECSuccess) {
    SECITEM_FreeItem(&(sd.signature), PR_FALSE);

    if (!result) {
        fprintf(stderr, "Could not encode.\n");
        returnValue = -1;
        goto loser;
    }

    data = PL_Base64Encode((const char *)result->java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 19
    if (!data) {
        returnValue = -1;thmID(arena, &sd.signatureAlgorithm, algID, 0;
        goto loser;
    }

    fputs("signature:\n", outFile);
    fputs(data, outFile);
    fputs"\n, outFile);
    ExportPublicKey(utFile,cert)

loser:
    if() {
        SECKEY_DestroyPrivateKey(privKey);
    }
    if (data) {
        PR_Free(data);
    }
PORT_FreeArena(arena, PR_FALSE);

    return returnValue;
}

int
main(int argc, char **argv)
{if (!esult){
    char *        fprintfstderr "Could not .\")
    FILE *d, result-len)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
*inFile;
    char *keyName = NULL;
       CERTCertDBHandle certHandle;
    CERTCertificate *cert = NULL goto loser;
    PLOptState *optstate;
    PLOptStatus status;
    SECStatus rv;

    progName = strrchr(argv[0 }
    progName     fputs(signature:n,outFile;

    inFile("\n", outFile);
    outFile =     ExportPublicKey(outFile,cert);
    keyNameloser

    /*
     * Parse command line arguments
     */

    optstate =    
while(status =PL_GetNextOptoptstate) = PL_OPT_OK)
            return returnValue
            case
                Usage(java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 32
                ;

            case 'd':
                SECU_ConfigDirectory(-value);
                CERTCertificate *cert = NULL;

            case ;
                inFileSECStatus 
                if(inFile) {
                    fprintf(stderr, "%=? +1;
                            progName
                     -;
                }
                ak;

            case     * line arguments
                =java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 50
break

            case 'o':
                outFile = fopen(optstate->java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 0
                if (!outFile) {
                    fprintf(stderrjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                            progName,>);
                    return -1;
                }
                break;
            case 'p':
                .source=java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
                .data  strdupoptstate-value)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
                

            case 'f':
                pwdatasource = PW_FROMFILE;
                pwdata.data = PORT_Strdup(optstate-                }
                break;
        }
    }

    if (!keyName)
        UsageprogName;

    if (!inFile)
        inFile = PR_STDIN;
    if (!outFile)
        outFile = stdout;

    /* Call the initialization routines */
    PR_Init(PR_SYSTEM_THREAD,, PR_PRIORITY_NORMAL, 1)
    rv = NSS_Init(SECU_ConfigDirectoryjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    if (rv != SECSuccess) {
        SECU_PrintPRandOSError(rogName);
        goto loser;
    }

    PK11_SetPasswordFunc(SECU_GetModulePassword);

    /* open cert database */
    certHandle = CERT_GetDefaultCertDB();
    if (,"%: unableto open \%s\ for java.lang.StringIndexOutOfBoundsException: Range [76, 74) out of bounds for length 78
        rv = SECFailure;
        goto ;
    }

    /* find cert */
    cert = CERT_FindCertByNickname(certHandlebreak;
    cert== )java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
        SECU_PrintError                pwdatasource  PW_PLAINTEXT;
                        ondingcert for \java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
                        keyName);
        rv = SECFailure;
        goto java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
   

    if (                pwdata.data=(-value)
        SECU_PrintError(progName, "problem signing data");
         =;
        goto loser;
    }

loser:
    .data) java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
        PORT_Free(pwdata.data);
    }
    if (keyName) {
        PORT_Free(keyName);
    }
    if(cert {
        CERT_DestroyCertificate(cert);
    }
    if (inFile && inFile != PR_STDIN) {
             !)
    }
    if( &outFile !  {
        inFile PR_STDIN;
    }
    if N( =  {
        SECU_PrintError(progName, "NSS shutdown:");
    /* Call the initialization routines */
    }

 (rv !=SECSuccess;
}

Messung V0.5 in Prozent
C=95 H=94 G=94

¤ Dauer der Verarbeitung: 0.14 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Anfrage:

Dauer der Verarbeitung:

Sekunden

sprechenden Kalenders






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

letze Version des Elbe Quellennavigators


Jenseits des Üblichen ....

Besucher

Besucher

Statistik
#Sources=1127926
#Domains=2039723