#include <Security/secasn1t.h>
extern const SecAsn1Template SecCmsIssuerAndSNTemplate[];
+#if 0
extern const SecAsn1Template SecCmsContentInfoTemplate[];
+#endif
+extern const SecAsn1Template *nss_cms_get_kea_template(SecCmsKEATemplateSelector whichTemplate);
/************************************************************************/
SEC_BEGIN_PROTOS
* we see the data we do not know how many padding bytes there are
* (always between 1 and bsize).
*/
-extern size_t
-SecCmsCipherContextDecryptLength(SecCmsCipherContextRef cc, size_t input_len, Boolean final);
+extern unsigned int
+SecCmsCipherContextDecryptLength(SecCmsCipherContextRef cc, unsigned int input_len, Boolean final);
/*
* SecCmsCipherContextEncryptLength - find the output length of the next call to encrypt.
*
* Result can be used to perform memory allocations.
*/
-extern size_t
-SecCmsCipherContextEncryptLength(SecCmsCipherContextRef cc, size_t input_len, Boolean final);
+extern unsigned int
+SecCmsCipherContextEncryptLength(SecCmsCipherContextRef cc, unsigned int input_len, Boolean final);
/*
* SecCmsCipherContextDecrypt - do the decryption
*/
extern OSStatus
SecCmsCipherContextDecrypt(SecCmsCipherContextRef cc, unsigned char *output,
- size_t *output_len_p, size_t max_output_len,
- const unsigned char *input, size_t input_len,
+ unsigned int *output_len_p, unsigned int max_output_len,
+ const unsigned char *input, unsigned int input_len,
Boolean final);
/*
*/
extern OSStatus
SecCmsCipherContextEncrypt(SecCmsCipherContextRef cc, unsigned char *output,
- size_t *output_len_p, size_t max_output_len,
- const unsigned char *input, size_t input_len,
+ unsigned int *output_len_p, unsigned int max_output_len,
+ const unsigned char *input, unsigned int input_len,
Boolean final);
/************************************************************************
extern OSStatus
SecCmsUtilEncryptSymKeyRSA(PLArenaPool *poolp, SecCertificateRef cert,
SecSymmetricKeyRef key,
- CSSM_DATA_PTR encKey);
+ SecAsn1Item * encKey);
extern OSStatus
SecCmsUtilEncryptSymKeyRSAPubKey(PLArenaPool *poolp,
SecPublicKeyRef publickey,
- SecSymmetricKeyRef bulkkey, CSSM_DATA_PTR encKey);
+ SecSymmetricKeyRef bulkkey, SecAsn1Item * encKey);
/*
* SecCmsUtilDecryptSymKeyRSA - unwrap a RSA-wrapped symmetric key
* a hardware token...
*/
extern SecSymmetricKeyRef
-SecCmsUtilDecryptSymKeyRSA(SecPrivateKeyRef privkey, CSSM_DATA_PTR encKey, SECOidTag bulkalgtag);
+SecCmsUtilDecryptSymKeyRSA(SecPrivateKeyRef privkey, SecAsn1Item * encKey, SECOidTag bulkalgtag);
extern OSStatus
SecCmsUtilEncryptSymKeyECDH(PLArenaPool *poolp, SecCertificateRef cert, SecSymmetricKeyRef key,
- CSSM_DATA_PTR encKey, CSSM_DATA_PTR ukm, SECAlgorithmID *keyEncAlg,
- CSSM_DATA_PTR originatorPubKey);
+ SecAsn1Item * encKey, SecAsn1Item * ukm, SECAlgorithmID *keyEncAlg,
+ SecAsn1Item * originatorPubKey);
extern SecSymmetricKeyRef
-SecCmsUtilDecryptSymKeyECDH(SecPrivateKeyRef privkey, CSSM_DATA_PTR encKey, CSSM_DATA_PTR ukm,
- SECAlgorithmID *keyEncAlg, SECOidTag bulkalgtag, CSSM_DATA_PTR pubKey);
+SecCmsUtilDecryptSymKeyECDH(SecPrivateKeyRef privkey, SecAsn1Item * encKey, SecAsn1Item * ukm,
+ SECAlgorithmID *keyEncAlg, SECOidTag bulkalgtag, SecAsn1Item * pubKey);
#if 0
extern OSStatus
SecCmsUtilEncryptSymKeyMISSI(PLArenaPool *poolp, SecCertificateRef cert, SecSymmetricKeyRef key,
- SECOidTag symalgtag, CSSM_DATA_PTR encKey, CSSM_DATA_PTR *pparams, void *pwfn_arg);
+ SECOidTag symalgtag, SecAsn1Item * encKey, SecAsn1Item * *pparams, void *pwfn_arg);
extern SecSymmetricKeyRef
-SecCmsUtilDecryptSymKeyMISSI(SecPrivateKeyRef privkey, CSSM_DATA_PTR encKey,
+SecCmsUtilDecryptSymKeyMISSI(SecPrivateKeyRef privkey, SecAsn1Item * encKey,
SECAlgorithmID *keyEncAlg, SECOidTag bulkalgtag, void *pwfn_arg);
extern OSStatus
SecCmsUtilEncryptSymKeyESDH(PLArenaPool *poolp, SecCertificateRef cert, SecSymmetricKeyRef key,
- CSSM_DATA_PTR encKey, CSSM_DATA_PTR ukm, SECAlgorithmID *keyEncAlg,
- CSSM_DATA_PTR originatorPubKey);
+ SecAsn1Item * encKey, SecAsn1Item * *ukm, SECAlgorithmID *keyEncAlg,
+ SecAsn1Item * originatorPubKey);
extern SecSymmetricKeyRef
-SecCmsUtilDecryptSymKeyESDH(SecPrivateKeyRef privkey, CSSM_DATA_PTR encKey,
+SecCmsUtilDecryptSymKeyESDH(SecPrivateKeyRef privkey, SecAsn1Item * encKey,
SECAlgorithmID *keyEncAlg, SECOidTag bulkalgtag, void *pwfn_arg);
#endif
* with SecCmsAttributeAddValue.
*/
extern SecCmsAttribute *
-SecCmsAttributeCreate(PRArenaPool *poolp, SECOidTag oidtag, CSSM_DATA_PTR value, Boolean encoded);
+SecCmsAttributeCreate(PRArenaPool *poolp, SECOidTag oidtag, SecAsn1Item * value, Boolean encoded);
/*
* SecCmsAttributeAddValue - add another value to an attribute
*/
extern OSStatus
-SecCmsAttributeAddValue(PLArenaPool *poolp, SecCmsAttribute *attr, CSSM_DATA_PTR value);
+SecCmsAttributeAddValue(PLArenaPool *poolp, SecCmsAttribute *attr, SecAsn1Item * value);
/*
* SecCmsAttributeGetType - return the OID tag
* - Multiple values are *not* expected.
* - Empty values are *not* expected.
*/
-extern CSSM_DATA_PTR
+extern SecAsn1Item *
SecCmsAttributeGetValue(SecCmsAttribute *attr);
/*
* SecCmsAttributeCompareValue - compare the attribute's first value against data
*/
extern Boolean
-SecCmsAttributeCompareValue(SecCmsAttribute *attr, CSSM_DATA_PTR av);
+SecCmsAttributeCompareValue(SecCmsAttribute *attr, SecAsn1Item * av);
/*
* SecCmsAttributeArrayEncode - encode an Attribute array as SET OF Attributes
* and think long and hard about the implications of making it always
* do the reordering.)
*/
-extern CSSM_DATA_PTR
-SecCmsAttributeArrayEncode(PRArenaPool *poolp, SecCmsAttribute ***attrs, CSSM_DATA_PTR dest);
+extern SecAsn1Item *
+SecCmsAttributeArrayEncode(PRArenaPool *poolp, SecCmsAttribute ***attrs, SecAsn1Item * dest);
/*
* SecCmsAttributeArrayReorder - sort attribute array by attribute's DER encoding
* SecCmsAttributeArraySetAttr - set an attribute's value in a set of attributes
*/
extern OSStatus
-SecCmsAttributeArraySetAttr(PLArenaPool *poolp, SecCmsAttribute ***attrs, SECOidTag type, CSSM_DATA_PTR value, Boolean encoded);
+SecCmsAttributeArraySetAttr(PLArenaPool *poolp, SecCmsAttribute ***attrs, SECOidTag type, SecAsn1Item * value, Boolean encoded);
/************************************************************************/
SEC_END_PROTOS