Пример #1
0
AC_FULL_ATTRIBUTES *AC_FULL_ATTRIBUTES_new()
{
  AC_FULL_ATTRIBUTES *ret = NULL;
  ASN1_CTX c;

  M_ASN1_New_Malloc(ret, AC_FULL_ATTRIBUTES);
  M_ASN1_New(ret->providers, sk_AC_ATT_HOLDER_new_null);
  return ret;
  M_ASN1_New_Error(AC_F_AC_FULL_ATTRIBUTES_New);
}
Пример #2
0
pkcs7_issuer_and_subject *pkcs7_issuer_and_subject_new(void) {

	pkcs7_issuer_and_subject *ret=NULL;
	ASN1_CTX c;
	M_ASN1_New_Malloc(ret,pkcs7_issuer_and_subject);
	M_ASN1_New(ret->issuer,X509_NAME_new);
	M_ASN1_New(ret->subject,X509_NAME_new);
	return(ret);
	M_ASN1_New_Error(199);
}
Пример #3
0
AC_TARGETS *AC_TARGETS_new()
{
  AC_TARGETS *ret=NULL;
  ASN1_CTX c;

  M_ASN1_New_Malloc(ret, AC_TARGETS);
  M_ASN1_New(ret->targets, sk_AC_TARGET_new_null);
  return ret;
  M_ASN1_New_Error(AC_F_AC_TARGETS_New);
}
Пример #4
0
AC_CERTS *AC_CERTS_new()
{
  AC_CERTS *ret=NULL;
  ASN1_CTX c;

  M_ASN1_New_Malloc(ret, AC_CERTS);
  M_ASN1_New(ret->stackcert, sk_X509_new_null);
  return ret;
  M_ASN1_New_Error(AC_F_X509_New);
}
GENERAL_NAME *GENERAL_NAME_new()
{
	GENERAL_NAME *ret=NULL;
	ASN1_CTX c;
	M_ASN1_New_Malloc(ret, GENERAL_NAME);
	ret->type = -1;
	ret->d.ptr = NULL;
	return (ret);
	M_ASN1_New_Error(ASN1_F_GENERAL_NAME_NEW);
}
PBE2PARAM *PBE2PARAM_new(void)
{
	PBE2PARAM *ret=NULL;
	ASN1_CTX c;
	M_ASN1_New_Malloc(ret, PBE2PARAM);
	M_ASN1_New(ret->keyfunc,X509_ALGOR_new);
	M_ASN1_New(ret->encryption,X509_ALGOR_new);
	return (ret);
	M_ASN1_New_Error(ASN1_F_PBE2PARAM_NEW);
}
Пример #7
0
AC_SEQ *AC_SEQ_new()
{
  AC_SEQ *ret = NULL;
  ASN1_CTX c;

  M_ASN1_New_Malloc(ret, AC_SEQ);
  M_ASN1_New(ret->acs, sk_AC_new_null);
  return ret;
  M_ASN1_New_Error(AC_F_AC_SEQ_new);
}
Пример #8
0
PKCS7_ENCRYPT *PKCS7_ENCRYPT_new(void)
{
    PKCS7_ENCRYPT *ret=NULL;
    ASN1_CTX c;

    M_ASN1_New_Malloc(ret,PKCS7_ENCRYPT);
    M_ASN1_New(ret->version,M_ASN1_INTEGER_new);
    M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new);
    return(ret);
    M_ASN1_New_Error(ASN1_F_PKCS7_ENCRYPT_NEW);
}
Пример #9
0
NETSCAPE_CERT_SEQUENCE *NETSCAPE_CERT_SEQUENCE_new(void)
{
	NETSCAPE_CERT_SEQUENCE *ret=NULL;
	ASN1_CTX c;
	M_ASN1_New_Malloc(ret, NETSCAPE_CERT_SEQUENCE);
	/* Note hardcoded object type */
	ret->type = OBJ_nid2obj(NID_netscape_cert_sequence);
	ret->certs = NULL;
	return (ret);
	M_ASN1_New_Error(ASN1_F_NETSCAPE_CERT_SEQUENCE_NEW);
}
Пример #10
0
X509_ALGOR *X509_ALGOR_new(void)
	{
	X509_ALGOR *ret=NULL;
	ASN1_CTX c;

	M_ASN1_New_Malloc(ret,X509_ALGOR);
	ret->algorithm=OBJ_nid2obj(NID_undef);
	ret->parameter=NULL;
	return(ret);
	M_ASN1_New_Error(ASN1_F_X509_ALGOR_NEW);
	}
