/* Copyright (C) 2003 Frédéric Giudicelli (contact_nos@yahoo.com). All rights reserved. This product includes cryptographic software written by Eric Young (eay@cryptsoft.com) This program is released under the GPL with the additional exemption that compiling, linking, and/or using OpenSSL is allowed. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ ASN1_SEQUENCE(INTERNAL_CA_CERT_SIG) = { ASN1_SIMPLE(INTERNAL_CA_CERT_SIG, signature, ASN1_BIT_STRING), ASN1_SIMPLE(INTERNAL_CA_CERT_SIG, sig_alg, X509_ALGOR), }ASN1_SEQUENCE_END(INTERNAL_CA_CERT_SIG) IMPLEMENT_PEM_CONVERT(INTERNAL_CA_CERT_SIG, "NEWPKI CERT SIGNATURE"); ASN1_SEQUENCE(INTERNAL_CA_BODY) = { ASN1_SIMPLE(INTERNAL_CA_BODY, ca_serial, ASN1_INTEGER), ASN1_SIMPLE(INTERNAL_CA_BODY, ca_type, ASN1_INTEGER), ASN1_EXP_OPT(INTERNAL_CA_BODY, lastCrl, X509_CRL, 0), }ASN1_SEQUENCE_END(INTERNAL_CA_BODY) IMPLEMENT_ASN1_ENCRYPT_SIGN(INTERNAL_CA_BODY) <-- BEGIN H HEADER COPY BLOCK --> #include #include #include /*! This structure represents the body of a CA. */ typedef struct st_INTERNAL_CA_BODY { ASN1_INTEGER * ca_type; //!< The type of CA. ASN1_INTEGER * ca_serial; //!< The current serial. X509_CRL * lastCrl; //!< The last CRL. }INTERNAL_CA_BODY; DECLARE_ASN1_ITEM(INTERNAL_CA_BODY) /*! This structure represents the signature of certificate entry. */ typedef struct st_INTERNAL_CA_CERT_SIG { ASN1_BIT_STRING * signature; //!< The signature X509_ALGOR * sig_alg; //!< The signature algo }INTERNAL_CA_CERT_SIG; DECLARE_ASN1_ITEM(INTERNAL_CA_CERT_SIG) #define INTERNAL_CA_CERT_sign(d, x,pkey) \ ASN1_item_sign(InternalCaCert::get_ASN1_ITEM(), x.get_sigAlg(), NULL, x.get_signature(), (char *)d, pkey, EVP_sha1()) #define INTERNAL_CA_CERT_verify(d, x,pkey) \ ASN1_item_verify(InternalCaCert::get_ASN1_ITEM(), x.get_sigAlg(), x.get_signature(),(char *)d, pkey) <-- END H HEADER COPY BLOCK -->