int X509_verify(X509 *a, EVP_PKEY *r)
{
return(ASN1_item_verify(&X509_CINF_it,a->sig_alg,
- a->signature,(char *)a->cert_info,r));
+ a->signature,a->cert_info,r));
}
int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r)
{
return( ASN1_item_verify(&X509_REQ_INFO_it,
- a->sig_alg,a->signature,(char *)a->req_info,r));
+ a->sig_alg,a->signature,a->req_info,r));
}
int X509_CRL_verify(X509_CRL *a, EVP_PKEY *r)
{
return(ASN1_item_verify(&X509_CRL_INFO_it,
- a->sig_alg, a->signature,(char *)a->crl,r));
+ a->sig_alg, a->signature,a->crl,r));
}
int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a, EVP_PKEY *r)
{
return(ASN1_item_verify(&NETSCAPE_SPKAC_it,
- a->sig_algor,a->signature, (char *)a->spkac,r));
+ a->sig_algor,a->signature,a->spkac,r));
}
int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md)
{
return(ASN1_item_sign(&X509_CINF_it, x->cert_info->signature,
- x->sig_alg, x->signature, (char *)x->cert_info,pkey,md));
+ x->sig_alg, x->signature, x->cert_info,pkey,md));
}
int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md)
{
return(ASN1_item_sign(&X509_REQ_INFO_it,x->sig_alg, NULL,
- x->signature, (char *)x->req_info,pkey,md));
+ x->signature, x->req_info,pkey,md));
}
int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md)
{
return(ASN1_item_sign(&X509_CRL_INFO_it,x->crl->sig_alg,
- x->sig_alg, x->signature, (char *)x->crl,pkey,md));
+ x->sig_alg, x->signature, x->crl,pkey,md));
}
int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md)
{
return(ASN1_item_sign(&NETSCAPE_SPKAC_it, x->sig_algor,NULL,
- x->signature, (char *)x->spkac,pkey,md));
+ x->signature, x->spkac,pkey,md));
}
X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa)
#ifndef NO_FP_API
X509 *d2i_X509_fp(FILE *fp, X509 **x509)
{
- return((X509 *)ASN1_d2i_fp((char *(*)())X509_new,
- (char *(*)())d2i_X509, (fp),(unsigned char **)(x509)));
+ return ASN1_item_d2i_fp(&X509_it, fp, x509);
}
int i2d_X509_fp(FILE *fp, X509 *x509)
{
- return(ASN1_i2d_fp(i2d_X509,fp,(unsigned char *)x509));
+ return ASN1_item_i2d_fp(&X509_it, fp, x509);
}
#endif
X509 *d2i_X509_bio(BIO *bp, X509 **x509)
{
- return((X509 *)ASN1_d2i_bio((char *(*)())X509_new,
- (char *(*)())d2i_X509, (bp),(unsigned char **)(x509)));
+ return ASN1_item_d2i_bio(&X509_it, bp, x509);
}
int i2d_X509_bio(BIO *bp, X509 *x509)
{
- return(ASN1_i2d_bio(i2d_X509,bp,(unsigned char *)x509));
+ return ASN1_item_i2d_bio(&X509_it, bp, x509);
}
X509_CRL *X509_CRL_dup(X509_CRL *crl)
#ifndef NO_FP_API
X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl)
{
- return((X509_CRL *)ASN1_d2i_fp((char *(*)())
- X509_CRL_new,(char *(*)())d2i_X509_CRL, (fp),
- (unsigned char **)(crl)));
+ return ASN1_item_d2i_fp(&X509_CRL_it, fp, crl);
}
int i2d_X509_CRL_fp(FILE *fp, X509_CRL *crl)
{
- return(ASN1_i2d_fp(i2d_X509_CRL,fp,(unsigned char *)crl));
+ return ASN1_item_i2d_fp(&X509_CRL_it, fp, crl);
}
#endif
X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl)
{
- return((X509_CRL *)ASN1_d2i_bio((char *(*)())
- X509_CRL_new,(char *(*)())d2i_X509_CRL, (bp),
- (unsigned char **)(crl)));
+ return ASN1_item_d2i_bio(&X509_CRL_it, bp, crl);
}
int i2d_X509_CRL_bio(BIO *bp, X509_CRL *crl)
{
- return(ASN1_i2d_bio(i2d_X509_CRL,bp,(unsigned char *)crl));
+ return ASN1_item_i2d_bio(&X509_CRL_it, bp, crl);
}
PKCS7 *PKCS7_dup(PKCS7 *p7)
#ifndef NO_FP_API
PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7)
{
- return((PKCS7 *)ASN1_d2i_fp((char *(*)())
- PKCS7_new,(char *(*)())d2i_PKCS7, (fp),
- (unsigned char **)(p7)));
+ return ASN1_item_d2i_fp(&PKCS7_it, fp, p7);
}
int i2d_PKCS7_fp(FILE *fp, PKCS7 *p7)
{
- return(ASN1_i2d_fp(i2d_PKCS7,fp,(unsigned char *)p7));
+ return ASN1_item_i2d_fp(&PKCS7_it, fp, p7);
}
#endif
PKCS7 *d2i_PKCS7_bio(BIO *bp, PKCS7 **p7)
{
- return((PKCS7 *)ASN1_d2i_bio((char *(*)())
- PKCS7_new,(char *(*)())d2i_PKCS7, (bp),
- (unsigned char **)(p7)));
+ return ASN1_item_d2i_bio(&PKCS7_it, bp, p7);
}
int i2d_PKCS7_bio(BIO *bp, PKCS7 *p7)
{
- return(ASN1_i2d_bio(i2d_PKCS7,bp,(unsigned char *)p7));
+ return ASN1_item_i2d_bio(&PKCS7_it, bp, p7);
}
X509_REQ *X509_REQ_dup(X509_REQ *req)
#ifndef NO_FP_API
X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req)
{
- return((X509_REQ *)ASN1_d2i_fp((char *(*)())
- X509_REQ_new, (char *(*)())d2i_X509_REQ, (fp),
- (unsigned char **)(req)));
+ return ASN1_item_d2i_fp(&X509_REQ_it, fp, req);
}
int i2d_X509_REQ_fp(FILE *fp, X509_REQ *req)
{
- return(ASN1_i2d_fp(i2d_X509_REQ,fp,(unsigned char *)req));
+ return ASN1_item_i2d_fp(&X509_REQ_it, fp, req);
}
#endif
X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **req)
{
- return((X509_REQ *)ASN1_d2i_bio((char *(*)())
- X509_REQ_new, (char *(*)())d2i_X509_REQ, (bp),
- (unsigned char **)(req)));
+ return ASN1_item_d2i_bio(&X509_REQ_it, bp, req);
}
int i2d_X509_REQ_bio(BIO *bp, X509_REQ *req)
{
- return(ASN1_i2d_bio(i2d_X509_REQ,bp,(unsigned char *)req));
+ return ASN1_item_i2d_bio(&X509_REQ_it, bp, req);
}
#ifndef NO_RSA
#ifndef NO_FP_API
RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa)
{
- return((RSA *)ASN1_d2i_fp((char *(*)())
- RSA_new,(char *(*)())d2i_RSAPrivateKey, (fp),
- (unsigned char **)(rsa)));
+ return ASN1_item_d2i_fp(&RSAPrivateKey_it, fp, rsa);
}
int i2d_RSAPrivateKey_fp(FILE *fp, RSA *rsa)
{
- return(ASN1_i2d_fp(i2d_RSAPrivateKey,fp,(unsigned char *)rsa));
+ return ASN1_item_i2d_fp(&RSAPrivateKey_it, fp, rsa);
}
RSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa)
{
- return((RSA *)ASN1_d2i_fp((char *(*)())
- RSA_new,(char *(*)())d2i_RSAPublicKey, (fp),
- (unsigned char **)(rsa)));
+ return ASN1_item_d2i_fp(&RSAPublicKey_it, fp, rsa);
}
+
RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa)
{
return((RSA *)ASN1_d2i_fp((char *(*)())
int i2d_RSAPublicKey_fp(FILE *fp, RSA *rsa)
{
- return(ASN1_i2d_fp(i2d_RSAPublicKey,fp,(unsigned char *)rsa));
+ return ASN1_item_i2d_fp(&RSAPublicKey_it, fp, rsa);
}
int i2d_RSA_PUBKEY_fp(FILE *fp, RSA *rsa)
RSA *d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa)
{
- return((RSA *)ASN1_d2i_bio((char *(*)())
- RSA_new,(char *(*)())d2i_RSAPrivateKey, (bp),
- (unsigned char **)(rsa)));
+ return ASN1_item_d2i_bio(&RSAPrivateKey_it, bp, rsa);
}
int i2d_RSAPrivateKey_bio(BIO *bp, RSA *rsa)
{
- return(ASN1_i2d_bio(i2d_RSAPrivateKey,bp,(unsigned char *)rsa));
+ return ASN1_item_i2d_bio(&RSAPrivateKey_it, bp, rsa);
}
RSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa)
{
- return((RSA *)ASN1_d2i_bio((char *(*)())
- RSA_new,(char *(*)())d2i_RSAPublicKey, (bp),
- (unsigned char **)(rsa)));
+ return ASN1_item_d2i_bio(&RSAPublicKey_it, bp, rsa);
}
+
RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa)
{
return((RSA *)ASN1_d2i_bio((char *(*)())
int i2d_RSAPublicKey_bio(BIO *bp, RSA *rsa)
{
- return(ASN1_i2d_bio(i2d_RSAPublicKey,bp,(unsigned char *)rsa));
+ return ASN1_item_i2d_bio(&RSAPublicKey_it, bp, rsa);
}
int i2d_RSA_PUBKEY_bio(BIO *bp, RSA *rsa)