Пример #11
0
X509_SIG *X509_SIG_new(void)
{
    X509_SIG *ret=NULL;
    ASN1_CTX c;

    M_ASN1_New_Malloc(ret,X509_SIG);
    M_ASN1_New(ret->algor,X509_ALGOR_new);
    M_ASN1_New(ret->digest,M_ASN1_OCTET_STRING_new);
    return(ret);
    M_ASN1_New_Error(ASN1_F_X509_SIG_NEW);
}
Пример #12
0
PKCS12_MAC_DATA *PKCS12_MAC_DATA_new(void)
{
	PKCS12_MAC_DATA *ret=NULL;
	ASN1_CTX c;
	M_ASN1_New_Malloc(ret, PKCS12_MAC_DATA);
	ret->dinfo = X509_SIG_new();
	ret->salt = M_ASN1_OCTET_STRING_new();
	ret->iter = NULL;
	return(ret);
	M_ASN1_New_Error(ASN1_F_PKCS12_MAC_DATA_NEW);
}
Пример #13
0
AC_TARGET *AC_TARGET_new(void)
{
  AC_TARGET *ret=NULL;
  ASN1_CTX c;

  M_ASN1_New_Malloc(ret, AC_TARGET);
  ret->name = ret->group = NULL;
  ret->cert = NULL;
  return ret;
  M_ASN1_New_Error(AC_F_AC_TARGET_New);
}
Пример #14
0
X509_PUBKEY *X509_PUBKEY_new(void)
	{
	X509_PUBKEY *ret=NULL;
	ASN1_CTX c;

	M_ASN1_New_Malloc(ret,X509_PUBKEY);
	M_ASN1_New(ret->algor,X509_ALGOR_new);
	M_ASN1_New(ret->public_key,M_ASN1_BIT_STRING_new);
	ret->pkey=NULL;
	return(ret);
	M_ASN1_New_Error(ASN1_F_X509_PUBKEY_NEW);
	}
PBKDF2PARAM *PBKDF2PARAM_new(void)
{
	PBKDF2PARAM *ret=NULL;
	ASN1_CTX c;
	M_ASN1_New_Malloc(ret, PBKDF2PARAM);
	M_ASN1_New(ret->salt, ASN1_TYPE_new);
	M_ASN1_New(ret->iter, M_ASN1_INTEGER_new);
	ret->keylength = NULL;
	ret->prf = NULL;
	return (ret);
	M_ASN1_New_Error(ASN1_F_PBKDF2PARAM_NEW);
}
X509_ATTRIBUTE *X509_ATTRIBUTE_new(void)
{
    X509_ATTRIBUTE *ret=NULL;
    ASN1_CTX c;

    M_ASN1_New_Malloc(ret,X509_ATTRIBUTE);
    ret->object=OBJ_nid2obj(NID_undef);
    ret->set=0;
    ret->value.ptr=NULL;
    return(ret);
    M_ASN1_New_Error(ASN1_F_X509_ATTRIBUTE_NEW);
}
Пример #17
0
AC_ATT_HOLDER *AC_ATT_HOLDER_new()
{
  AC_ATT_HOLDER *ret = NULL;
  ASN1_CTX c;

  M_ASN1_New_Malloc(ret, AC_ATT_HOLDER);
  M_ASN1_New(ret->grantor, sk_GENERAL_NAME_new_null);
  M_ASN1_New(ret->attributes, sk_AC_ATTRIBUTE_new_null);
  return ret;

  M_ASN1_New_Error(AC_F_AC_ATT_HOLDER_New);
}
Пример #18
0
AC_ATTRIBUTE *AC_ATTRIBUTE_new()
{
  AC_ATTRIBUTE *ret = NULL;
  ASN1_CTX c;
  M_ASN1_New_Malloc(ret, AC_ATTRIBUTE);
  M_ASN1_New(ret->name,      ASN1_OCTET_STRING_new);
  M_ASN1_New(ret->value,     ASN1_OCTET_STRING_new);
  M_ASN1_New(ret->qualifier, ASN1_OCTET_STRING_new);

  return ret;
  M_ASN1_New_Error(AC_F_ATTRIBUTE_New);
}
Пример #19
0
static NETSCAPE_PKEY *NETSCAPE_PKEY_new(void)
	{
	NETSCAPE_PKEY *ret=NULL;
	ASN1_CTX c;

	M_ASN1_New_Malloc(ret,NETSCAPE_PKEY);
	M_ASN1_New(ret->version,M_ASN1_INTEGER_new);
	M_ASN1_New(ret->algor,X509_ALGOR_new);
	M_ASN1_New(ret->private_key,M_ASN1_OCTET_STRING_new);
	return(ret);
	M_ASN1_New_Error(ASN1_F_NETSCAPE_PKEY_NEW);
	}
