📄 cert_asn.c
字号:
} /* PKIFreeDomainParameters */
size_t PKISizeofDomainParameters(
PKICONTEXT *ctx,
PKIDomainParameters *asnstruct,
int outerSizeFlag)
{
(void)ctx; /* for future use */
return(PKISizeofDomainParametersInternal(asnstruct, outerSizeFlag, PKIFALSE));
} /* PKISizeofDomainParameters */
size_t PKIPackDomainParameters(
PKICONTEXT *ctx,
unsigned char *buf,
size_t buflen,
PKIDomainParameters *asnstruct,
int *erret )
{
return(PKIPackDomainParametersInternal(ctx, buf, buflen, asnstruct, PKIID_DomainParameters, erret));
} /* PKIPackDomainParameters */
size_t PKIUnpackDomainParameters(
PKICONTEXT *ctx,
PKIDomainParameters **asnstruct,
const unsigned char *buf,
size_t buflen,
int *erret)
{
size_t bytesused;
bytesused=PKIUnpackDomainParametersInternal(ctx, asnstruct, buf, buflen,
PKIID_DomainParameters, erret);
if(*erret==0 && bytesused==0)
PKIERR(PKIErrUnpackUnderrun);
return bytesused;
}
/******************************************************************
* Routines for EDIPartyName
******************************************************************/
PKIEDIPartyName *PKINewEDIPartyName(
PKICONTEXT *ctx)
{
PKIEDIPartyName *f;
if (ctx == NULL)
return NULL;
f = (PKIEDIPartyName *)PKIAlloc(ctx->memMgr, sizeof(PKIEDIPartyName));
if (f != NULL)
(void)memset(f, 0, sizeof(PKIEDIPartyName));
return (f);
} /* PKINewEDIPartyName */
void PKIFreeEDIPartyName(
PKICONTEXT *ctx,
PKIEDIPartyName *f)
{
if (ctx == NULL)
return;
PKIDropInPlaceEDIPartyName(ctx, f);
if (f != NULL)
PKIFree(ctx->memMgr, f);
} /* PKIFreeEDIPartyName */
size_t PKISizeofEDIPartyName(
PKICONTEXT *ctx,
PKIEDIPartyName *asnstruct,
int outerSizeFlag)
{
(void)ctx; /* for future use */
return(PKISizeofEDIPartyNameInternal(asnstruct, outerSizeFlag, PKIFALSE));
} /* PKISizeofEDIPartyName */
size_t PKIPackEDIPartyName(
PKICONTEXT *ctx,
unsigned char *buf,
size_t buflen,
PKIEDIPartyName *asnstruct,
int *erret )
{
return(PKIPackEDIPartyNameInternal(ctx, buf, buflen, asnstruct, PKIID_EDIPartyName, erret));
} /* PKIPackEDIPartyName */
size_t PKIUnpackEDIPartyName(
PKICONTEXT *ctx,
PKIEDIPartyName **asnstruct,
const unsigned char *buf,
size_t buflen,
int *erret)
{
size_t bytesused;
bytesused=PKIUnpackEDIPartyNameInternal(ctx, asnstruct, buf, buflen,
PKIID_EDIPartyName, erret);
if(*erret==0 && bytesused==0)
PKIERR(PKIErrUnpackUnderrun);
return bytesused;
}
/******************************************************************
* Routines for Extensions
******************************************************************/
PKIExtensions *PKINewExtensions(
PKICONTEXT *ctx)
{
PKIExtensions *f;
if (ctx == NULL)
return NULL;
f = (PKIExtensions *)PKIAlloc(ctx->memMgr, sizeof(PKIExtensions));
if (f != NULL)
(void)memset(f, 0, sizeof(PKIExtensions));
return (f);
} /* PKINewExtensions */
void PKIFreeExtensions(
PKICONTEXT *ctx,
PKIExtensions *f)
{
if (ctx == NULL)
return;
PKIDropInPlaceExtensions(ctx, f);
if (f != NULL)
PKIFree(ctx->memMgr, f);
} /* PKIFreeExtensions */
size_t PKISizeofExtensions(
PKICONTEXT *ctx,
PKIExtensions *asnstruct,
int outerSizeFlag)
{
(void)ctx; /* for future use */
return(PKISizeofExtensionsInternal(asnstruct, outerSizeFlag, PKIFALSE));
} /* PKISizeofExtensions */
size_t PKIPackExtensions(
PKICONTEXT *ctx,
unsigned char *buf,
size_t buflen,
PKIExtensions *asnstruct,
int *erret )
{
return(PKIPackExtensionsInternal(ctx, buf, buflen, asnstruct, PKIID_Extensions, erret));
} /* PKIPackExtensions */
size_t PKIUnpackExtensions(
PKICONTEXT *ctx,
PKIExtensions **asnstruct,
const unsigned char *buf,
size_t buflen,
int *erret)
{
size_t bytesused;
bytesused=PKIUnpackExtensionsInternal(ctx, asnstruct, buf, buflen,
PKIID_Extensions, erret);
if(*erret==0 && bytesused==0)
PKIERR(PKIErrUnpackUnderrun);
return bytesused;
}
/******************************************************************
* Routines for NoticeReference
******************************************************************/
PKINoticeReference *PKINewNoticeReference(
PKICONTEXT *ctx)
{
PKINoticeReference *f;
if (ctx == NULL)
return NULL;
f = (PKINoticeReference *)PKIAlloc(ctx->memMgr, sizeof(PKINoticeReference));
if (f != NULL)
(void)memset(f, 0, sizeof(PKINoticeReference));
return (f);
} /* PKINewNoticeReference */
void PKIFreeNoticeReference(
PKICONTEXT *ctx,
PKINoticeReference *f)
{
if (ctx == NULL)
return;
PKIDropInPlaceNoticeReference(ctx, f);
if (f != NULL)
PKIFree(ctx->memMgr, f);
} /* PKIFreeNoticeReference */
size_t PKISizeofNoticeReference(
PKICONTEXT *ctx,
PKINoticeReference *asnstruct,
int outerSizeFlag)
{
(void)ctx; /* for future use */
return(PKISizeofNoticeReferenceInternal(asnstruct, outerSizeFlag, PKIFALSE));
} /* PKISizeofNoticeReference */
size_t PKIPackNoticeReference(
PKICONTEXT *ctx,
unsigned char *buf,
size_t buflen,
PKINoticeReference *asnstruct,
int *erret )
{
return(PKIPackNoticeReferenceInternal(ctx, buf, buflen, asnstruct, PKIID_NoticeReference, erret));
} /* PKIPackNoticeReference */
size_t PKIUnpackNoticeReference(
PKICONTEXT *ctx,
PKINoticeReference **asnstruct,
const unsigned char *buf,
size_t buflen,
int *erret)
{
size_t bytesused;
bytesused=PKIUnpackNoticeReferenceInternal(ctx, asnstruct, buf, buflen,
PKIID_NoticeReference, erret);
if(*erret==0 && bytesused==0)
PKIERR(PKIErrUnpackUnderrun);
return bytesused;
}
/******************************************************************
* Routines for PolicyMappings
******************************************************************/
PKIPolicyMappings *PKINewPolicyMappings(
PKICONTEXT *ctx)
{
PKIPolicyMappings *f;
if (ctx == NULL)
return NULL;
f = (PKIPolicyMappings *)PKIAlloc(ctx->memMgr, sizeof(PKIPolicyMappings));
if (f != NULL)
(void)memset(f, 0, sizeof(PKIPolicyMappings));
return (f);
} /* PKINewPolicyMappings */
void PKIFreePolicyMappings(
PKICONTEXT *ctx,
PKIPolicyMappings *f)
{
if (ctx == NULL)
return;
PKIDropInPlacePolicyMappings(ctx, f);
if (f != NULL)
PKIFree(ctx->memMgr, f);
} /* PKIFreePolicyMappings */
size_t PKISizeofPolicyMappings(
PKICONTEXT *ctx,
PKIPolicyMappings *asnstruct,
int outerSizeFlag)
{
(void)ctx; /* for future use */
return(PKISizeofPolicyMappingsInternal(asnstruct, outerSizeFlag, PKIFALSE));
} /* PKISizeofPolicyMappings */
size_t PKIPackPolicyMappings(
PKICONTEXT *ctx,
unsigned char *buf,
size_t buflen,
PKIPolicyMappings *asnstruct,
int *erret )
{
return(PKIPackPolicyMappingsInternal(ctx, buf, buflen, asnstruct, PKIID_PolicyMappings, erret));
} /* PKIPackPolicyMappings */
size_t PKIUnpackPolicyMappings(
PKICONTEXT *ctx,
PKIPolicyMappings **asnstruct,
const unsigned char *buf,
size_t buflen,
int *erret)
{
size_t bytesused;
bytesused=PKIUnpackPolicyMappingsInternal(ctx, asnstruct, buf, buflen,
PKIID_PolicyMappings, erret);
if(*erret==0 && bytesused==0)
PKIERR(PKIErrUnpackUnderrun);
return bytesused;
}
/******************************************************************
* Routines for RelativeDistinguishedName
******************************************************************/
PKIRelativeDistinguishedName *PKINewRelativeDistinguishedName(
PKICONTEXT *ctx)
{
PKIRelativeDistinguishedName *f;
if (ctx == NULL)
return NULL;
f = (PKIRelativeDistinguishedName *)PKIAlloc(ctx->memMgr, sizeof(PKIRelativeDistinguishedName));
if (f != NULL)
(void)memset(f, 0, sizeof(PKIRelativeDistinguishedName));
return (f);
} /* PKINewRelativeDistinguishedName */
void PKIFreeRelativeDistinguishedName(
PKICONTEXT *ctx,
PKIRelativeDistinguishedName *f)
{
if (ctx == NULL)
return;
PKIDropInPlaceRelativeDistinguishedName(ctx, f);
if (f != NULL)
PKIFree(ctx->memMgr, f);
} /* PKIFreeRelativeDistinguishedName */
size_t PKISizeofRelativeDistinguishedName(
PKICONTEXT *ctx,
PKIRelativeDistinguishedName *asnstruct,
int outerSizeFlag)
{
(void)ctx; /* for future use */
return(PKISizeofRelativeDistinguishedNameInternal(asnstruct, outerSizeFlag, PKIFALSE));
} /* PKISizeofRelativeDistinguishedName */
size_t PKIPackRelativeDistinguishedName(
PKICONTEXT *ctx,
unsigned char *buf,
size_t buflen,
PKIRelativeDistinguishedName *asnstruct,
int *erret )
{
return(PKIPackRelativeDistinguishedNameInternal(ctx, buf, buflen, asnstruct, PKIID_RelativeDistinguishedName, erret));
} /* PKIPackRelativeDistinguishedName */
size_t PKIUnpackRelativeDistinguishedName(
PKICONTEXT *ctx,
PKIRelativeDistinguishedName **asnstruct,
const unsigned char *buf,
size_t buflen,
int *erret)
{
size_t bytesused;
bytesused=PKIUnpackRelativeDistinguishedNameInternal(ctx, asnstruct, buf, buflen,
PKIID_RelativeDistinguishedName, erret);
if(*erret==0 && bytesused==0)
PKIERR(PKIErrUnpackUnderrun);
return bytesused;
}
/******************************************************************
* Routines for SubjectPublicKeyInfo
******************************************************************/
PKISubjectPublicKeyInfo *PKINewSubjectPublicKeyInfo(
PKICONTEXT *ctx)
{
PKISubjectPublicKeyInfo *f;
if (ctx == NULL)
return NULL;
f = (PKISubjectPublicKeyInfo *)PKIAlloc(ctx->memMgr, sizeof(PKISubjectPublicKeyInfo));
if (f != NULL)
(void)memset(f, 0, sizeof(PKISubjectPublicKeyInfo));
return (f);
} /* PKINewSubjectPublicKeyInfo */
void PKIFreeSubjectPublicKeyInfo(
PKICONTEXT *ctx,
PKISubjectPublicKeyInfo *f)
{
if (ctx == NULL)
return;
PKIDropInPlaceSubjectPublicKeyInfo(ctx, f);
if (f != NULL)
PKIFree(ctx->memMgr, f);
} /* PKIFreeSubjectPublicKeyInfo */
size_t PKISizeofSubjectPublicKeyInfo(
PKICONTEXT *ctx,
PKISubjectPublicKeyInfo *asnstruct,
int outerSizeFlag)
{
(void)ctx; /* for future use */
return(PKISizeofSubjectPublicKeyInfoInternal(asnstruct, outerSizeFlag, PKIFALSE));
} /* PKISizeofSubjectPublicKeyInfo */
size_t PKIPackSubjectPublicKeyInfo(
PKICONTEXT *ctx,
unsigned char *buf,
size_t buflen,
PKISubjectPublicKeyInfo *asnstruct,
int *erret )
{
return(PKIPackSubjectPublicKeyInfoInternal(ctx, buf, buflen, asnstruct, PKIID_SubjectPublicKeyInfo, erret));
} /* PKIPackSubjectPublicKeyInfo */
size_t PKIUnpackSubjectPublicKeyInfo(
PKICONTEXT *ctx,
PKISubjectPublicKeyInfo **asnstruct,
const unsigned char *buf,
size_t buflen,
int *erret)
{
size_t bytesused;
bytesused=PKIUnpackSubjectPublicKeyInfoInternal(ctx, asnstruct, buf, buflen,
PKIID_SubjectPublicKeyInfo, erret);
if(*erret==0 && bytesused==0)
PKIERR(PKIErrUnpackUnderrun);
return bytesused;
}
/******************************************************************
* Routines for Validity
******************************************************************/
PKIValidity *PKINewValidity(
PKICONTEXT *ctx)
{
PKIValidity *f;
if (ctx == NULL)
return NULL;
f = (PKIValidity *)PKIAlloc(ctx->memMgr, sizeof(PKIValidity));
if (f != NULL)
(void)memset(f, 0, sizeof(PKIValidity));
return (f);
} /* PKINewValidity */
void PKIFreeValidity(
PKICONTEXT *ctx,
PKIValidity *f)
{
if (ctx == NULL)
return;
PKIDropInPlaceValidity(ctx, f);
if (f != NULL)
PKIFree(ctx->memMgr, f);
} /* PKIFreeValidity */
size_t PKISizeofValidity(
PKICONTEXT *ctx,
PKIValidity *asnstruct,
int outerSizeFlag)
{
(void)ctx; /* for future use */
return(PKISizeofValidityInternal(asnstruct, outerSizeFlag, PKIFALSE));
} /* PKISizeofValidity */
size_t PKIPackValidity(
PKICONTEXT *ctx,
unsigned char *buf,
size_t buflen,
PKIValidity *asnstruct,
int *erret )
{
return(PKIPackValidityInternal(ctx, buf, buflen, asnstruct, PKIID_Validity, erret));
} /* PKIPackValidity */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -