security/nss/lib/crmf/crmfenc.c

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C; tab-width: 8 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #include "crmf.h"
     8 #include "crmfi.h"
    10 SECStatus 
    11 CRMF_EncodeCertReqMsg(CRMFCertReqMsg            *inCertReqMsg,
    12 		      CRMFEncoderOutputCallback  fn,
    13 		      void                      *arg)
    14 {
    15     struct crmfEncoderOutput output;
    17     output.fn        = fn;
    18     output.outputArg = arg;
    19     return SEC_ASN1Encode(inCertReqMsg,CRMFCertReqMsgTemplate, 
    20 			  crmf_encoder_out, &output);
    22 }
    25 SECStatus
    26 CRMF_EncodeCertRequest(CRMFCertRequest           *inCertReq,
    27 		       CRMFEncoderOutputCallback  fn,
    28 		       void                      *arg)
    29 {
    30     struct crmfEncoderOutput output;
    32     output.fn        = fn;
    33     output.outputArg = arg;
    34     return SEC_ASN1Encode(inCertReq, CRMFCertRequestTemplate, 
    35 			  crmf_encoder_out, &output);
    36 }
    38 SECStatus
    39 CRMF_EncodeCertReqMessages(CRMFCertReqMsg              **inCertReqMsgs,
    40 			   CRMFEncoderOutputCallback     fn,
    41 			   void                         *arg)
    42 {
    43     struct crmfEncoderOutput output;
    44     CRMFCertReqMessages msgs;
    46     output.fn        = fn;
    47     output.outputArg = arg;
    48     msgs.messages = inCertReqMsgs;
    49     return SEC_ASN1Encode(&msgs, CRMFCertReqMessagesTemplate,
    50 			  crmf_encoder_out, &output);
    51 }

mercurial