Пример #20
0
ASN1_HEADER *ASN1_HEADER_new(void)
	{
	ASN1_HEADER *ret=NULL;
	ASN1_CTX c;

	M_ASN1_New_Malloc(ret,ASN1_HEADER);
	M_ASN1_New(ret->header,M_ASN1_OCTET_STRING_new);
	ret->meth=NULL;
	ret->data=NULL;
	return(ret);
        M_ASN1_New_Error(ASN1_F_ASN1_HEADER_NEW);
	}
PKCS12_SAFEBAG *PKCS12_SAFEBAG_new(void)
{
	PKCS12_SAFEBAG *ret=NULL;
	ASN1_CTX c;
	M_ASN1_New_Malloc(ret, PKCS12_SAFEBAG);
	ret->type=NULL;
	ret->value.other=NULL;
	M_ASN1_New(ret->attrib, sk_X509_ATTRIBUTE_new_null);
	ret->rest=NULL;
	return (ret);
	M_ASN1_New_Error(ASN1_F_PKCS12_SAFEBAG_NEW);
}
Пример #22
0
X509_EXTENSION *X509_EXTENSION_new(void)
	{
	X509_EXTENSION *ret=NULL;
	ASN1_CTX c;

	M_ASN1_New_Malloc(ret,X509_EXTENSION);
	ret->object=OBJ_nid2obj(NID_undef);
	M_ASN1_New(ret->value,M_ASN1_OCTET_STRING_new);
	ret->critical=0;
	ret->netscape_hack=0;
	return(ret);
	M_ASN1_New_Error(ASN1_F_X509_EXTENSION_NEW);
	}
Пример #23
0
/**
 * @ingroup proxypolicy
 *
 * Allocates and initializes a new PROXYPOLICY structure.
 *
 * @return pointer to the new PROXYPOLICY
 */
