security/nss/lib/crmf/crmfenc.c

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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