PROXYPOLICY * PROXYPOLICY_new()
{
    ASN1_CTX                            c;
    PROXYPOLICY *                       ret;

    ret = NULL;

    M_ASN1_New_Malloc(ret, PROXYPOLICY);
    ret->policy_language = OBJ_nid2obj(OBJ_txt2nid(IMPERSONATION_PROXY_OID));
    ret->policy = NULL;
    return (ret);
    M_ASN1_New_Error(ASN1_F_PROXYPOLICY_NEW);
}
Пример #24
0
X509_NAME_ENTRY *X509_NAME_ENTRY_new(void)
{
    X509_NAME_ENTRY *ret=NULL;
    ASN1_CTX c;

    M_ASN1_New_Malloc(ret,X509_NAME_ENTRY);
    /*	M_ASN1_New(ret->object,ASN1_OBJECT_new);*/
    ret->object=NULL;
    ret->set=0;
    M_ASN1_New(ret->value,ASN1_STRING_new);
    return(ret);
    M_ASN1_New_Error(ASN1_F_X509_NAME_ENTRY_NEW);
}
Пример #25
0
PKCS8_PRIV_KEY_INFO *PKCS8_PRIV_KEY_INFO_new(void)
{
	PKCS8_PRIV_KEY_INFO *ret=NULL;
	ASN1_CTX c;
	M_ASN1_New_Malloc(ret, PKCS8_PRIV_KEY_INFO);
	M_ASN1_New (ret->version, M_ASN1_INTEGER_new);
	M_ASN1_New (ret->pkeyalg, X509_ALGOR_new);
	M_ASN1_New (ret->pkey, ASN1_TYPE_new);
	ret->attributes = NULL;
	ret->broken = PKCS8_OK;
	return (ret);
	M_ASN1_New_Error(ASN1_F_PKCS8_PRIV_KEY_INFO_NEW);
}
Пример #26
0
DLA3_QUERYURL *DLA3_QUERYURL_new(void)
{
	DLA3_QUERYURL *ret=NULL;
	ASN1_CTX c;
	M_ASN1_New_Malloc(ret, DLA3_QUERYURL);
	ret->queryUrl = NULL;
	return (ret);
#if 0
	M_ASN1_New_Error(ASN1_F_DLA3_QUERYURL_NEW);
#else
err2:
	return(NULL);
#endif
}
Пример #27
0
KCA_VERSION *KCA_VERSION_new(void)
{
	KCA_VERSION *ret=NULL;
	ASN1_CTX c;
	M_ASN1_New_Malloc(ret, KCA_VERSION);
	ret->Version = NULL;
	return (ret);
#if 0
	M_ASN1_New_Error(ASN1_F_KCA_VERSION_NEW);
#else
err2:
	return(NULL);
#endif
}
Пример #28
0
X509_NAME *X509_NAME_new(void)
{
    X509_NAME *ret=NULL;
    ASN1_CTX c;

    M_ASN1_New_Malloc(ret,X509_NAME);
    if ((ret->entries=sk_X509_NAME_ENTRY_new_null()) == NULL)
    {
        c.line=__LINE__;
        goto err2;
    }
    M_ASN1_New(ret->bytes,BUF_MEM_new);
    ret->modified=1;
    return(ret);
    M_ASN1_New_Error(ASN1_F_X509_NAME_NEW);
}
Пример #29
0
PKCS7_SIGNER_INFO *PKCS7_SIGNER_INFO_new(void)
	{
	PKCS7_SIGNER_INFO *ret=NULL;
	ASN1_CTX c;

	M_ASN1_New_Malloc(ret,PKCS7_SIGNER_INFO);
	M_ASN1_New(ret->version,M_ASN1_INTEGER_new);
	M_ASN1_New(ret->issuer_and_serial,PKCS7_ISSUER_AND_SERIAL_new);
	M_ASN1_New(ret->digest_alg,X509_ALGOR_new);
	ret->auth_attr=NULL;
	M_ASN1_New(ret->digest_enc_alg,X509_ALGOR_new);
	M_ASN1_New(ret->enc_digest,M_ASN1_OCTET_STRING_new);
	ret->unauth_attr=NULL;
	ret->pkey=NULL;
	return(ret);
	M_ASN1_New_Error(ASN1_F_PKCS7_SIGNER_INFO_NEW);
	}
Пример #30
0
X509_PKEY *X509_PKEY_new(void)
	{
	X509_PKEY *ret=NULL;
	ASN1_CTX c;

	M_ASN1_New_Malloc(ret,X509_PKEY);
	ret->version=0;
	M_ASN1_New(ret->enc_algor,X509_ALGOR_new);
	M_ASN1_New(ret->enc_pkey,M_ASN1_OCTET_STRING_new);
	ret->dec_pkey=NULL;
	ret->key_length=0;
	ret->key_data=NULL;
	ret->key_free=0;
	ret->cipher.cipher=NULL;
	memset(ret->cipher.iv,0,EVP_MAX_IV_LENGTH);
	ret->references=1;
	return(ret);
	M_ASN1_New_Error(ASN1_F_X509_PKEY_NEW);
	}