Update util/ck_errf.pl script, and have it run automatically
during "make errors" and thus during "make update". Fix lots of bugs that util/ck_errf.pl can detect automatically. Various others of these are still left to fix; that's why "make update" will complain loudly when run now.
This commit is contained in:
parent
ee2262b8d7
commit
fbeaa3c47d
@ -366,6 +366,7 @@ tags:
|
|||||||
errors:
|
errors:
|
||||||
$(PERL) util/mkerr.pl -recurse -write
|
$(PERL) util/mkerr.pl -recurse -write
|
||||||
(cd engines; $(MAKE) PERL=$(PERL) errors)
|
(cd engines; $(MAKE) PERL=$(PERL) errors)
|
||||||
|
$(PERL) util/ck_errf.pl */*.c */*/*.c
|
||||||
|
|
||||||
stacks:
|
stacks:
|
||||||
$(PERL) util/mkstack.pl -write
|
$(PERL) util/mkstack.pl -write
|
||||||
|
@ -600,6 +600,19 @@ pkcs8.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
|||||||
pkcs8.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
pkcs8.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||||
pkcs8.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
pkcs8.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||||
pkcs8.o: ../include/openssl/x509_vfy.h apps.h pkcs8.c
|
pkcs8.o: ../include/openssl/x509_vfy.h apps.h pkcs8.c
|
||||||
|
prime.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||||
|
prime.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||||
|
prime.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||||
|
prime.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||||
|
prime.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||||
|
prime.o: ../include/openssl/engine.h ../include/openssl/evp.h
|
||||||
|
prime.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||||
|
prime.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||||
|
prime.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||||
|
prime.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||||
|
prime.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||||
|
prime.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||||
|
prime.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h prime.c
|
||||||
rand.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
rand.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||||
rand.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
rand.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||||
rand.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
rand.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||||
|
@ -127,7 +127,7 @@ void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x)
|
|||||||
|
|
||||||
if ((b=BIO_new(BIO_s_file())) == NULL)
|
if ((b=BIO_new(BIO_s_file())) == NULL)
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_ASN1_D2I_FP,ERR_R_BUF_LIB);
|
ASN1err(ASN1_F_ASN1_ITEM_D2I_FP,ERR_R_BUF_LIB);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
BIO_set_fp(b,in,BIO_NOCLOSE);
|
BIO_set_fp(b,in,BIO_NOCLOSE);
|
||||||
@ -158,7 +158,7 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
|
|||||||
b=BUF_MEM_new();
|
b=BUF_MEM_new();
|
||||||
if (b == NULL)
|
if (b == NULL)
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_ASN1_D2I_BIO,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_ASN1_D2I_READ_BIO,ERR_R_MALLOC_FAILURE);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,13 +171,13 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
|
|||||||
|
|
||||||
if (!BUF_MEM_grow_clean(b,len+want))
|
if (!BUF_MEM_grow_clean(b,len+want))
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_ASN1_D2I_BIO,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_ASN1_D2I_READ_BIO,ERR_R_MALLOC_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
i=BIO_read(in,&(b->data[len]),want);
|
i=BIO_read(in,&(b->data[len]),want);
|
||||||
if ((i < 0) && ((len-off) == 0))
|
if ((i < 0) && ((len-off) == 0))
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_ASN1_D2I_BIO,ASN1_R_NOT_ENOUGH_DATA);
|
ASN1err(ASN1_F_ASN1_D2I_READ_BIO,ASN1_R_NOT_ENOUGH_DATA);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
@ -226,7 +226,7 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
|
|||||||
want-=(len-off);
|
want-=(len-off);
|
||||||
if (!BUF_MEM_grow_clean(b,len+want))
|
if (!BUF_MEM_grow_clean(b,len+want))
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_ASN1_D2I_BIO,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_ASN1_D2I_READ_BIO,ERR_R_MALLOC_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
while (want > 0)
|
while (want > 0)
|
||||||
@ -234,7 +234,7 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
|
|||||||
i=BIO_read(in,&(b->data[len]),want);
|
i=BIO_read(in,&(b->data[len]),want);
|
||||||
if (i <= 0)
|
if (i <= 0)
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_ASN1_D2I_BIO,
|
ASN1err(ASN1_F_ASN1_D2I_READ_BIO,
|
||||||
ASN1_R_NOT_ENOUGH_DATA);
|
ASN1_R_NOT_ENOUGH_DATA);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ void *ASN1_item_dup(const ASN1_ITEM *it, void *x)
|
|||||||
|
|
||||||
i=ASN1_item_i2d(x,&b,it);
|
i=ASN1_item_i2d(x,&b,it);
|
||||||
if (b == NULL)
|
if (b == NULL)
|
||||||
{ ASN1err(ASN1_F_ASN1_DUP,ERR_R_MALLOC_FAILURE); return(NULL); }
|
{ ASN1err(ASN1_F_ASN1_ITEM_DUP,ERR_R_MALLOC_FAILURE); return(NULL); }
|
||||||
p= b;
|
p= b;
|
||||||
ret=ASN1_item_d2i(NULL,&p,i, it);
|
ret=ASN1_item_d2i(NULL,&p,i, it);
|
||||||
OPENSSL_free(b);
|
OPENSSL_free(b);
|
||||||
|
@ -124,7 +124,7 @@ int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x)
|
|||||||
|
|
||||||
if ((b=BIO_new(BIO_s_file())) == NULL)
|
if ((b=BIO_new(BIO_s_file())) == NULL)
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_ASN1_I2D_FP,ERR_R_BUF_LIB);
|
ASN1err(ASN1_F_ASN1_ITEM_I2D_FP,ERR_R_BUF_LIB);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
BIO_set_fp(b,out,BIO_NOCLOSE);
|
BIO_set_fp(b,out,BIO_NOCLOSE);
|
||||||
@ -142,7 +142,7 @@ int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x)
|
|||||||
n = ASN1_item_i2d(x, &b, it);
|
n = ASN1_item_i2d(x, &b, it);
|
||||||
if (b == NULL)
|
if (b == NULL)
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_ASN1_I2D_BIO,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_ASN1_ITEM_I2D_BIO,ERR_R_MALLOC_FAILURE);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -256,7 +256,7 @@ ASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **pp,
|
|||||||
*pp=pend;
|
*pp=pend;
|
||||||
return(ret);
|
return(ret);
|
||||||
err:
|
err:
|
||||||
ASN1err(ASN1_F_D2I_ASN1_INTEGER,i);
|
ASN1err(ASN1_F_C2I_ASN1_INTEGER,i);
|
||||||
if ((ret != NULL) && ((a == NULL) || (*a != ret)))
|
if ((ret != NULL) && ((a == NULL) || (*a != ret)))
|
||||||
M_ASN1_INTEGER_free(ret);
|
M_ASN1_INTEGER_free(ret);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
|
@ -107,7 +107,7 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
|
|||||||
|
|
||||||
case MBSTRING_BMP:
|
case MBSTRING_BMP:
|
||||||
if(len & 1) {
|
if(len & 1) {
|
||||||
ASN1err(ASN1_F_ASN1_MBSTRING_COPY,
|
ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY,
|
||||||
ASN1_R_INVALID_BMPSTRING_LENGTH);
|
ASN1_R_INVALID_BMPSTRING_LENGTH);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -116,7 +116,7 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
|
|||||||
|
|
||||||
case MBSTRING_UNIV:
|
case MBSTRING_UNIV:
|
||||||
if(len & 3) {
|
if(len & 3) {
|
||||||
ASN1err(ASN1_F_ASN1_MBSTRING_COPY,
|
ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY,
|
||||||
ASN1_R_INVALID_UNIVERSALSTRING_LENGTH);
|
ASN1_R_INVALID_UNIVERSALSTRING_LENGTH);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -128,7 +128,7 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
|
|||||||
/* This counts the characters and does utf8 syntax checking */
|
/* This counts the characters and does utf8 syntax checking */
|
||||||
ret = traverse_string(in, len, MBSTRING_UTF8, in_utf8, &nchar);
|
ret = traverse_string(in, len, MBSTRING_UTF8, in_utf8, &nchar);
|
||||||
if(ret < 0) {
|
if(ret < 0) {
|
||||||
ASN1err(ASN1_F_ASN1_MBSTRING_COPY,
|
ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY,
|
||||||
ASN1_R_INVALID_UTF8STRING);
|
ASN1_R_INVALID_UTF8STRING);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -139,19 +139,19 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ASN1err(ASN1_F_ASN1_MBSTRING_COPY, ASN1_R_UNKNOWN_FORMAT);
|
ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_UNKNOWN_FORMAT);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((minsize > 0) && (nchar < minsize)) {
|
if((minsize > 0) && (nchar < minsize)) {
|
||||||
ASN1err(ASN1_F_ASN1_MBSTRING_COPY, ASN1_R_STRING_TOO_SHORT);
|
ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_SHORT);
|
||||||
BIO_snprintf(strbuf, sizeof strbuf, "%ld", minsize);
|
BIO_snprintf(strbuf, sizeof strbuf, "%ld", minsize);
|
||||||
ERR_add_error_data(2, "minsize=", strbuf);
|
ERR_add_error_data(2, "minsize=", strbuf);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((maxsize > 0) && (nchar > maxsize)) {
|
if((maxsize > 0) && (nchar > maxsize)) {
|
||||||
ASN1err(ASN1_F_ASN1_MBSTRING_COPY, ASN1_R_STRING_TOO_LONG);
|
ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_LONG);
|
||||||
BIO_snprintf(strbuf, sizeof strbuf, "%ld", maxsize);
|
BIO_snprintf(strbuf, sizeof strbuf, "%ld", maxsize);
|
||||||
ERR_add_error_data(2, "maxsize=", strbuf);
|
ERR_add_error_data(2, "maxsize=", strbuf);
|
||||||
return -1;
|
return -1;
|
||||||
@ -159,7 +159,7 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
|
|||||||
|
|
||||||
/* Now work out minimal type (if any) */
|
/* Now work out minimal type (if any) */
|
||||||
if(traverse_string(in, len, inform, type_str, &mask) < 0) {
|
if(traverse_string(in, len, inform, type_str, &mask) < 0) {
|
||||||
ASN1err(ASN1_F_ASN1_MBSTRING_COPY, ASN1_R_ILLEGAL_CHARACTERS);
|
ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_ILLEGAL_CHARACTERS);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
|
|||||||
free_out = 1;
|
free_out = 1;
|
||||||
dest = ASN1_STRING_type_new(str_type);
|
dest = ASN1_STRING_type_new(str_type);
|
||||||
if(!dest) {
|
if(!dest) {
|
||||||
ASN1err(ASN1_F_ASN1_MBSTRING_COPY,
|
ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY,
|
||||||
ERR_R_MALLOC_FAILURE);
|
ERR_R_MALLOC_FAILURE);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -202,7 +202,7 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
|
|||||||
/* If both the same type just copy across */
|
/* If both the same type just copy across */
|
||||||
if(inform == outform) {
|
if(inform == outform) {
|
||||||
if(!ASN1_STRING_set(dest, in, len)) {
|
if(!ASN1_STRING_set(dest, in, len)) {
|
||||||
ASN1err(ASN1_F_ASN1_MBSTRING_COPY,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY,ERR_R_MALLOC_FAILURE);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return str_type;
|
return str_type;
|
||||||
@ -233,7 +233,7 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
|
|||||||
}
|
}
|
||||||
if(!(p = OPENSSL_malloc(outlen + 1))) {
|
if(!(p = OPENSSL_malloc(outlen + 1))) {
|
||||||
if(free_out) ASN1_STRING_free(dest);
|
if(free_out) ASN1_STRING_free(dest);
|
||||||
ASN1err(ASN1_F_ASN1_MBSTRING_COPY,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY,ERR_R_MALLOC_FAILURE);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
dest->length = outlen;
|
dest->length = outlen;
|
||||||
|
@ -255,7 +255,7 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
|
|||||||
*pp=p;
|
*pp=p;
|
||||||
return(ret);
|
return(ret);
|
||||||
err:
|
err:
|
||||||
ASN1err(ASN1_F_D2I_ASN1_OBJECT,i);
|
ASN1err(ASN1_F_C2I_ASN1_OBJECT,i);
|
||||||
if ((ret != NULL) && ((a == NULL) || (*a != ret)))
|
if ((ret != NULL) && ((a == NULL) || (*a != ret)))
|
||||||
ASN1_OBJECT_free(ret);
|
ASN1_OBJECT_free(ret);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
|
@ -248,12 +248,12 @@ int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
|
|||||||
a->algorithm=OBJ_nid2obj(type->pkey_type);
|
a->algorithm=OBJ_nid2obj(type->pkey_type);
|
||||||
if (a->algorithm == NULL)
|
if (a->algorithm == NULL)
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_ASN1_SIGN,ASN1_R_UNKNOWN_OBJECT_TYPE);
|
ASN1err(ASN1_F_ASN1_ITEM_SIGN,ASN1_R_UNKNOWN_OBJECT_TYPE);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
if (a->algorithm->length == 0)
|
if (a->algorithm->length == 0)
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_ASN1_SIGN,ASN1_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD);
|
ASN1err(ASN1_F_ASN1_ITEM_SIGN,ASN1_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -263,7 +263,7 @@ int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
|
|||||||
if ((buf_in == NULL) || (buf_out == NULL))
|
if ((buf_in == NULL) || (buf_out == NULL))
|
||||||
{
|
{
|
||||||
outl=0;
|
outl=0;
|
||||||
ASN1err(ASN1_F_ASN1_SIGN,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_ASN1_ITEM_SIGN,ERR_R_MALLOC_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -273,7 +273,7 @@ int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
|
|||||||
(unsigned int *)&outl,pkey))
|
(unsigned int *)&outl,pkey))
|
||||||
{
|
{
|
||||||
outl=0;
|
outl=0;
|
||||||
ASN1err(ASN1_F_ASN1_SIGN,ERR_R_EVP_LIB);
|
ASN1err(ASN1_F_ASN1_ITEM_SIGN,ERR_R_EVP_LIB);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
if (signature->data != NULL) OPENSSL_free(signature->data);
|
if (signature->data != NULL) OPENSSL_free(signature->data);
|
||||||
|
@ -138,13 +138,13 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat
|
|||||||
type=EVP_get_digestbyname(OBJ_nid2sn(i));
|
type=EVP_get_digestbyname(OBJ_nid2sn(i));
|
||||||
if (type == NULL)
|
if (type == NULL)
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_ASN1_VERIFY,ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM);
|
ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!EVP_VerifyInit_ex(&ctx,type, NULL))
|
if (!EVP_VerifyInit_ex(&ctx,type, NULL))
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_ASN1_VERIFY,ERR_R_EVP_LIB);
|
ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ERR_R_EVP_LIB);
|
||||||
ret=0;
|
ret=0;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
@ -153,7 +153,7 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat
|
|||||||
|
|
||||||
if (buf_in == NULL)
|
if (buf_in == NULL)
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_ASN1_VERIFY,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ERR_R_MALLOC_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat
|
|||||||
if (EVP_VerifyFinal(&ctx,(unsigned char *)signature->data,
|
if (EVP_VerifyFinal(&ctx,(unsigned char *)signature->data,
|
||||||
(unsigned int)signature->length,pkey) <= 0)
|
(unsigned int)signature->length,pkey) <= 0)
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_ASN1_VERIFY,ERR_R_EVP_LIB);
|
ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ERR_R_EVP_LIB);
|
||||||
ret=0;
|
ret=0;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
@ -1021,15 +1021,15 @@ void ERR_load_ASN1_strings(void);
|
|||||||
#define ASN1_F_A2I_ASN1_ENUMERATED 101
|
#define ASN1_F_A2I_ASN1_ENUMERATED 101
|
||||||
#define ASN1_F_A2I_ASN1_INTEGER 102
|
#define ASN1_F_A2I_ASN1_INTEGER 102
|
||||||
#define ASN1_F_A2I_ASN1_STRING 103
|
#define ASN1_F_A2I_ASN1_STRING 103
|
||||||
#define ASN1_F_APPEND_TAG 176
|
#define ASN1_F_APPEND_EXP 176
|
||||||
#define ASN1_F_ASN1_BIT_STRING_SET_BIT 183
|
#define ASN1_F_ASN1_BIT_STRING_SET_BIT 183
|
||||||
#define ASN1_F_ASN1_CB 177
|
#define ASN1_F_ASN1_CB 177
|
||||||
#define ASN1_F_ASN1_CHECK_TLEN 104
|
#define ASN1_F_ASN1_CHECK_TLEN 104
|
||||||
#define ASN1_F_ASN1_COLLATE_PRIMITIVE 105
|
#define ASN1_F_ASN1_COLLATE_PRIMITIVE 105
|
||||||
#define ASN1_F_ASN1_COLLECT 106
|
#define ASN1_F_ASN1_COLLECT 106
|
||||||
#define ASN1_F_ASN1_D2I_BIO 107
|
|
||||||
#define ASN1_F_ASN1_D2I_EX_PRIMITIVE 108
|
#define ASN1_F_ASN1_D2I_EX_PRIMITIVE 108
|
||||||
#define ASN1_F_ASN1_D2I_FP 109
|
#define ASN1_F_ASN1_D2I_FP 109
|
||||||
|
#define ASN1_F_ASN1_D2I_READ_BIO 107
|
||||||
#define ASN1_F_ASN1_DIGEST 184
|
#define ASN1_F_ASN1_DIGEST 184
|
||||||
#define ASN1_F_ASN1_DO_ADB 110
|
#define ASN1_F_ASN1_DO_ADB 110
|
||||||
#define ASN1_F_ASN1_DUP 111
|
#define ASN1_F_ASN1_DUP 111
|
||||||
@ -1044,12 +1044,20 @@ void ERR_load_ASN1_strings(void);
|
|||||||
#define ASN1_F_ASN1_I2D_FP 117
|
#define ASN1_F_ASN1_I2D_FP 117
|
||||||
#define ASN1_F_ASN1_INTEGER_SET 118
|
#define ASN1_F_ASN1_INTEGER_SET 118
|
||||||
#define ASN1_F_ASN1_INTEGER_TO_BN 119
|
#define ASN1_F_ASN1_INTEGER_TO_BN 119
|
||||||
|
#define ASN1_F_ASN1_ITEM_D2I_FP 190
|
||||||
|
#define ASN1_F_ASN1_ITEM_DUP 191
|
||||||
#define ASN1_F_ASN1_ITEM_EX_D2I 120
|
#define ASN1_F_ASN1_ITEM_EX_D2I 120
|
||||||
|
#define ASN1_F_ASN1_ITEM_I2D_BIO 192
|
||||||
|
#define ASN1_F_ASN1_ITEM_I2D_FP 193
|
||||||
#define ASN1_F_ASN1_ITEM_NEW 121
|
#define ASN1_F_ASN1_ITEM_NEW 121
|
||||||
#define ASN1_F_ASN1_MBSTRING_COPY 122
|
#define ASN1_F_ASN1_ITEM_PACK 198
|
||||||
|
#define ASN1_F_ASN1_ITEM_SIGN 195
|
||||||
|
#define ASN1_F_ASN1_ITEM_UNPACK 199
|
||||||
|
#define ASN1_F_ASN1_ITEM_VERIFY 197
|
||||||
|
#define ASN1_F_ASN1_MBSTRING_NCOPY 122
|
||||||
#define ASN1_F_ASN1_OBJECT_NEW 123
|
#define ASN1_F_ASN1_OBJECT_NEW 123
|
||||||
#define ASN1_F_ASN1_PACK_STRING 124
|
#define ASN1_F_ASN1_PACK_STRING 124
|
||||||
#define ASN1_F_ASN1_PBE_SET 125
|
#define ASN1_F_ASN1_PKCS5_PBE_SET 125
|
||||||
#define ASN1_F_ASN1_SEQ_PACK 126
|
#define ASN1_F_ASN1_SEQ_PACK 126
|
||||||
#define ASN1_F_ASN1_SEQ_UNPACK 127
|
#define ASN1_F_ASN1_SEQ_UNPACK 127
|
||||||
#define ASN1_F_ASN1_SIGN 128
|
#define ASN1_F_ASN1_SIGN 128
|
||||||
@ -1070,6 +1078,8 @@ void ERR_load_ASN1_strings(void);
|
|||||||
#define ASN1_F_BN_TO_ASN1_ENUMERATED 138
|
#define ASN1_F_BN_TO_ASN1_ENUMERATED 138
|
||||||
#define ASN1_F_BN_TO_ASN1_INTEGER 139
|
#define ASN1_F_BN_TO_ASN1_INTEGER 139
|
||||||
#define ASN1_F_C2I_ASN1_BIT_STRING 189
|
#define ASN1_F_C2I_ASN1_BIT_STRING 189
|
||||||
|
#define ASN1_F_C2I_ASN1_INTEGER 194
|
||||||
|
#define ASN1_F_C2I_ASN1_OBJECT 196
|
||||||
#define ASN1_F_COLLECT_DATA 140
|
#define ASN1_F_COLLECT_DATA 140
|
||||||
#define ASN1_F_D2I_ASN1_BIT_STRING 141
|
#define ASN1_F_D2I_ASN1_BIT_STRING 141
|
||||||
#define ASN1_F_D2I_ASN1_BOOLEAN 142
|
#define ASN1_F_D2I_ASN1_BOOLEAN 142
|
||||||
@ -1086,6 +1096,8 @@ void ERR_load_ASN1_strings(void);
|
|||||||
#define ASN1_F_D2I_NETSCAPE_RSA_2 153
|
#define ASN1_F_D2I_NETSCAPE_RSA_2 153
|
||||||
#define ASN1_F_D2I_PRIVATEKEY 154
|
#define ASN1_F_D2I_PRIVATEKEY 154
|
||||||
#define ASN1_F_D2I_PUBLICKEY 155
|
#define ASN1_F_D2I_PUBLICKEY 155
|
||||||
|
#define ASN1_F_D2I_RSA_NET 200
|
||||||
|
#define ASN1_F_D2I_RSA_NET_2 201
|
||||||
#define ASN1_F_D2I_X509 156
|
#define ASN1_F_D2I_X509 156
|
||||||
#define ASN1_F_D2I_X509_CINF 157
|
#define ASN1_F_D2I_X509_CINF 157
|
||||||
#define ASN1_F_D2I_X509_NAME 158
|
#define ASN1_F_D2I_X509_NAME 158
|
||||||
@ -1094,14 +1106,15 @@ void ERR_load_ASN1_strings(void);
|
|||||||
#define ASN1_F_I2D_ASN1_TIME 160
|
#define ASN1_F_I2D_ASN1_TIME 160
|
||||||
#define ASN1_F_I2D_DSA_PUBKEY 161
|
#define ASN1_F_I2D_DSA_PUBKEY 161
|
||||||
#define ASN1_F_I2D_EC_PUBKEY 181
|
#define ASN1_F_I2D_EC_PUBKEY 181
|
||||||
#define ASN1_F_I2D_NETSCAPE_RSA 162
|
|
||||||
#define ASN1_F_I2D_PRIVATEKEY 163
|
#define ASN1_F_I2D_PRIVATEKEY 163
|
||||||
#define ASN1_F_I2D_PUBLICKEY 164
|
#define ASN1_F_I2D_PUBLICKEY 164
|
||||||
|
#define ASN1_F_I2D_RSA_NET 162
|
||||||
#define ASN1_F_I2D_RSA_PUBKEY 165
|
#define ASN1_F_I2D_RSA_PUBKEY 165
|
||||||
#define ASN1_F_LONG_C2I 166
|
#define ASN1_F_LONG_C2I 166
|
||||||
#define ASN1_F_OID_MODULE_INIT 174
|
#define ASN1_F_OID_MODULE_INIT 174
|
||||||
#define ASN1_F_PARSE_TAGGING 182
|
#define ASN1_F_PARSE_TAGGING 182
|
||||||
#define ASN1_F_PKCS5_PBE2_SET 167
|
#define ASN1_F_PKCS5_PBE2_SET 167
|
||||||
|
#define ASN1_F_PKCS5_PBE_SET 202
|
||||||
#define ASN1_F_X509_CINF_NEW 168
|
#define ASN1_F_X509_CINF_NEW 168
|
||||||
#define ASN1_F_X509_CRL_ADD0_REVOKED 169
|
#define ASN1_F_X509_CRL_ADD0_REVOKED 169
|
||||||
#define ASN1_F_X509_INFO_NEW 170
|
#define ASN1_F_X509_INFO_NEW 170
|
||||||
|
@ -74,15 +74,15 @@ static ERR_STRING_DATA ASN1_str_functs[]=
|
|||||||
{ERR_FUNC(ASN1_F_A2I_ASN1_ENUMERATED), "a2i_ASN1_ENUMERATED"},
|
{ERR_FUNC(ASN1_F_A2I_ASN1_ENUMERATED), "a2i_ASN1_ENUMERATED"},
|
||||||
{ERR_FUNC(ASN1_F_A2I_ASN1_INTEGER), "a2i_ASN1_INTEGER"},
|
{ERR_FUNC(ASN1_F_A2I_ASN1_INTEGER), "a2i_ASN1_INTEGER"},
|
||||||
{ERR_FUNC(ASN1_F_A2I_ASN1_STRING), "a2i_ASN1_STRING"},
|
{ERR_FUNC(ASN1_F_A2I_ASN1_STRING), "a2i_ASN1_STRING"},
|
||||||
{ERR_FUNC(ASN1_F_APPEND_TAG), "APPEND_TAG"},
|
{ERR_FUNC(ASN1_F_APPEND_EXP), "APPEND_EXP"},
|
||||||
{ERR_FUNC(ASN1_F_ASN1_BIT_STRING_SET_BIT), "ASN1_BIT_STRING_set_bit"},
|
{ERR_FUNC(ASN1_F_ASN1_BIT_STRING_SET_BIT), "ASN1_BIT_STRING_set_bit"},
|
||||||
{ERR_FUNC(ASN1_F_ASN1_CB), "ASN1_CB"},
|
{ERR_FUNC(ASN1_F_ASN1_CB), "ASN1_CB"},
|
||||||
{ERR_FUNC(ASN1_F_ASN1_CHECK_TLEN), "ASN1_CHECK_TLEN"},
|
{ERR_FUNC(ASN1_F_ASN1_CHECK_TLEN), "ASN1_CHECK_TLEN"},
|
||||||
{ERR_FUNC(ASN1_F_ASN1_COLLATE_PRIMITIVE), "ASN1_COLLATE_PRIMITIVE"},
|
{ERR_FUNC(ASN1_F_ASN1_COLLATE_PRIMITIVE), "ASN1_COLLATE_PRIMITIVE"},
|
||||||
{ERR_FUNC(ASN1_F_ASN1_COLLECT), "ASN1_COLLECT"},
|
{ERR_FUNC(ASN1_F_ASN1_COLLECT), "ASN1_COLLECT"},
|
||||||
{ERR_FUNC(ASN1_F_ASN1_D2I_BIO), "ASN1_d2i_bio"},
|
|
||||||
{ERR_FUNC(ASN1_F_ASN1_D2I_EX_PRIMITIVE), "ASN1_D2I_EX_PRIMITIVE"},
|
{ERR_FUNC(ASN1_F_ASN1_D2I_EX_PRIMITIVE), "ASN1_D2I_EX_PRIMITIVE"},
|
||||||
{ERR_FUNC(ASN1_F_ASN1_D2I_FP), "ASN1_d2i_fp"},
|
{ERR_FUNC(ASN1_F_ASN1_D2I_FP), "ASN1_d2i_fp"},
|
||||||
|
{ERR_FUNC(ASN1_F_ASN1_D2I_READ_BIO), "ASN1_D2I_READ_BIO"},
|
||||||
{ERR_FUNC(ASN1_F_ASN1_DIGEST), "ASN1_digest"},
|
{ERR_FUNC(ASN1_F_ASN1_DIGEST), "ASN1_digest"},
|
||||||
{ERR_FUNC(ASN1_F_ASN1_DO_ADB), "ASN1_DO_ADB"},
|
{ERR_FUNC(ASN1_F_ASN1_DO_ADB), "ASN1_DO_ADB"},
|
||||||
{ERR_FUNC(ASN1_F_ASN1_DUP), "ASN1_dup"},
|
{ERR_FUNC(ASN1_F_ASN1_DUP), "ASN1_dup"},
|
||||||
@ -97,12 +97,20 @@ static ERR_STRING_DATA ASN1_str_functs[]=
|
|||||||
{ERR_FUNC(ASN1_F_ASN1_I2D_FP), "ASN1_i2d_fp"},
|
{ERR_FUNC(ASN1_F_ASN1_I2D_FP), "ASN1_i2d_fp"},
|
||||||
{ERR_FUNC(ASN1_F_ASN1_INTEGER_SET), "ASN1_INTEGER_set"},
|
{ERR_FUNC(ASN1_F_ASN1_INTEGER_SET), "ASN1_INTEGER_set"},
|
||||||
{ERR_FUNC(ASN1_F_ASN1_INTEGER_TO_BN), "ASN1_INTEGER_to_BN"},
|
{ERR_FUNC(ASN1_F_ASN1_INTEGER_TO_BN), "ASN1_INTEGER_to_BN"},
|
||||||
|
{ERR_FUNC(ASN1_F_ASN1_ITEM_D2I_FP), "ASN1_item_d2i_fp"},
|
||||||
|
{ERR_FUNC(ASN1_F_ASN1_ITEM_DUP), "ASN1_item_dup"},
|
||||||
{ERR_FUNC(ASN1_F_ASN1_ITEM_EX_D2I), "ASN1_ITEM_EX_D2I"},
|
{ERR_FUNC(ASN1_F_ASN1_ITEM_EX_D2I), "ASN1_ITEM_EX_D2I"},
|
||||||
|
{ERR_FUNC(ASN1_F_ASN1_ITEM_I2D_BIO), "ASN1_item_i2d_bio"},
|
||||||
|
{ERR_FUNC(ASN1_F_ASN1_ITEM_I2D_FP), "ASN1_item_i2d_fp"},
|
||||||
{ERR_FUNC(ASN1_F_ASN1_ITEM_NEW), "ASN1_item_new"},
|
{ERR_FUNC(ASN1_F_ASN1_ITEM_NEW), "ASN1_item_new"},
|
||||||
{ERR_FUNC(ASN1_F_ASN1_MBSTRING_COPY), "ASN1_mbstring_copy"},
|
{ERR_FUNC(ASN1_F_ASN1_ITEM_PACK), "ASN1_item_pack"},
|
||||||
|
{ERR_FUNC(ASN1_F_ASN1_ITEM_SIGN), "ASN1_item_sign"},
|
||||||
|
{ERR_FUNC(ASN1_F_ASN1_ITEM_UNPACK), "ASN1_item_unpack"},
|
||||||
|
{ERR_FUNC(ASN1_F_ASN1_ITEM_VERIFY), "ASN1_item_verify"},
|
||||||
|
{ERR_FUNC(ASN1_F_ASN1_MBSTRING_NCOPY), "ASN1_mbstring_ncopy"},
|
||||||
{ERR_FUNC(ASN1_F_ASN1_OBJECT_NEW), "ASN1_OBJECT_new"},
|
{ERR_FUNC(ASN1_F_ASN1_OBJECT_NEW), "ASN1_OBJECT_new"},
|
||||||
{ERR_FUNC(ASN1_F_ASN1_PACK_STRING), "ASN1_pack_string"},
|
{ERR_FUNC(ASN1_F_ASN1_PACK_STRING), "ASN1_pack_string"},
|
||||||
{ERR_FUNC(ASN1_F_ASN1_PBE_SET), "ASN1_PBE_SET"},
|
{ERR_FUNC(ASN1_F_ASN1_PKCS5_PBE_SET), "ASN1_PKCS5_PBE_SET"},
|
||||||
{ERR_FUNC(ASN1_F_ASN1_SEQ_PACK), "ASN1_seq_pack"},
|
{ERR_FUNC(ASN1_F_ASN1_SEQ_PACK), "ASN1_seq_pack"},
|
||||||
{ERR_FUNC(ASN1_F_ASN1_SEQ_UNPACK), "ASN1_seq_unpack"},
|
{ERR_FUNC(ASN1_F_ASN1_SEQ_UNPACK), "ASN1_seq_unpack"},
|
||||||
{ERR_FUNC(ASN1_F_ASN1_SIGN), "ASN1_sign"},
|
{ERR_FUNC(ASN1_F_ASN1_SIGN), "ASN1_sign"},
|
||||||
@ -123,6 +131,8 @@ static ERR_STRING_DATA ASN1_str_functs[]=
|
|||||||
{ERR_FUNC(ASN1_F_BN_TO_ASN1_ENUMERATED), "BN_to_ASN1_ENUMERATED"},
|
{ERR_FUNC(ASN1_F_BN_TO_ASN1_ENUMERATED), "BN_to_ASN1_ENUMERATED"},
|
||||||
{ERR_FUNC(ASN1_F_BN_TO_ASN1_INTEGER), "BN_to_ASN1_INTEGER"},
|
{ERR_FUNC(ASN1_F_BN_TO_ASN1_INTEGER), "BN_to_ASN1_INTEGER"},
|
||||||
{ERR_FUNC(ASN1_F_C2I_ASN1_BIT_STRING), "c2i_ASN1_BIT_STRING"},
|
{ERR_FUNC(ASN1_F_C2I_ASN1_BIT_STRING), "c2i_ASN1_BIT_STRING"},
|
||||||
|
{ERR_FUNC(ASN1_F_C2I_ASN1_INTEGER), "c2i_ASN1_INTEGER"},
|
||||||
|
{ERR_FUNC(ASN1_F_C2I_ASN1_OBJECT), "c2i_ASN1_OBJECT"},
|
||||||
{ERR_FUNC(ASN1_F_COLLECT_DATA), "COLLECT_DATA"},
|
{ERR_FUNC(ASN1_F_COLLECT_DATA), "COLLECT_DATA"},
|
||||||
{ERR_FUNC(ASN1_F_D2I_ASN1_BIT_STRING), "D2I_ASN1_BIT_STRING"},
|
{ERR_FUNC(ASN1_F_D2I_ASN1_BIT_STRING), "D2I_ASN1_BIT_STRING"},
|
||||||
{ERR_FUNC(ASN1_F_D2I_ASN1_BOOLEAN), "d2i_ASN1_BOOLEAN"},
|
{ERR_FUNC(ASN1_F_D2I_ASN1_BOOLEAN), "d2i_ASN1_BOOLEAN"},
|
||||||
@ -139,6 +149,8 @@ static ERR_STRING_DATA ASN1_str_functs[]=
|
|||||||
{ERR_FUNC(ASN1_F_D2I_NETSCAPE_RSA_2), "D2I_NETSCAPE_RSA_2"},
|
{ERR_FUNC(ASN1_F_D2I_NETSCAPE_RSA_2), "D2I_NETSCAPE_RSA_2"},
|
||||||
{ERR_FUNC(ASN1_F_D2I_PRIVATEKEY), "d2i_PrivateKey"},
|
{ERR_FUNC(ASN1_F_D2I_PRIVATEKEY), "d2i_PrivateKey"},
|
||||||
{ERR_FUNC(ASN1_F_D2I_PUBLICKEY), "d2i_PublicKey"},
|
{ERR_FUNC(ASN1_F_D2I_PUBLICKEY), "d2i_PublicKey"},
|
||||||
|
{ERR_FUNC(ASN1_F_D2I_RSA_NET), "d2i_RSA_NET"},
|
||||||
|
{ERR_FUNC(ASN1_F_D2I_RSA_NET_2), "D2I_RSA_NET_2"},
|
||||||
{ERR_FUNC(ASN1_F_D2I_X509), "D2I_X509"},
|
{ERR_FUNC(ASN1_F_D2I_X509), "D2I_X509"},
|
||||||
{ERR_FUNC(ASN1_F_D2I_X509_CINF), "D2I_X509_CINF"},
|
{ERR_FUNC(ASN1_F_D2I_X509_CINF), "D2I_X509_CINF"},
|
||||||
{ERR_FUNC(ASN1_F_D2I_X509_NAME), "D2I_X509_NAME"},
|
{ERR_FUNC(ASN1_F_D2I_X509_NAME), "D2I_X509_NAME"},
|
||||||
@ -147,14 +159,15 @@ static ERR_STRING_DATA ASN1_str_functs[]=
|
|||||||
{ERR_FUNC(ASN1_F_I2D_ASN1_TIME), "I2D_ASN1_TIME"},
|
{ERR_FUNC(ASN1_F_I2D_ASN1_TIME), "I2D_ASN1_TIME"},
|
||||||
{ERR_FUNC(ASN1_F_I2D_DSA_PUBKEY), "i2d_DSA_PUBKEY"},
|
{ERR_FUNC(ASN1_F_I2D_DSA_PUBKEY), "i2d_DSA_PUBKEY"},
|
||||||
{ERR_FUNC(ASN1_F_I2D_EC_PUBKEY), "i2d_EC_PUBKEY"},
|
{ERR_FUNC(ASN1_F_I2D_EC_PUBKEY), "i2d_EC_PUBKEY"},
|
||||||
{ERR_FUNC(ASN1_F_I2D_NETSCAPE_RSA), "i2d_Netscape_RSA"},
|
|
||||||
{ERR_FUNC(ASN1_F_I2D_PRIVATEKEY), "i2d_PrivateKey"},
|
{ERR_FUNC(ASN1_F_I2D_PRIVATEKEY), "i2d_PrivateKey"},
|
||||||
{ERR_FUNC(ASN1_F_I2D_PUBLICKEY), "i2d_PublicKey"},
|
{ERR_FUNC(ASN1_F_I2D_PUBLICKEY), "i2d_PublicKey"},
|
||||||
|
{ERR_FUNC(ASN1_F_I2D_RSA_NET), "i2d_RSA_NET"},
|
||||||
{ERR_FUNC(ASN1_F_I2D_RSA_PUBKEY), "i2d_RSA_PUBKEY"},
|
{ERR_FUNC(ASN1_F_I2D_RSA_PUBKEY), "i2d_RSA_PUBKEY"},
|
||||||
{ERR_FUNC(ASN1_F_LONG_C2I), "LONG_C2I"},
|
{ERR_FUNC(ASN1_F_LONG_C2I), "LONG_C2I"},
|
||||||
{ERR_FUNC(ASN1_F_OID_MODULE_INIT), "OID_MODULE_INIT"},
|
{ERR_FUNC(ASN1_F_OID_MODULE_INIT), "OID_MODULE_INIT"},
|
||||||
{ERR_FUNC(ASN1_F_PARSE_TAGGING), "PARSE_TAGGING"},
|
{ERR_FUNC(ASN1_F_PARSE_TAGGING), "PARSE_TAGGING"},
|
||||||
{ERR_FUNC(ASN1_F_PKCS5_PBE2_SET), "PKCS5_pbe2_set"},
|
{ERR_FUNC(ASN1_F_PKCS5_PBE2_SET), "PKCS5_pbe2_set"},
|
||||||
|
{ERR_FUNC(ASN1_F_PKCS5_PBE_SET), "PKCS5_pbe_set"},
|
||||||
{ERR_FUNC(ASN1_F_X509_CINF_NEW), "X509_CINF_NEW"},
|
{ERR_FUNC(ASN1_F_X509_CINF_NEW), "X509_CINF_NEW"},
|
||||||
{ERR_FUNC(ASN1_F_X509_CRL_ADD0_REVOKED), "X509_CRL_add0_revoked"},
|
{ERR_FUNC(ASN1_F_X509_CRL_ADD0_REVOKED), "X509_CRL_add0_revoked"},
|
||||||
{ERR_FUNC(ASN1_F_X509_INFO_NEW), "X509_INFO_new"},
|
{ERR_FUNC(ASN1_F_X509_INFO_NEW), "X509_INFO_new"},
|
||||||
|
@ -512,13 +512,13 @@ static int append_exp(tag_exp_arg *arg, int exp_tag, int exp_class, int exp_cons
|
|||||||
/* Can only have IMPLICIT if permitted */
|
/* Can only have IMPLICIT if permitted */
|
||||||
if ((arg->imp_tag != -1) && !imp_ok)
|
if ((arg->imp_tag != -1) && !imp_ok)
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_APPEND_TAG, ASN1_R_ILLEGAL_IMPLICIT_TAG);
|
ASN1err(ASN1_F_APPEND_EXP, ASN1_R_ILLEGAL_IMPLICIT_TAG);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg->exp_count == ASN1_FLAG_EXP_MAX)
|
if (arg->exp_count == ASN1_FLAG_EXP_MAX)
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_APPEND_TAG, ASN1_R_DEPTH_EXCEEDED);
|
ASN1err(ASN1_F_APPEND_EXP, ASN1_R_DEPTH_EXCEEDED);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ unsigned char *ASN1_seq_pack(STACK *safes, i2d_of_void *i2d,
|
|||||||
|
|
||||||
/* Extract an ASN1 object from an ASN1_STRING */
|
/* Extract an ASN1 object from an ASN1_STRING */
|
||||||
|
|
||||||
void *ASN1_unpack_string (ASN1_STRING *oct, d2i_of_void *d2i)
|
void *ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i)
|
||||||
{
|
{
|
||||||
const unsigned char *p;
|
const unsigned char *p;
|
||||||
char *ret;
|
char *ret;
|
||||||
@ -155,7 +155,7 @@ ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, ASN1_STRING **oct)
|
|||||||
|
|
||||||
if (!oct || !*oct) {
|
if (!oct || !*oct) {
|
||||||
if (!(octmp = ASN1_STRING_new ())) {
|
if (!(octmp = ASN1_STRING_new ())) {
|
||||||
ASN1err(ASN1_F_ASN1_PACK_STRING,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_ASN1_ITEM_PACK,ERR_R_MALLOC_FAILURE);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (oct) *oct = octmp;
|
if (oct) *oct = octmp;
|
||||||
@ -167,11 +167,11 @@ ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, ASN1_STRING **oct)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(octmp->length = ASN1_item_i2d(obj, &octmp->data, it))) {
|
if (!(octmp->length = ASN1_item_i2d(obj, &octmp->data, it))) {
|
||||||
ASN1err(ASN1_F_ASN1_PACK_STRING,ASN1_R_ENCODE_ERROR);
|
ASN1err(ASN1_F_ASN1_ITEM_PACK,ASN1_R_ENCODE_ERROR);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (!octmp->data) {
|
if (!octmp->data) {
|
||||||
ASN1err(ASN1_F_ASN1_PACK_STRING,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_ASN1_ITEM_PACK,ERR_R_MALLOC_FAILURE);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return octmp;
|
return octmp;
|
||||||
@ -186,6 +186,6 @@ void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it)
|
|||||||
|
|
||||||
p = oct->data;
|
p = oct->data;
|
||||||
if(!(ret = ASN1_item_d2i(NULL, &p, oct->length, it)))
|
if(!(ret = ASN1_item_d2i(NULL, &p, oct->length, it)))
|
||||||
ASN1err(ASN1_F_ASN1_UNPACK_STRING,ASN1_R_DECODE_ERROR);
|
ASN1err(ASN1_F_ASN1_ITEM_UNPACK,ASN1_R_DECODE_ERROR);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -170,7 +170,7 @@ int i2d_RSA_NET(const RSA *a, unsigned char **pp,
|
|||||||
/* Since its RC4 encrypted length is actual length */
|
/* Since its RC4 encrypted length is actual length */
|
||||||
if ((zz=(unsigned char *)OPENSSL_malloc(rsalen)) == NULL)
|
if ((zz=(unsigned char *)OPENSSL_malloc(rsalen)) == NULL)
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_I2D_NETSCAPE_RSA,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_I2D_RSA_NET,ERR_R_MALLOC_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,13 +180,13 @@ int i2d_RSA_NET(const RSA *a, unsigned char **pp,
|
|||||||
|
|
||||||
if ((zz=OPENSSL_malloc(pkeylen)) == NULL)
|
if ((zz=OPENSSL_malloc(pkeylen)) == NULL)
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_I2D_NETSCAPE_RSA,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_I2D_RSA_NET,ERR_R_MALLOC_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ASN1_STRING_set(enckey->os, "private-key", -1))
|
if (!ASN1_STRING_set(enckey->os, "private-key", -1))
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_I2D_NETSCAPE_RSA,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_I2D_RSA_NET,ERR_R_MALLOC_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
enckey->enckey->digest->data = zz;
|
enckey->enckey->digest->data = zz;
|
||||||
@ -200,7 +200,7 @@ int i2d_RSA_NET(const RSA *a, unsigned char **pp,
|
|||||||
i=cb((char *)buf,256,"Enter Private Key password:",1);
|
i=cb((char *)buf,256,"Enter Private Key password:",1);
|
||||||
if (i != 0)
|
if (i != 0)
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_I2D_NETSCAPE_RSA,ASN1_R_BAD_PASSWORD_READ);
|
ASN1err(ASN1_F_I2D_RSA_NET,ASN1_R_BAD_PASSWORD_READ);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
i = strlen((char *)buf);
|
i = strlen((char *)buf);
|
||||||
@ -249,20 +249,20 @@ RSA *d2i_RSA_NET(RSA **a, const unsigned char **pp, long length,
|
|||||||
|
|
||||||
enckey = d2i_NETSCAPE_ENCRYPTED_PKEY(NULL, &p, length);
|
enckey = d2i_NETSCAPE_ENCRYPTED_PKEY(NULL, &p, length);
|
||||||
if(!enckey) {
|
if(!enckey) {
|
||||||
ASN1err(ASN1_F_D2I_NETSCAPE_RSA,ASN1_R_DECODING_ERROR);
|
ASN1err(ASN1_F_D2I_RSA_NET,ASN1_R_DECODING_ERROR);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((enckey->os->length != 11) || (strncmp("private-key",
|
if ((enckey->os->length != 11) || (strncmp("private-key",
|
||||||
(char *)enckey->os->data,11) != 0))
|
(char *)enckey->os->data,11) != 0))
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_D2I_NETSCAPE_RSA,ASN1_R_PRIVATE_KEY_HEADER_MISSING);
|
ASN1err(ASN1_F_D2I_RSA_NET,ASN1_R_PRIVATE_KEY_HEADER_MISSING);
|
||||||
NETSCAPE_ENCRYPTED_PKEY_free(enckey);
|
NETSCAPE_ENCRYPTED_PKEY_free(enckey);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (OBJ_obj2nid(enckey->enckey->algor->algorithm) != NID_rc4)
|
if (OBJ_obj2nid(enckey->enckey->algor->algorithm) != NID_rc4)
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_D2I_NETSCAPE_RSA_2,ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM);
|
ASN1err(ASN1_F_D2I_RSA_NET,ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
kp = enckey->enckey->digest->data;
|
kp = enckey->enckey->digest->data;
|
||||||
@ -293,7 +293,7 @@ static RSA *d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os,
|
|||||||
i=cb((char *)buf,256,"Enter Private Key password:",0);
|
i=cb((char *)buf,256,"Enter Private Key password:",0);
|
||||||
if (i != 0)
|
if (i != 0)
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_D2I_NETSCAPE_RSA_2,ASN1_R_BAD_PASSWORD_READ);
|
ASN1err(ASN1_F_D2I_RSA_NET_2,ASN1_R_BAD_PASSWORD_READ);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -318,14 +318,14 @@ static RSA *d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os,
|
|||||||
|
|
||||||
if ((pkey=d2i_NETSCAPE_PKEY(NULL,&zz,os->length)) == NULL)
|
if ((pkey=d2i_NETSCAPE_PKEY(NULL,&zz,os->length)) == NULL)
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_D2I_NETSCAPE_RSA_2,ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY);
|
ASN1err(ASN1_F_D2I_RSA_NET_2,ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
zz=pkey->private_key->data;
|
zz=pkey->private_key->data;
|
||||||
if ((ret=d2i_RSAPrivateKey(a,&zz,pkey->private_key->length)) == NULL)
|
if ((ret=d2i_RSAPrivateKey(a,&zz,pkey->private_key->length)) == NULL)
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_D2I_NETSCAPE_RSA_2,ASN1_R_UNABLE_TO_DECODE_RSA_KEY);
|
ASN1err(ASN1_F_D2I_RSA_NET_2,ASN1_R_UNABLE_TO_DECODE_RSA_KEY);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
err:
|
err:
|
||||||
|
@ -82,17 +82,17 @@ X509_ALGOR *PKCS5_pbe_set(int alg, int iter, unsigned char *salt,
|
|||||||
ASN1_TYPE *astype=NULL;
|
ASN1_TYPE *astype=NULL;
|
||||||
|
|
||||||
if (!(pbe = PBEPARAM_new ())) {
|
if (!(pbe = PBEPARAM_new ())) {
|
||||||
ASN1err(ASN1_F_ASN1_PBE_SET,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_PKCS5_PBE_SET,ERR_R_MALLOC_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
if(iter <= 0) iter = PKCS5_DEFAULT_ITER;
|
if(iter <= 0) iter = PKCS5_DEFAULT_ITER;
|
||||||
if (!ASN1_INTEGER_set(pbe->iter, iter)) {
|
if (!ASN1_INTEGER_set(pbe->iter, iter)) {
|
||||||
ASN1err(ASN1_F_ASN1_PBE_SET,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_PKCS5_PBE_SET,ERR_R_MALLOC_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
if (!saltlen) saltlen = PKCS5_SALT_LEN;
|
if (!saltlen) saltlen = PKCS5_SALT_LEN;
|
||||||
if (!(pbe->salt->data = OPENSSL_malloc (saltlen))) {
|
if (!(pbe->salt->data = OPENSSL_malloc (saltlen))) {
|
||||||
ASN1err(ASN1_F_ASN1_PBE_SET,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_PKCS5_PBE_SET,ERR_R_MALLOC_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
pbe->salt->length = saltlen;
|
pbe->salt->length = saltlen;
|
||||||
@ -101,14 +101,14 @@ X509_ALGOR *PKCS5_pbe_set(int alg, int iter, unsigned char *salt,
|
|||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
if (!(astype = ASN1_TYPE_new())) {
|
if (!(astype = ASN1_TYPE_new())) {
|
||||||
ASN1err(ASN1_F_ASN1_PBE_SET,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_PKCS5_PBE_SET,ERR_R_MALLOC_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
astype->type = V_ASN1_SEQUENCE;
|
astype->type = V_ASN1_SEQUENCE;
|
||||||
if(!ASN1_pack_string_of(PBEPARAM, pbe, i2d_PBEPARAM,
|
if(!ASN1_pack_string_of(PBEPARAM, pbe, i2d_PBEPARAM,
|
||||||
&astype->value.sequence)) {
|
&astype->value.sequence)) {
|
||||||
ASN1err(ASN1_F_ASN1_PBE_SET,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_PKCS5_PBE_SET,ERR_R_MALLOC_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
PBEPARAM_free (pbe);
|
PBEPARAM_free (pbe);
|
||||||
@ -116,7 +116,7 @@ X509_ALGOR *PKCS5_pbe_set(int alg, int iter, unsigned char *salt,
|
|||||||
|
|
||||||
al = OBJ_nid2obj(alg); /* never need to free al */
|
al = OBJ_nid2obj(alg); /* never need to free al */
|
||||||
if (!(algor = X509_ALGOR_new())) {
|
if (!(algor = X509_ALGOR_new())) {
|
||||||
ASN1err(ASN1_F_ASN1_PBE_SET,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_PKCS5_PBE_SET,ERR_R_MALLOC_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
ASN1_OBJECT_free(algor->algorithm);
|
ASN1_OBJECT_free(algor->algorithm);
|
||||||
|
@ -102,7 +102,7 @@ ech_key.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|||||||
ech_key.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
ech_key.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
ech_key.o: ../../include/openssl/store.h ../../include/openssl/symhacks.h
|
ech_key.o: ../../include/openssl/store.h ../../include/openssl/symhacks.h
|
||||||
ech_key.o: ../../include/openssl/ui.h ../../include/openssl/x509.h
|
ech_key.o: ../../include/openssl/ui.h ../../include/openssl/x509.h
|
||||||
ech_key.o: ../../include/openssl/x509_vfy.h ecdh.h ech_key.c
|
ech_key.o: ../../include/openssl/x509_vfy.h ech_key.c ech_locl.h
|
||||||
ech_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
ech_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||||
ech_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
ech_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||||
ech_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
ech_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
||||||
@ -118,7 +118,7 @@ ech_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|||||||
ech_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
ech_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
ech_lib.o: ../../include/openssl/store.h ../../include/openssl/symhacks.h
|
ech_lib.o: ../../include/openssl/store.h ../../include/openssl/symhacks.h
|
||||||
ech_lib.o: ../../include/openssl/ui.h ../../include/openssl/x509.h
|
ech_lib.o: ../../include/openssl/ui.h ../../include/openssl/x509.h
|
||||||
ech_lib.o: ../../include/openssl/x509_vfy.h ecdh.h ech_lib.c
|
ech_lib.o: ../../include/openssl/x509_vfy.h ech_lib.c ech_locl.h
|
||||||
ech_ossl.o: ../../e_os.h ../../include/openssl/asn1.h
|
ech_ossl.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||||
ech_ossl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
ech_ossl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||||
ech_ossl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
ech_ossl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||||
@ -129,4 +129,4 @@ ech_ossl.o: ../../include/openssl/opensslconf.h
|
|||||||
ech_ossl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
ech_ossl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||||
ech_ossl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
ech_ossl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||||
ech_ossl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
ech_ossl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||||
ech_ossl.o: ../cryptlib.h ech_ossl.c
|
ech_ossl.o: ../cryptlib.h ech_locl.h ech_ossl.c
|
||||||
|
@ -82,11 +82,12 @@ clean:
|
|||||||
ecs_asn1.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
|
ecs_asn1.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
|
||||||
ecs_asn1.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
ecs_asn1.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||||
ecs_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
ecs_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||||
ecs_asn1.o: ../../include/openssl/ec.h ../../include/openssl/err.h
|
ecs_asn1.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h
|
||||||
ecs_asn1.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
ecs_asn1.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||||
|
ecs_asn1.o: ../../include/openssl/opensslconf.h
|
||||||
ecs_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
ecs_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||||
ecs_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
ecs_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||||
ecs_asn1.o: ../../include/openssl/symhacks.h ecdsa.h ecs_asn1.c
|
ecs_asn1.o: ../../include/openssl/symhacks.h ecs_asn1.c ecs_locl.h
|
||||||
ecs_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
ecs_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||||
ecs_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
|
ecs_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
|
||||||
ecs_err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
ecs_err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||||
@ -110,15 +111,16 @@ ecs_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|||||||
ecs_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
ecs_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
ecs_lib.o: ../../include/openssl/store.h ../../include/openssl/symhacks.h
|
ecs_lib.o: ../../include/openssl/store.h ../../include/openssl/symhacks.h
|
||||||
ecs_lib.o: ../../include/openssl/ui.h ../../include/openssl/x509.h
|
ecs_lib.o: ../../include/openssl/ui.h ../../include/openssl/x509.h
|
||||||
ecs_lib.o: ../../include/openssl/x509_vfy.h ecdsa.h ecs_lib.c
|
ecs_lib.o: ../../include/openssl/x509_vfy.h ecs_lib.c ecs_locl.h
|
||||||
ecs_ossl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
ecs_ossl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||||
ecs_ossl.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
|
ecs_ossl.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
|
||||||
ecs_ossl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
ecs_ossl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||||
ecs_ossl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
ecs_ossl.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
|
||||||
ecs_ossl.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
|
ecs_ossl.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||||
|
ecs_ossl.o: ../../include/openssl/opensslconf.h
|
||||||
ecs_ossl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
ecs_ossl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||||
ecs_ossl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
ecs_ossl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||||
ecs_ossl.o: ../../include/openssl/symhacks.h ecdsa.h ecs_ossl.c
|
ecs_ossl.o: ../../include/openssl/symhacks.h ecs_locl.h ecs_ossl.c
|
||||||
ecs_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
ecs_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||||
ecs_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
ecs_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||||
ecs_sign.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
ecs_sign.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
||||||
@ -134,7 +136,7 @@ ecs_sign.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|||||||
ecs_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
ecs_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
ecs_sign.o: ../../include/openssl/store.h ../../include/openssl/symhacks.h
|
ecs_sign.o: ../../include/openssl/store.h ../../include/openssl/symhacks.h
|
||||||
ecs_sign.o: ../../include/openssl/ui.h ../../include/openssl/x509.h
|
ecs_sign.o: ../../include/openssl/ui.h ../../include/openssl/x509.h
|
||||||
ecs_sign.o: ../../include/openssl/x509_vfy.h ecdsa.h ecs_sign.c
|
ecs_sign.o: ../../include/openssl/x509_vfy.h ecs_locl.h ecs_sign.c
|
||||||
ecs_vrf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
ecs_vrf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||||
ecs_vrf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
ecs_vrf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||||
ecs_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
ecs_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
||||||
@ -150,4 +152,4 @@ ecs_vrf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|||||||
ecs_vrf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
ecs_vrf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
ecs_vrf.o: ../../include/openssl/store.h ../../include/openssl/symhacks.h
|
ecs_vrf.o: ../../include/openssl/store.h ../../include/openssl/symhacks.h
|
||||||
ecs_vrf.o: ../../include/openssl/ui.h ../../include/openssl/x509.h
|
ecs_vrf.o: ../../include/openssl/ui.h ../../include/openssl/x509.h
|
||||||
ecs_vrf.o: ../../include/openssl/x509_vfy.h ecdsa.h ecs_vrf.c
|
ecs_vrf.o: ../../include/openssl/x509_vfy.h ecs_locl.h ecs_vrf.c
|
||||||
|
@ -78,7 +78,10 @@ clean:
|
|||||||
|
|
||||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||||
|
|
||||||
pqueue.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
pqueue.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||||
|
pqueue.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||||
|
pqueue.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||||
|
pqueue.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||||
pqueue.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
pqueue.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||||
pqueue.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
pqueue.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||||
pqueue.o: ../../include/openssl/symhacks.h ../crypto.h pqueue.c pqueue.h
|
pqueue.o: ../../include/openssl/symhacks.h ../cryptlib.h pqueue.c pqueue.h
|
||||||
|
@ -10,6 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
|
PERL= perl
|
||||||
|
NEWMAKE= make
|
||||||
|
MAKE= $(NEWMAKE)
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile
|
MAKEFILE= Makefile
|
||||||
@ -17,7 +20,7 @@ AR= ar r
|
|||||||
|
|
||||||
PEX_LIBS=
|
PEX_LIBS=
|
||||||
EX_LIBS=
|
EX_LIBS=
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
|
|
||||||
GENERAL=Makefile engines.com install.com engine_vector.mar
|
GENERAL=Makefile engines.com install.com engine_vector.mar
|
||||||
|
@ -401,7 +401,7 @@ static EVP_PKEY *ibm_4758_load_privkey(ENGINE* e, const char* key_id,
|
|||||||
|
|
||||||
if (keyLabelLength > sizeof(keyLabel))
|
if (keyLabelLength > sizeof(keyLabel))
|
||||||
{
|
{
|
||||||
CCA4758err(CCA4758_F_IBM_4758_CCA_LOAD_PRIVKEY,
|
CCA4758err(CCA4758_F_IBM_4758_LOAD_PRIVKEY,
|
||||||
CCA4758_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
|
CCA4758_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -412,7 +412,7 @@ static EVP_PKEY *ibm_4758_load_privkey(ENGINE* e, const char* key_id,
|
|||||||
keyToken = OPENSSL_malloc(MAX_CCA_PKA_TOKEN_SIZE + sizeof(long));
|
keyToken = OPENSSL_malloc(MAX_CCA_PKA_TOKEN_SIZE + sizeof(long));
|
||||||
if (!keyToken)
|
if (!keyToken)
|
||||||
{
|
{
|
||||||
CCA4758err(CCA4758_F_IBM_4758_CCA_LOAD_PRIVKEY,
|
CCA4758err(CCA4758_F_IBM_4758_LOAD_PRIVKEY,
|
||||||
ERR_R_MALLOC_FAILURE);
|
ERR_R_MALLOC_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
@ -423,7 +423,7 @@ static EVP_PKEY *ibm_4758_load_privkey(ENGINE* e, const char* key_id,
|
|||||||
|
|
||||||
if (returnCode)
|
if (returnCode)
|
||||||
{
|
{
|
||||||
CCA4758err(CCA4758_F_IBM_4758_CCA_LOAD_PRIVKEY,
|
CCA4758err(CCA4758_F_IBM_4758_LOAD_PRIVKEY,
|
||||||
CCA4758_R_FAILED_LOADING_PRIVATE_KEY);
|
CCA4758_R_FAILED_LOADING_PRIVATE_KEY);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
@ -434,7 +434,7 @@ static EVP_PKEY *ibm_4758_load_privkey(ENGINE* e, const char* key_id,
|
|||||||
|
|
||||||
if (returnCode)
|
if (returnCode)
|
||||||
{
|
{
|
||||||
CCA4758err(CCA4758_F_IBM_4758_CCA_LOAD_PRIVKEY,
|
CCA4758err(CCA4758_F_IBM_4758_LOAD_PRIVKEY,
|
||||||
CCA4758_R_FAILED_LOADING_PRIVATE_KEY);
|
CCA4758_R_FAILED_LOADING_PRIVATE_KEY);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
@ -443,7 +443,7 @@ static EVP_PKEY *ibm_4758_load_privkey(ENGINE* e, const char* key_id,
|
|||||||
exponent, &modulusLength, &modulusFieldLength,
|
exponent, &modulusLength, &modulusFieldLength,
|
||||||
modulus))
|
modulus))
|
||||||
{
|
{
|
||||||
CCA4758err(CCA4758_F_IBM_4758_CCA_LOAD_PRIVKEY,
|
CCA4758err(CCA4758_F_IBM_4758_LOAD_PRIVKEY,
|
||||||
CCA4758_R_FAILED_LOADING_PRIVATE_KEY);
|
CCA4758_R_FAILED_LOADING_PRIVATE_KEY);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
@ -493,7 +493,7 @@ static EVP_PKEY *ibm_4758_load_pubkey(ENGINE* e, const char* key_id,
|
|||||||
|
|
||||||
if (keyLabelLength > sizeof(keyLabel))
|
if (keyLabelLength > sizeof(keyLabel))
|
||||||
{
|
{
|
||||||
CCA4758err(CCA4758_F_IBM_4758_CCA_LOAD_PRIVKEY,
|
CCA4758err(CCA4758_F_IBM_4758_LOAD_PUBKEY,
|
||||||
CCA4758_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
|
CCA4758_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -504,7 +504,7 @@ static EVP_PKEY *ibm_4758_load_pubkey(ENGINE* e, const char* key_id,
|
|||||||
keyToken = OPENSSL_malloc(MAX_CCA_PKA_TOKEN_SIZE + sizeof(long));
|
keyToken = OPENSSL_malloc(MAX_CCA_PKA_TOKEN_SIZE + sizeof(long));
|
||||||
if (!keyToken)
|
if (!keyToken)
|
||||||
{
|
{
|
||||||
CCA4758err(CCA4758_F_IBM_4758_CCA_LOAD_PUBKEY,
|
CCA4758err(CCA4758_F_IBM_4758_LOAD_PUBKEY,
|
||||||
ERR_R_MALLOC_FAILURE);
|
ERR_R_MALLOC_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
@ -515,7 +515,7 @@ static EVP_PKEY *ibm_4758_load_pubkey(ENGINE* e, const char* key_id,
|
|||||||
|
|
||||||
if (returnCode)
|
if (returnCode)
|
||||||
{
|
{
|
||||||
CCA4758err(CCA4758_F_IBM_4758_CCA_LOAD_PRIVKEY,
|
CCA4758err(CCA4758_F_IBM_4758_LOAD_PUBKEY,
|
||||||
ERR_R_MALLOC_FAILURE);
|
ERR_R_MALLOC_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
@ -523,7 +523,7 @@ static EVP_PKEY *ibm_4758_load_pubkey(ENGINE* e, const char* key_id,
|
|||||||
if (!getModulusAndExponent(keyToken+sizeof(long), &exponentLength,
|
if (!getModulusAndExponent(keyToken+sizeof(long), &exponentLength,
|
||||||
exponent, &modulusLength, &modulusFieldLength, modulus))
|
exponent, &modulusLength, &modulusFieldLength, modulus))
|
||||||
{
|
{
|
||||||
CCA4758err(CCA4758_F_IBM_4758_CCA_LOAD_PRIVKEY,
|
CCA4758err(CCA4758_F_IBM_4758_LOAD_PUBKEY,
|
||||||
CCA4758_R_FAILED_LOADING_PUBLIC_KEY);
|
CCA4758_R_FAILED_LOADING_PUBLIC_KEY);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
@ -636,14 +636,14 @@ static int cca_rsa_verify(int type, const unsigned char *m, unsigned int m_len,
|
|||||||
|
|
||||||
if (!algorithm.algorithm)
|
if (!algorithm.algorithm)
|
||||||
{
|
{
|
||||||
CCA4758err(CCA4758_F_IBM_4758_CCA_VERIFY,
|
CCA4758err(CCA4758_F_CCA_RSA_VERIFY,
|
||||||
CCA4758_R_UNKNOWN_ALGORITHM_TYPE);
|
CCA4758_R_UNKNOWN_ALGORITHM_TYPE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!algorithm.algorithm->length)
|
if (!algorithm.algorithm->length)
|
||||||
{
|
{
|
||||||
CCA4758err(CCA4758_F_IBM_4758_CCA_VERIFY,
|
CCA4758err(CCA4758_F_CCA_RSA_VERIFY,
|
||||||
CCA4758_R_ASN1_OID_UNKNOWN_FOR_MD);
|
CCA4758_R_ASN1_OID_UNKNOWN_FOR_MD);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -663,7 +663,7 @@ static int cca_rsa_verify(int type, const unsigned char *m, unsigned int m_len,
|
|||||||
|
|
||||||
if (length - RSA_PKCS1_PADDING > keyLength)
|
if (length - RSA_PKCS1_PADDING > keyLength)
|
||||||
{
|
{
|
||||||
CCA4758err(CCA4758_F_IBM_4758_CCA_VERIFY,
|
CCA4758err(CCA4758_F_CCA_RSA_VERIFY,
|
||||||
CCA4758_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
|
CCA4758_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -673,7 +673,7 @@ static int cca_rsa_verify(int type, const unsigned char *m, unsigned int m_len,
|
|||||||
case NID_md5_sha1 :
|
case NID_md5_sha1 :
|
||||||
if (m_len != SSL_SIG_LEN)
|
if (m_len != SSL_SIG_LEN)
|
||||||
{
|
{
|
||||||
CCA4758err(CCA4758_F_IBM_4758_CCA_VERIFY,
|
CCA4758err(CCA4758_F_CCA_RSA_VERIFY,
|
||||||
CCA4758_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
|
CCA4758_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -688,7 +688,7 @@ static int cca_rsa_verify(int type, const unsigned char *m, unsigned int m_len,
|
|||||||
(unsigned int)keyLength+1);
|
(unsigned int)keyLength+1);
|
||||||
if (!hashBuffer)
|
if (!hashBuffer)
|
||||||
{
|
{
|
||||||
CCA4758err(CCA4758_F_IBM_4758_CCA_VERIFY,
|
CCA4758err(CCA4758_F_CCA_RSA_VERIFY,
|
||||||
ERR_R_MALLOC_FAILURE);
|
ERR_R_MALLOC_FAILURE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -703,7 +703,7 @@ static int cca_rsa_verify(int type, const unsigned char *m, unsigned int m_len,
|
|||||||
(unsigned int)keyLength+1);
|
(unsigned int)keyLength+1);
|
||||||
if (!hashBuffer)
|
if (!hashBuffer)
|
||||||
{
|
{
|
||||||
CCA4758err(CCA4758_F_IBM_4758_CCA_VERIFY,
|
CCA4758err(CCA4758_F_CCA_RSA_VERIFY,
|
||||||
ERR_R_MALLOC_FAILURE);
|
ERR_R_MALLOC_FAILURE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -760,14 +760,14 @@ static int cca_rsa_sign(int type, const unsigned char *m, unsigned int m_len,
|
|||||||
|
|
||||||
if (!algorithm.algorithm)
|
if (!algorithm.algorithm)
|
||||||
{
|
{
|
||||||
CCA4758err(CCA4758_F_IBM_4758_CCA_SIGN,
|
CCA4758err(CCA4758_F_CCA_RSA_SIGN,
|
||||||
CCA4758_R_UNKNOWN_ALGORITHM_TYPE);
|
CCA4758_R_UNKNOWN_ALGORITHM_TYPE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!algorithm.algorithm->length)
|
if (!algorithm.algorithm->length)
|
||||||
{
|
{
|
||||||
CCA4758err(CCA4758_F_IBM_4758_CCA_SIGN,
|
CCA4758err(CCA4758_F_CCA_RSA_SIGN,
|
||||||
CCA4758_R_ASN1_OID_UNKNOWN_FOR_MD);
|
CCA4758_R_ASN1_OID_UNKNOWN_FOR_MD);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -787,7 +787,7 @@ static int cca_rsa_sign(int type, const unsigned char *m, unsigned int m_len,
|
|||||||
|
|
||||||
if (length - RSA_PKCS1_PADDING > keyLength)
|
if (length - RSA_PKCS1_PADDING > keyLength)
|
||||||
{
|
{
|
||||||
CCA4758err(CCA4758_F_IBM_4758_CCA_SIGN,
|
CCA4758err(CCA4758_F_CCA_RSA_SIGN,
|
||||||
CCA4758_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
|
CCA4758_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -797,7 +797,7 @@ static int cca_rsa_sign(int type, const unsigned char *m, unsigned int m_len,
|
|||||||
case NID_md5_sha1 :
|
case NID_md5_sha1 :
|
||||||
if (m_len != SSL_SIG_LEN)
|
if (m_len != SSL_SIG_LEN)
|
||||||
{
|
{
|
||||||
CCA4758err(CCA4758_F_IBM_4758_CCA_SIGN,
|
CCA4758err(CCA4758_F_CCA_RSA_SIGN,
|
||||||
CCA4758_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
|
CCA4758_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -811,7 +811,7 @@ static int cca_rsa_sign(int type, const unsigned char *m, unsigned int m_len,
|
|||||||
(unsigned int)keyLength+1);
|
(unsigned int)keyLength+1);
|
||||||
if (!hashBuffer)
|
if (!hashBuffer)
|
||||||
{
|
{
|
||||||
CCA4758err(CCA4758_F_IBM_4758_CCA_VERIFY,
|
CCA4758err(CCA4758_F_CCA_RSA_SIGN,
|
||||||
ERR_R_MALLOC_FAILURE);
|
ERR_R_MALLOC_FAILURE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -825,7 +825,7 @@ static int cca_rsa_sign(int type, const unsigned char *m, unsigned int m_len,
|
|||||||
(unsigned int)keyLength+1);
|
(unsigned int)keyLength+1);
|
||||||
if (!hashBuffer)
|
if (!hashBuffer)
|
||||||
{
|
{
|
||||||
CCA4758err(CCA4758_F_IBM_4758_CCA_VERIFY,
|
CCA4758err(CCA4758_F_CCA_RSA_SIGN,
|
||||||
ERR_R_MALLOC_FAILURE);
|
ERR_R_MALLOC_FAILURE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* hw_4758_cca_err.c */
|
/* e_4758_cca_err.c */
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved.
|
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -64,30 +64,34 @@
|
|||||||
|
|
||||||
/* BEGIN ERROR CODES */
|
/* BEGIN ERROR CODES */
|
||||||
#ifndef OPENSSL_NO_ERR
|
#ifndef OPENSSL_NO_ERR
|
||||||
|
|
||||||
|
#define ERR_FUNC(func) ERR_PACK(0,func,0)
|
||||||
|
#define ERR_REASON(reason) ERR_PACK(0,0,reason)
|
||||||
|
|
||||||
static ERR_STRING_DATA CCA4758_str_functs[]=
|
static ERR_STRING_DATA CCA4758_str_functs[]=
|
||||||
{
|
{
|
||||||
{ERR_PACK(0,CCA4758_F_IBM_4758_CCA_CTRL,0), "IBM_4758_CCA_CTRL"},
|
{ERR_FUNC(CCA4758_F_CCA_RSA_SIGN), "CCA_RSA_SIGN"},
|
||||||
{ERR_PACK(0,CCA4758_F_IBM_4758_CCA_FINISH,0), "IBM_4758_CCA_FINISH"},
|
{ERR_FUNC(CCA4758_F_CCA_RSA_VERIFY), "CCA_RSA_VERIFY"},
|
||||||
{ERR_PACK(0,CCA4758_F_IBM_4758_CCA_INIT,0), "IBM_4758_CCA_INIT"},
|
{ERR_FUNC(CCA4758_F_IBM_4758_CCA_CTRL), "IBM_4758_CCA_CTRL"},
|
||||||
{ERR_PACK(0,CCA4758_F_IBM_4758_CCA_LOAD_PRIVKEY,0), "IBM_4758_CCA_LOAD_PRIVKEY"},
|
{ERR_FUNC(CCA4758_F_IBM_4758_CCA_FINISH), "IBM_4758_CCA_FINISH"},
|
||||||
{ERR_PACK(0,CCA4758_F_IBM_4758_CCA_LOAD_PUBKEY,0), "IBM_4758_CCA_LOAD_PUBKEY"},
|
{ERR_FUNC(CCA4758_F_IBM_4758_CCA_INIT), "IBM_4758_CCA_INIT"},
|
||||||
{ERR_PACK(0,CCA4758_F_IBM_4758_CCA_SIGN,0), "IBM_4758_CCA_SIGN"},
|
{ERR_FUNC(CCA4758_F_IBM_4758_LOAD_PRIVKEY), "IBM_4758_LOAD_PRIVKEY"},
|
||||||
{ERR_PACK(0,CCA4758_F_IBM_4758_CCA_VERIFY,0), "IBM_4758_CCA_VERIFY"},
|
{ERR_FUNC(CCA4758_F_IBM_4758_LOAD_PUBKEY), "IBM_4758_LOAD_PUBKEY"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static ERR_STRING_DATA CCA4758_str_reasons[]=
|
static ERR_STRING_DATA CCA4758_str_reasons[]=
|
||||||
{
|
{
|
||||||
{CCA4758_R_ALREADY_LOADED ,"already loaded"},
|
{ERR_REASON(CCA4758_R_ALREADY_LOADED) ,"already loaded"},
|
||||||
{CCA4758_R_ASN1_OID_UNKNOWN_FOR_MD ,"asn1 oid unknown for md"},
|
{ERR_REASON(CCA4758_R_ASN1_OID_UNKNOWN_FOR_MD),"asn1 oid unknown for md"},
|
||||||
{CCA4758_R_COMMAND_NOT_IMPLEMENTED ,"command not implemented"},
|
{ERR_REASON(CCA4758_R_COMMAND_NOT_IMPLEMENTED),"command not implemented"},
|
||||||
{CCA4758_R_DSO_FAILURE ,"dso failure"},
|
{ERR_REASON(CCA4758_R_DSO_FAILURE) ,"dso failure"},
|
||||||
{CCA4758_R_FAILED_LOADING_PRIVATE_KEY ,"failed loading private key"},
|
{ERR_REASON(CCA4758_R_FAILED_LOADING_PRIVATE_KEY),"failed loading private key"},
|
||||||
{CCA4758_R_FAILED_LOADING_PUBLIC_KEY ,"failed loading public key"},
|
{ERR_REASON(CCA4758_R_FAILED_LOADING_PUBLIC_KEY),"failed loading public key"},
|
||||||
{CCA4758_R_NOT_LOADED ,"not loaded"},
|
{ERR_REASON(CCA4758_R_NOT_LOADED) ,"not loaded"},
|
||||||
{CCA4758_R_SIZE_TOO_LARGE_OR_TOO_SMALL ,"size too large or too small"},
|
{ERR_REASON(CCA4758_R_SIZE_TOO_LARGE_OR_TOO_SMALL),"size too large or too small"},
|
||||||
{CCA4758_R_UNIT_FAILURE ,"unit failure"},
|
{ERR_REASON(CCA4758_R_UNIT_FAILURE) ,"unit failure"},
|
||||||
{CCA4758_R_UNKNOWN_ALGORITHM_TYPE ,"unknown algorithm type"},
|
{ERR_REASON(CCA4758_R_UNKNOWN_ALGORITHM_TYPE),"unknown algorithm type"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -67,13 +67,13 @@ static void ERR_CCA4758_error(int function, int reason, char *file, int line);
|
|||||||
/* Error codes for the CCA4758 functions. */
|
/* Error codes for the CCA4758 functions. */
|
||||||
|
|
||||||
/* Function codes. */
|
/* Function codes. */
|
||||||
|
#define CCA4758_F_CCA_RSA_SIGN 105
|
||||||
|
#define CCA4758_F_CCA_RSA_VERIFY 106
|
||||||
#define CCA4758_F_IBM_4758_CCA_CTRL 100
|
#define CCA4758_F_IBM_4758_CCA_CTRL 100
|
||||||
#define CCA4758_F_IBM_4758_CCA_FINISH 101
|
#define CCA4758_F_IBM_4758_CCA_FINISH 101
|
||||||
#define CCA4758_F_IBM_4758_CCA_INIT 102
|
#define CCA4758_F_IBM_4758_CCA_INIT 102
|
||||||
#define CCA4758_F_IBM_4758_CCA_LOAD_PRIVKEY 103
|
#define CCA4758_F_IBM_4758_LOAD_PRIVKEY 103
|
||||||
#define CCA4758_F_IBM_4758_CCA_LOAD_PUBKEY 104
|
#define CCA4758_F_IBM_4758_LOAD_PUBKEY 104
|
||||||
#define CCA4758_F_IBM_4758_CCA_SIGN 105
|
|
||||||
#define CCA4758_F_IBM_4758_CCA_VERIFY 106
|
|
||||||
|
|
||||||
/* Reason codes. */
|
/* Reason codes. */
|
||||||
#define CCA4758_R_ALREADY_LOADED 100
|
#define CCA4758_R_ALREADY_LOADED 100
|
||||||
|
@ -620,7 +620,7 @@ static int aep_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
|||||||
rv = aep_return_connection(hConnection);
|
rv = aep_return_connection(hConnection);
|
||||||
if (rv != AEP_R_OK)
|
if (rv != AEP_R_OK)
|
||||||
{
|
{
|
||||||
AEPHKerr(AEPHK_F_AEP_RAND,AEPHK_R_RETURN_CONNECTION_FAILED);
|
AEPHKerr(AEPHK_F_AEP_MOD_EXP,AEPHK_R_RETURN_CONNECTION_FAILED);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -658,7 +658,7 @@ static AEP_RV aep_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
|||||||
rv = aep_return_connection(hConnection);
|
rv = aep_return_connection(hConnection);
|
||||||
if (rv != AEP_R_OK)
|
if (rv != AEP_R_OK)
|
||||||
{
|
{
|
||||||
AEPHKerr(AEPHK_F_AEP_RAND,AEPHK_R_RETURN_CONNECTION_FAILED);
|
AEPHKerr(AEPHK_F_AEP_MOD_EXP_CRT,AEPHK_R_RETURN_CONNECTION_FAILED);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* hw_aep_err.c */
|
/* e_aep_err.c */
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -64,38 +64,42 @@
|
|||||||
|
|
||||||
/* BEGIN ERROR CODES */
|
/* BEGIN ERROR CODES */
|
||||||
#ifndef OPENSSL_NO_ERR
|
#ifndef OPENSSL_NO_ERR
|
||||||
|
|
||||||
|
#define ERR_FUNC(func) ERR_PACK(0,func,0)
|
||||||
|
#define ERR_REASON(reason) ERR_PACK(0,0,reason)
|
||||||
|
|
||||||
static ERR_STRING_DATA AEPHK_str_functs[]=
|
static ERR_STRING_DATA AEPHK_str_functs[]=
|
||||||
{
|
{
|
||||||
{ERR_PACK(0,AEPHK_F_AEP_CTRL,0), "AEP_CTRL"},
|
{ERR_FUNC(AEPHK_F_AEP_CTRL), "AEP_CTRL"},
|
||||||
{ERR_PACK(0,AEPHK_F_AEP_FINISH,0), "AEP_FINISH"},
|
{ERR_FUNC(AEPHK_F_AEP_FINISH), "AEP_FINISH"},
|
||||||
{ERR_PACK(0,AEPHK_F_AEP_GET_CONNECTION,0), "AEP_GET_CONNECTION"},
|
{ERR_FUNC(AEPHK_F_AEP_GET_CONNECTION), "AEP_GET_CONNECTION"},
|
||||||
{ERR_PACK(0,AEPHK_F_AEP_INIT,0), "AEP_INIT"},
|
{ERR_FUNC(AEPHK_F_AEP_INIT), "AEP_INIT"},
|
||||||
{ERR_PACK(0,AEPHK_F_AEP_MOD_EXP,0), "AEP_MOD_EXP"},
|
{ERR_FUNC(AEPHK_F_AEP_MOD_EXP), "AEP_MOD_EXP"},
|
||||||
{ERR_PACK(0,AEPHK_F_AEP_MOD_EXP_CRT,0), "AEP_MOD_EXP_CRT"},
|
{ERR_FUNC(AEPHK_F_AEP_MOD_EXP_CRT), "AEP_MOD_EXP_CRT"},
|
||||||
{ERR_PACK(0,AEPHK_F_AEP_RAND,0), "AEP_RAND"},
|
{ERR_FUNC(AEPHK_F_AEP_RAND), "AEP_RAND"},
|
||||||
{ERR_PACK(0,AEPHK_F_AEP_RSA_MOD_EXP,0), "AEP_RSA_MOD_EXP"},
|
{ERR_FUNC(AEPHK_F_AEP_RSA_MOD_EXP), "AEP_RSA_MOD_EXP"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static ERR_STRING_DATA AEPHK_str_reasons[]=
|
static ERR_STRING_DATA AEPHK_str_reasons[]=
|
||||||
{
|
{
|
||||||
{AEPHK_R_ALREADY_LOADED ,"already loaded"},
|
{ERR_REASON(AEPHK_R_ALREADY_LOADED) ,"already loaded"},
|
||||||
{AEPHK_R_CLOSE_HANDLES_FAILED ,"close handles failed"},
|
{ERR_REASON(AEPHK_R_CLOSE_HANDLES_FAILED),"close handles failed"},
|
||||||
{AEPHK_R_CONNECTIONS_IN_USE ,"connections in use"},
|
{ERR_REASON(AEPHK_R_CONNECTIONS_IN_USE) ,"connections in use"},
|
||||||
{AEPHK_R_CTRL_COMMAND_NOT_IMPLEMENTED ,"ctrl command not implemented"},
|
{ERR_REASON(AEPHK_R_CTRL_COMMAND_NOT_IMPLEMENTED),"ctrl command not implemented"},
|
||||||
{AEPHK_R_FINALIZE_FAILED ,"finalize failed"},
|
{ERR_REASON(AEPHK_R_FINALIZE_FAILED) ,"finalize failed"},
|
||||||
{AEPHK_R_GET_HANDLE_FAILED ,"get handle failed"},
|
{ERR_REASON(AEPHK_R_GET_HANDLE_FAILED) ,"get handle failed"},
|
||||||
{AEPHK_R_GET_RANDOM_FAILED ,"get random failed"},
|
{ERR_REASON(AEPHK_R_GET_RANDOM_FAILED) ,"get random failed"},
|
||||||
{AEPHK_R_INIT_FAILURE ,"init failure"},
|
{ERR_REASON(AEPHK_R_INIT_FAILURE) ,"init failure"},
|
||||||
{AEPHK_R_MISSING_KEY_COMPONENTS ,"missing key components"},
|
{ERR_REASON(AEPHK_R_MISSING_KEY_COMPONENTS),"missing key components"},
|
||||||
{AEPHK_R_MOD_EXP_CRT_FAILED ,"mod exp crt failed"},
|
{ERR_REASON(AEPHK_R_MOD_EXP_CRT_FAILED) ,"mod exp crt failed"},
|
||||||
{AEPHK_R_MOD_EXP_FAILED ,"mod exp failed"},
|
{ERR_REASON(AEPHK_R_MOD_EXP_FAILED) ,"mod exp failed"},
|
||||||
{AEPHK_R_NOT_LOADED ,"not loaded"},
|
{ERR_REASON(AEPHK_R_NOT_LOADED) ,"not loaded"},
|
||||||
{AEPHK_R_OK ,"ok"},
|
{ERR_REASON(AEPHK_R_OK) ,"ok"},
|
||||||
{AEPHK_R_RETURN_CONNECTION_FAILED ,"return connection failed"},
|
{ERR_REASON(AEPHK_R_RETURN_CONNECTION_FAILED),"return connection failed"},
|
||||||
{AEPHK_R_SETBNCALLBACK_FAILURE ,"setbncallback failure"},
|
{ERR_REASON(AEPHK_R_SETBNCALLBACK_FAILURE),"setbncallback failure"},
|
||||||
{AEPHK_R_SIZE_TOO_LARGE_OR_TOO_SMALL ,"size too large or too small"},
|
{ERR_REASON(AEPHK_R_SIZE_TOO_LARGE_OR_TOO_SMALL),"size too large or too small"},
|
||||||
{AEPHK_R_UNIT_FAILURE ,"unit failure"},
|
{ERR_REASON(AEPHK_R_UNIT_FAILURE) ,"unit failure"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* hw_atalla_err.c */
|
/* e_atalla_err.c */
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -64,26 +64,30 @@
|
|||||||
|
|
||||||
/* BEGIN ERROR CODES */
|
/* BEGIN ERROR CODES */
|
||||||
#ifndef OPENSSL_NO_ERR
|
#ifndef OPENSSL_NO_ERR
|
||||||
|
|
||||||
|
#define ERR_FUNC(func) ERR_PACK(0,func,0)
|
||||||
|
#define ERR_REASON(reason) ERR_PACK(0,0,reason)
|
||||||
|
|
||||||
static ERR_STRING_DATA ATALLA_str_functs[]=
|
static ERR_STRING_DATA ATALLA_str_functs[]=
|
||||||
{
|
{
|
||||||
{ERR_PACK(0,ATALLA_F_ATALLA_CTRL,0), "ATALLA_CTRL"},
|
{ERR_FUNC(ATALLA_F_ATALLA_CTRL), "ATALLA_CTRL"},
|
||||||
{ERR_PACK(0,ATALLA_F_ATALLA_FINISH,0), "ATALLA_FINISH"},
|
{ERR_FUNC(ATALLA_F_ATALLA_FINISH), "ATALLA_FINISH"},
|
||||||
{ERR_PACK(0,ATALLA_F_ATALLA_INIT,0), "ATALLA_INIT"},
|
{ERR_FUNC(ATALLA_F_ATALLA_INIT), "ATALLA_INIT"},
|
||||||
{ERR_PACK(0,ATALLA_F_ATALLA_MOD_EXP,0), "ATALLA_MOD_EXP"},
|
{ERR_FUNC(ATALLA_F_ATALLA_MOD_EXP), "ATALLA_MOD_EXP"},
|
||||||
{ERR_PACK(0,ATALLA_F_ATALLA_RSA_MOD_EXP,0), "ATALLA_RSA_MOD_EXP"},
|
{ERR_FUNC(ATALLA_F_ATALLA_RSA_MOD_EXP), "ATALLA_RSA_MOD_EXP"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static ERR_STRING_DATA ATALLA_str_reasons[]=
|
static ERR_STRING_DATA ATALLA_str_reasons[]=
|
||||||
{
|
{
|
||||||
{ATALLA_R_ALREADY_LOADED ,"already loaded"},
|
{ERR_REASON(ATALLA_R_ALREADY_LOADED) ,"already loaded"},
|
||||||
{ATALLA_R_BN_CTX_FULL ,"bn ctx full"},
|
{ERR_REASON(ATALLA_R_BN_CTX_FULL) ,"bn ctx full"},
|
||||||
{ATALLA_R_BN_EXPAND_FAIL ,"bn expand fail"},
|
{ERR_REASON(ATALLA_R_BN_EXPAND_FAIL) ,"bn expand fail"},
|
||||||
{ATALLA_R_CTRL_COMMAND_NOT_IMPLEMENTED ,"ctrl command not implemented"},
|
{ERR_REASON(ATALLA_R_CTRL_COMMAND_NOT_IMPLEMENTED),"ctrl command not implemented"},
|
||||||
{ATALLA_R_MISSING_KEY_COMPONENTS ,"missing key components"},
|
{ERR_REASON(ATALLA_R_MISSING_KEY_COMPONENTS),"missing key components"},
|
||||||
{ATALLA_R_NOT_LOADED ,"not loaded"},
|
{ERR_REASON(ATALLA_R_NOT_LOADED) ,"not loaded"},
|
||||||
{ATALLA_R_REQUEST_FAILED ,"request failed"},
|
{ERR_REASON(ATALLA_R_REQUEST_FAILED) ,"request failed"},
|
||||||
{ATALLA_R_UNIT_FAILURE ,"unit failure"},
|
{ERR_REASON(ATALLA_R_UNIT_FAILURE) ,"unit failure"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -943,7 +943,7 @@ static int cswift_rand_bytes(unsigned char *buf, int num)
|
|||||||
|
|
||||||
if (!get_context(&hac))
|
if (!get_context(&hac))
|
||||||
{
|
{
|
||||||
CSWIFTerr(CSWIFT_F_CSWIFT_CTRL, CSWIFT_R_UNIT_FAILURE);
|
CSWIFTerr(CSWIFT_F_CSWIFT_RAND_BYTES, CSWIFT_R_UNIT_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
acquired = 1;
|
acquired = 1;
|
||||||
@ -963,7 +963,7 @@ static int cswift_rand_bytes(unsigned char *buf, int num)
|
|||||||
if (swrc != SW_OK)
|
if (swrc != SW_OK)
|
||||||
{
|
{
|
||||||
char tmpbuf[20];
|
char tmpbuf[20];
|
||||||
CSWIFTerr(CSWIFT_F_CSWIFT_CTRL, CSWIFT_R_REQUEST_FAILED);
|
CSWIFTerr(CSWIFT_F_CSWIFT_RAND_BYTES, CSWIFT_R_REQUEST_FAILED);
|
||||||
sprintf(tmpbuf, "%ld", swrc);
|
sprintf(tmpbuf, "%ld", swrc);
|
||||||
ERR_add_error_data(2, "CryptoSwift error number is ", tmpbuf);
|
ERR_add_error_data(2, "CryptoSwift error number is ", tmpbuf);
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* hw_cswift_err.c */
|
/* e_cswift_err.c */
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -64,30 +64,35 @@
|
|||||||
|
|
||||||
/* BEGIN ERROR CODES */
|
/* BEGIN ERROR CODES */
|
||||||
#ifndef OPENSSL_NO_ERR
|
#ifndef OPENSSL_NO_ERR
|
||||||
|
|
||||||
|
#define ERR_FUNC(func) ERR_PACK(0,func,0)
|
||||||
|
#define ERR_REASON(reason) ERR_PACK(0,0,reason)
|
||||||
|
|
||||||
static ERR_STRING_DATA CSWIFT_str_functs[]=
|
static ERR_STRING_DATA CSWIFT_str_functs[]=
|
||||||
{
|
{
|
||||||
{ERR_PACK(0,CSWIFT_F_CSWIFT_CTRL,0), "CSWIFT_CTRL"},
|
{ERR_FUNC(CSWIFT_F_CSWIFT_CTRL), "CSWIFT_CTRL"},
|
||||||
{ERR_PACK(0,CSWIFT_F_CSWIFT_DSA_SIGN,0), "CSWIFT_DSA_SIGN"},
|
{ERR_FUNC(CSWIFT_F_CSWIFT_DSA_SIGN), "CSWIFT_DSA_SIGN"},
|
||||||
{ERR_PACK(0,CSWIFT_F_CSWIFT_DSA_VERIFY,0), "CSWIFT_DSA_VERIFY"},
|
{ERR_FUNC(CSWIFT_F_CSWIFT_DSA_VERIFY), "CSWIFT_DSA_VERIFY"},
|
||||||
{ERR_PACK(0,CSWIFT_F_CSWIFT_FINISH,0), "CSWIFT_FINISH"},
|
{ERR_FUNC(CSWIFT_F_CSWIFT_FINISH), "CSWIFT_FINISH"},
|
||||||
{ERR_PACK(0,CSWIFT_F_CSWIFT_INIT,0), "CSWIFT_INIT"},
|
{ERR_FUNC(CSWIFT_F_CSWIFT_INIT), "CSWIFT_INIT"},
|
||||||
{ERR_PACK(0,CSWIFT_F_CSWIFT_MOD_EXP,0), "CSWIFT_MOD_EXP"},
|
{ERR_FUNC(CSWIFT_F_CSWIFT_MOD_EXP), "CSWIFT_MOD_EXP"},
|
||||||
{ERR_PACK(0,CSWIFT_F_CSWIFT_MOD_EXP_CRT,0), "CSWIFT_MOD_EXP_CRT"},
|
{ERR_FUNC(CSWIFT_F_CSWIFT_MOD_EXP_CRT), "CSWIFT_MOD_EXP_CRT"},
|
||||||
{ERR_PACK(0,CSWIFT_F_CSWIFT_RSA_MOD_EXP,0), "CSWIFT_RSA_MOD_EXP"},
|
{ERR_FUNC(CSWIFT_F_CSWIFT_RAND_BYTES), "CSWIFT_RAND_BYTES"},
|
||||||
|
{ERR_FUNC(CSWIFT_F_CSWIFT_RSA_MOD_EXP), "CSWIFT_RSA_MOD_EXP"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static ERR_STRING_DATA CSWIFT_str_reasons[]=
|
static ERR_STRING_DATA CSWIFT_str_reasons[]=
|
||||||
{
|
{
|
||||||
{CSWIFT_R_ALREADY_LOADED ,"already loaded"},
|
{ERR_REASON(CSWIFT_R_ALREADY_LOADED) ,"already loaded"},
|
||||||
{CSWIFT_R_BAD_KEY_SIZE ,"bad key size"},
|
{ERR_REASON(CSWIFT_R_BAD_KEY_SIZE) ,"bad key size"},
|
||||||
{CSWIFT_R_BN_CTX_FULL ,"bn ctx full"},
|
{ERR_REASON(CSWIFT_R_BN_CTX_FULL) ,"bn ctx full"},
|
||||||
{CSWIFT_R_BN_EXPAND_FAIL ,"bn expand fail"},
|
{ERR_REASON(CSWIFT_R_BN_EXPAND_FAIL) ,"bn expand fail"},
|
||||||
{CSWIFT_R_CTRL_COMMAND_NOT_IMPLEMENTED ,"ctrl command not implemented"},
|
{ERR_REASON(CSWIFT_R_CTRL_COMMAND_NOT_IMPLEMENTED),"ctrl command not implemented"},
|
||||||
{CSWIFT_R_MISSING_KEY_COMPONENTS ,"missing key components"},
|
{ERR_REASON(CSWIFT_R_MISSING_KEY_COMPONENTS),"missing key components"},
|
||||||
{CSWIFT_R_NOT_LOADED ,"not loaded"},
|
{ERR_REASON(CSWIFT_R_NOT_LOADED) ,"not loaded"},
|
||||||
{CSWIFT_R_REQUEST_FAILED ,"request failed"},
|
{ERR_REASON(CSWIFT_R_REQUEST_FAILED) ,"request failed"},
|
||||||
{CSWIFT_R_UNIT_FAILURE ,"unit failure"},
|
{ERR_REASON(CSWIFT_R_UNIT_FAILURE) ,"unit failure"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -74,6 +74,7 @@ static void ERR_CSWIFT_error(int function, int reason, char *file, int line);
|
|||||||
#define CSWIFT_F_CSWIFT_INIT 104
|
#define CSWIFT_F_CSWIFT_INIT 104
|
||||||
#define CSWIFT_F_CSWIFT_MOD_EXP 105
|
#define CSWIFT_F_CSWIFT_MOD_EXP 105
|
||||||
#define CSWIFT_F_CSWIFT_MOD_EXP_CRT 106
|
#define CSWIFT_F_CSWIFT_MOD_EXP_CRT 106
|
||||||
|
#define CSWIFT_F_CSWIFT_RAND_BYTES 108
|
||||||
#define CSWIFT_F_CSWIFT_RSA_MOD_EXP 107
|
#define CSWIFT_F_CSWIFT_RSA_MOD_EXP 107
|
||||||
|
|
||||||
/* Reason codes. */
|
/* Reason codes. */
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* e_gmp_err.c */
|
/* e_gmp_err.c */
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved.
|
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -64,18 +64,22 @@
|
|||||||
|
|
||||||
/* BEGIN ERROR CODES */
|
/* BEGIN ERROR CODES */
|
||||||
#ifndef OPENSSL_NO_ERR
|
#ifndef OPENSSL_NO_ERR
|
||||||
|
|
||||||
|
#define ERR_FUNC(func) ERR_PACK(0,func,0)
|
||||||
|
#define ERR_REASON(reason) ERR_PACK(0,0,reason)
|
||||||
|
|
||||||
static ERR_STRING_DATA GMP_str_functs[]=
|
static ERR_STRING_DATA GMP_str_functs[]=
|
||||||
{
|
{
|
||||||
{ERR_PACK(0,GMP_F_E_GMP_CTRL,0), "E_GMP_CTRL"},
|
{ERR_FUNC(GMP_F_E_GMP_CTRL), "E_GMP_CTRL"},
|
||||||
{ERR_PACK(0,GMP_F_E_GMP_RSA_MOD_EXP,0), "E_GMP_RSA_MOD_EXP"},
|
{ERR_FUNC(GMP_F_E_GMP_RSA_MOD_EXP), "E_GMP_RSA_MOD_EXP"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static ERR_STRING_DATA GMP_str_reasons[]=
|
static ERR_STRING_DATA GMP_str_reasons[]=
|
||||||
{
|
{
|
||||||
{GMP_R_CTRL_COMMAND_NOT_IMPLEMENTED ,"ctrl command not implemented"},
|
{ERR_REASON(GMP_R_CTRL_COMMAND_NOT_IMPLEMENTED),"ctrl command not implemented"},
|
||||||
{GMP_R_KEY_CONTEXT_ERROR ,"key context error"},
|
{ERR_REASON(GMP_R_KEY_CONTEXT_ERROR) ,"key context error"},
|
||||||
{GMP_R_MISSING_KEY_COMPONENTS ,"missing key components"},
|
{ERR_REASON(GMP_R_MISSING_KEY_COMPONENTS),"missing key components"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -808,7 +808,7 @@ static EVP_PKEY *hwcrhk_load_privkey(ENGINE *eng, const char *key_id,
|
|||||||
if (p_hwcrhk_RSAGetPublicKey(*hptr, &n, &e, &rmsg)
|
if (p_hwcrhk_RSAGetPublicKey(*hptr, &n, &e, &rmsg)
|
||||||
!= HWCRYPTOHOOK_ERROR_MPISIZE)
|
!= HWCRYPTOHOOK_ERROR_MPISIZE)
|
||||||
{
|
{
|
||||||
HWCRHKerr(HWCRHK_F_HWCRHK_LOAD_PUBKEY,HWCRHK_R_CHIL_ERROR);
|
HWCRHKerr(HWCRHK_F_HWCRHK_LOAD_PRIVKEY,HWCRHK_R_CHIL_ERROR);
|
||||||
ERR_add_error_data(1,rmsg.buf);
|
ERR_add_error_data(1,rmsg.buf);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
@ -820,7 +820,7 @@ static EVP_PKEY *hwcrhk_load_privkey(ENGINE *eng, const char *key_id,
|
|||||||
|
|
||||||
if (p_hwcrhk_RSAGetPublicKey(*hptr, &n, &e, &rmsg))
|
if (p_hwcrhk_RSAGetPublicKey(*hptr, &n, &e, &rmsg))
|
||||||
{
|
{
|
||||||
HWCRHKerr(HWCRHK_F_HWCRHK_LOAD_PUBKEY,
|
HWCRHKerr(HWCRHK_F_HWCRHK_LOAD_PRIVKEY,
|
||||||
HWCRHK_R_CHIL_ERROR);
|
HWCRHK_R_CHIL_ERROR);
|
||||||
ERR_add_error_data(1,rmsg.buf);
|
ERR_add_error_data(1,rmsg.buf);
|
||||||
goto err;
|
goto err;
|
||||||
@ -835,7 +835,7 @@ static EVP_PKEY *hwcrhk_load_privkey(ENGINE *eng, const char *key_id,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!res)
|
if (!res)
|
||||||
HWCRHKerr(HWCRHK_F_HWCRHK_LOAD_PUBKEY,
|
HWCRHKerr(HWCRHK_F_HWCRHK_LOAD_PRIVKEY,
|
||||||
HWCRHK_R_PRIVATE_KEY_ALGORITHMS_DISABLED);
|
HWCRHK_R_PRIVATE_KEY_ALGORITHMS_DISABLED);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
@ -962,7 +962,7 @@ static int hwcrhk_rsa_mod_exp(BIGNUM *r, const BIGNUM *I, RSA *rsa, BN_CTX *ctx)
|
|||||||
|
|
||||||
if(!hwcrhk_context)
|
if(!hwcrhk_context)
|
||||||
{
|
{
|
||||||
HWCRHKerr(HWCRHK_F_HWCRHK_MOD_EXP,HWCRHK_R_NOT_INITIALISED);
|
HWCRHKerr(HWCRHK_F_HWCRHK_RSA_MOD_EXP,HWCRHK_R_NOT_INITIALISED);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* e_ncipher_err.c */
|
/* e_ncipher_err.c */
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved.
|
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -64,38 +64,42 @@
|
|||||||
|
|
||||||
/* BEGIN ERROR CODES */
|
/* BEGIN ERROR CODES */
|
||||||
#ifndef OPENSSL_NO_ERR
|
#ifndef OPENSSL_NO_ERR
|
||||||
|
|
||||||
|
#define ERR_FUNC(func) ERR_PACK(0,func,0)
|
||||||
|
#define ERR_REASON(reason) ERR_PACK(0,0,reason)
|
||||||
|
|
||||||
static ERR_STRING_DATA HWCRHK_str_functs[]=
|
static ERR_STRING_DATA HWCRHK_str_functs[]=
|
||||||
{
|
{
|
||||||
{ERR_PACK(0,HWCRHK_F_HWCRHK_CTRL,0), "HWCRHK_CTRL"},
|
{ERR_FUNC(HWCRHK_F_HWCRHK_CTRL), "HWCRHK_CTRL"},
|
||||||
{ERR_PACK(0,HWCRHK_F_HWCRHK_FINISH,0), "HWCRHK_FINISH"},
|
{ERR_FUNC(HWCRHK_F_HWCRHK_FINISH), "HWCRHK_FINISH"},
|
||||||
{ERR_PACK(0,HWCRHK_F_HWCRHK_GET_PASS,0), "HWCRHK_GET_PASS"},
|
{ERR_FUNC(HWCRHK_F_HWCRHK_GET_PASS), "HWCRHK_GET_PASS"},
|
||||||
{ERR_PACK(0,HWCRHK_F_HWCRHK_INIT,0), "HWCRHK_INIT"},
|
{ERR_FUNC(HWCRHK_F_HWCRHK_INIT), "HWCRHK_INIT"},
|
||||||
{ERR_PACK(0,HWCRHK_F_HWCRHK_INSERT_CARD,0), "HWCRHK_INSERT_CARD"},
|
{ERR_FUNC(HWCRHK_F_HWCRHK_INSERT_CARD), "HWCRHK_INSERT_CARD"},
|
||||||
{ERR_PACK(0,HWCRHK_F_HWCRHK_LOAD_PRIVKEY,0), "HWCRHK_LOAD_PRIVKEY"},
|
{ERR_FUNC(HWCRHK_F_HWCRHK_LOAD_PRIVKEY), "HWCRHK_LOAD_PRIVKEY"},
|
||||||
{ERR_PACK(0,HWCRHK_F_HWCRHK_LOAD_PUBKEY,0), "HWCRHK_LOAD_PUBKEY"},
|
{ERR_FUNC(HWCRHK_F_HWCRHK_LOAD_PUBKEY), "HWCRHK_LOAD_PUBKEY"},
|
||||||
{ERR_PACK(0,HWCRHK_F_HWCRHK_MOD_EXP,0), "HWCRHK_MOD_EXP"},
|
{ERR_FUNC(HWCRHK_F_HWCRHK_MOD_EXP), "HWCRHK_MOD_EXP"},
|
||||||
{ERR_PACK(0,HWCRHK_F_HWCRHK_RAND_BYTES,0), "HWCRHK_RAND_BYTES"},
|
{ERR_FUNC(HWCRHK_F_HWCRHK_RAND_BYTES), "HWCRHK_RAND_BYTES"},
|
||||||
{ERR_PACK(0,HWCRHK_F_HWCRHK_RSA_MOD_EXP,0), "HWCRHK_RSA_MOD_EXP"},
|
{ERR_FUNC(HWCRHK_F_HWCRHK_RSA_MOD_EXP), "HWCRHK_RSA_MOD_EXP"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static ERR_STRING_DATA HWCRHK_str_reasons[]=
|
static ERR_STRING_DATA HWCRHK_str_reasons[]=
|
||||||
{
|
{
|
||||||
{HWCRHK_R_ALREADY_LOADED ,"already loaded"},
|
{ERR_REASON(HWCRHK_R_ALREADY_LOADED) ,"already loaded"},
|
||||||
{HWCRHK_R_BIO_WAS_FREED ,"bio was freed"},
|
{ERR_REASON(HWCRHK_R_BIO_WAS_FREED) ,"bio was freed"},
|
||||||
{HWCRHK_R_CHIL_ERROR ,"chil error"},
|
{ERR_REASON(HWCRHK_R_CHIL_ERROR) ,"chil error"},
|
||||||
{HWCRHK_R_CTRL_COMMAND_NOT_IMPLEMENTED ,"ctrl command not implemented"},
|
{ERR_REASON(HWCRHK_R_CTRL_COMMAND_NOT_IMPLEMENTED),"ctrl command not implemented"},
|
||||||
{HWCRHK_R_DSO_FAILURE ,"dso failure"},
|
{ERR_REASON(HWCRHK_R_DSO_FAILURE) ,"dso failure"},
|
||||||
{HWCRHK_R_LOCKING_MISSING ,"locking missing"},
|
{ERR_REASON(HWCRHK_R_LOCKING_MISSING) ,"locking missing"},
|
||||||
{HWCRHK_R_MISSING_KEY_COMPONENTS ,"missing key components"},
|
{ERR_REASON(HWCRHK_R_MISSING_KEY_COMPONENTS),"missing key components"},
|
||||||
{HWCRHK_R_NOT_INITIALISED ,"not initialised"},
|
{ERR_REASON(HWCRHK_R_NOT_INITIALISED) ,"not initialised"},
|
||||||
{HWCRHK_R_NOT_LOADED ,"not loaded"},
|
{ERR_REASON(HWCRHK_R_NOT_LOADED) ,"not loaded"},
|
||||||
{HWCRHK_R_NO_CALLBACK ,"no callback"},
|
{ERR_REASON(HWCRHK_R_NO_CALLBACK) ,"no callback"},
|
||||||
{HWCRHK_R_NO_KEY ,"no key"},
|
{ERR_REASON(HWCRHK_R_NO_KEY) ,"no key"},
|
||||||
{HWCRHK_R_PRIVATE_KEY_ALGORITHMS_DISABLED,"private key algorithms disabled"},
|
{ERR_REASON(HWCRHK_R_PRIVATE_KEY_ALGORITHMS_DISABLED),"private key algorithms disabled"},
|
||||||
{HWCRHK_R_REQUEST_FAILED ,"request failed"},
|
{ERR_REASON(HWCRHK_R_REQUEST_FAILED) ,"request failed"},
|
||||||
{HWCRHK_R_REQUEST_FALLBACK ,"request fallback"},
|
{ERR_REASON(HWCRHK_R_REQUEST_FALLBACK) ,"request fallback"},
|
||||||
{HWCRHK_R_UNIT_FAILURE ,"unit failure"},
|
{ERR_REASON(HWCRHK_R_UNIT_FAILURE) ,"unit failure"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* hw_nuron_err.c */
|
/* e_nuron_err.c */
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -64,23 +64,27 @@
|
|||||||
|
|
||||||
/* BEGIN ERROR CODES */
|
/* BEGIN ERROR CODES */
|
||||||
#ifndef OPENSSL_NO_ERR
|
#ifndef OPENSSL_NO_ERR
|
||||||
|
|
||||||
|
#define ERR_FUNC(func) ERR_PACK(0,func,0)
|
||||||
|
#define ERR_REASON(reason) ERR_PACK(0,0,reason)
|
||||||
|
|
||||||
static ERR_STRING_DATA NURON_str_functs[]=
|
static ERR_STRING_DATA NURON_str_functs[]=
|
||||||
{
|
{
|
||||||
{ERR_PACK(0,NURON_F_NURON_CTRL,0), "NURON_CTRL"},
|
{ERR_FUNC(NURON_F_NURON_CTRL), "NURON_CTRL"},
|
||||||
{ERR_PACK(0,NURON_F_NURON_FINISH,0), "NURON_FINISH"},
|
{ERR_FUNC(NURON_F_NURON_FINISH), "NURON_FINISH"},
|
||||||
{ERR_PACK(0,NURON_F_NURON_INIT,0), "NURON_INIT"},
|
{ERR_FUNC(NURON_F_NURON_INIT), "NURON_INIT"},
|
||||||
{ERR_PACK(0,NURON_F_NURON_MOD_EXP,0), "NURON_MOD_EXP"},
|
{ERR_FUNC(NURON_F_NURON_MOD_EXP), "NURON_MOD_EXP"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static ERR_STRING_DATA NURON_str_reasons[]=
|
static ERR_STRING_DATA NURON_str_reasons[]=
|
||||||
{
|
{
|
||||||
{NURON_R_ALREADY_LOADED ,"already loaded"},
|
{ERR_REASON(NURON_R_ALREADY_LOADED) ,"already loaded"},
|
||||||
{NURON_R_CTRL_COMMAND_NOT_IMPLEMENTED ,"ctrl command not implemented"},
|
{ERR_REASON(NURON_R_CTRL_COMMAND_NOT_IMPLEMENTED),"ctrl command not implemented"},
|
||||||
{NURON_R_DSO_FAILURE ,"dso failure"},
|
{ERR_REASON(NURON_R_DSO_FAILURE) ,"dso failure"},
|
||||||
{NURON_R_DSO_FUNCTION_NOT_FOUND ,"dso function not found"},
|
{ERR_REASON(NURON_R_DSO_FUNCTION_NOT_FOUND),"dso function not found"},
|
||||||
{NURON_R_DSO_NOT_FOUND ,"dso not found"},
|
{ERR_REASON(NURON_R_DSO_NOT_FOUND) ,"dso not found"},
|
||||||
{NURON_R_NOT_LOADED ,"not loaded"},
|
{ERR_REASON(NURON_R_NOT_LOADED) ,"not loaded"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -585,7 +585,7 @@ static void surewarehk_error_handling(char *const msg,int func,int ret)
|
|||||||
ENGINEerr(func,SUREWARE_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
|
ENGINEerr(func,SUREWARE_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
|
||||||
break;
|
break;
|
||||||
case SUREWAREHOOK_ERROR_INVALID_PAD:
|
case SUREWAREHOOK_ERROR_INVALID_PAD:
|
||||||
ENGINEerr(func,RSA_R_PADDING_CHECK_FAILED);
|
ENGINEerr(func,SUREWARE_R_PADDING_CHECK_FAILED);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ENGINEerr(func,SUREWARE_R_REQUEST_FAILED);
|
ENGINEerr(func,SUREWARE_R_REQUEST_FAILED);
|
||||||
@ -654,7 +654,7 @@ static EVP_PKEY* sureware_load_public(ENGINE *e,const char *key_id,char *hptr,un
|
|||||||
int ret=0;
|
int ret=0;
|
||||||
if(!p_surewarehk_Load_Rsa_Pubkey || !p_surewarehk_Load_Dsa_Pubkey)
|
if(!p_surewarehk_Load_Rsa_Pubkey || !p_surewarehk_Load_Dsa_Pubkey)
|
||||||
{
|
{
|
||||||
SUREWAREerr(SUREWARE_F_SUREWAREHK_LOAD_PUBLIC_KEY,ENGINE_R_NOT_INITIALISED);
|
SUREWAREerr(SUREWARE_F_SUREWARE_LOAD_PUBLIC,ENGINE_R_NOT_INITIALISED);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
switch (keytype)
|
switch (keytype)
|
||||||
@ -677,10 +677,10 @@ static EVP_PKEY* sureware_load_public(ENGINE *e,const char *key_id,char *hptr,un
|
|||||||
ret=p_surewarehk_Load_Rsa_Pubkey(msg,key_id,el,
|
ret=p_surewarehk_Load_Rsa_Pubkey(msg,key_id,el,
|
||||||
(unsigned long *)rsatmp->n->d,
|
(unsigned long *)rsatmp->n->d,
|
||||||
(unsigned long *)rsatmp->e->d);
|
(unsigned long *)rsatmp->e->d);
|
||||||
surewarehk_error_handling(msg,SUREWARE_F_SUREWAREHK_LOAD_PUBLIC_KEY,ret);
|
surewarehk_error_handling(msg,SUREWARE_F_SUREWARE_LOAD_PUBLIC,ret);
|
||||||
if (ret!=1)
|
if (ret!=1)
|
||||||
{
|
{
|
||||||
SUREWAREerr(SUREWARE_F_SUREWAREHK_LOAD_PRIVATE_KEY,ENGINE_R_FAILED_LOADING_PUBLIC_KEY);
|
SUREWAREerr(SUREWARE_F_SUREWARE_LOAD_PUBLIC,ENGINE_R_FAILED_LOADING_PUBLIC_KEY);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
/* normalise pub e and pub n */
|
/* normalise pub e and pub n */
|
||||||
@ -721,10 +721,10 @@ static EVP_PKEY* sureware_load_public(ENGINE *e,const char *key_id,char *hptr,un
|
|||||||
(unsigned long *)dsatmp->p->d,
|
(unsigned long *)dsatmp->p->d,
|
||||||
(unsigned long *)dsatmp->q->d,
|
(unsigned long *)dsatmp->q->d,
|
||||||
(unsigned long *)dsatmp->g->d);
|
(unsigned long *)dsatmp->g->d);
|
||||||
surewarehk_error_handling(msg,SUREWARE_F_SUREWAREHK_LOAD_PUBLIC_KEY,ret);
|
surewarehk_error_handling(msg,SUREWARE_F_SUREWARE_LOAD_PUBLIC,ret);
|
||||||
if (ret!=1)
|
if (ret!=1)
|
||||||
{
|
{
|
||||||
SUREWAREerr(SUREWARE_F_SUREWAREHK_LOAD_PRIVATE_KEY,ENGINE_R_FAILED_LOADING_PUBLIC_KEY);
|
SUREWAREerr(SUREWARE_F_SUREWARE_LOAD_PUBLIC,ENGINE_R_FAILED_LOADING_PUBLIC_KEY);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
/* set parameters */
|
/* set parameters */
|
||||||
@ -745,7 +745,7 @@ static EVP_PKEY* sureware_load_public(ENGINE *e,const char *key_id,char *hptr,un
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
SUREWAREerr(SUREWARE_F_SUREWAREHK_LOAD_PRIVATE_KEY,ENGINE_R_FAILED_LOADING_PRIVATE_KEY);
|
SUREWAREerr(SUREWARE_F_SUREWARE_LOAD_PUBLIC,ENGINE_R_FAILED_LOADING_PRIVATE_KEY);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
@ -775,14 +775,14 @@ static EVP_PKEY *surewarehk_load_privkey(ENGINE *e, const char *key_id,
|
|||||||
|
|
||||||
if(!p_surewarehk_Load_Privkey)
|
if(!p_surewarehk_Load_Privkey)
|
||||||
{
|
{
|
||||||
SUREWAREerr(SUREWARE_F_SUREWAREHK_LOAD_PRIVATE_KEY,ENGINE_R_NOT_INITIALISED);
|
SUREWAREerr(SUREWARE_F_SUREWAREHK_LOAD_PRIVKEY,ENGINE_R_NOT_INITIALISED);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ret=p_surewarehk_Load_Privkey(msg,key_id,&hptr,&el,&keytype);
|
ret=p_surewarehk_Load_Privkey(msg,key_id,&hptr,&el,&keytype);
|
||||||
if (ret!=1)
|
if (ret!=1)
|
||||||
{
|
{
|
||||||
SUREWAREerr(SUREWARE_F_SUREWAREHK_LOAD_PRIVATE_KEY,ENGINE_R_FAILED_LOADING_PRIVATE_KEY);
|
SUREWAREerr(SUREWARE_F_SUREWAREHK_LOAD_PRIVKEY,ENGINE_R_FAILED_LOADING_PRIVATE_KEY);
|
||||||
ERR_add_error_data(1,msg);
|
ERR_add_error_data(1,msg);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -803,7 +803,7 @@ static EVP_PKEY *surewarehk_load_pubkey(ENGINE *e, const char *key_id,
|
|||||||
|
|
||||||
if(!p_surewarehk_Info_Pubkey)
|
if(!p_surewarehk_Info_Pubkey)
|
||||||
{
|
{
|
||||||
SUREWAREerr(SUREWARE_F_SUREWAREHK_LOAD_PUBLIC_KEY,ENGINE_R_NOT_INITIALISED);
|
SUREWAREerr(SUREWARE_F_SUREWAREHK_LOAD_PUBKEY,ENGINE_R_NOT_INITIALISED);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -811,7 +811,7 @@ static EVP_PKEY *surewarehk_load_pubkey(ENGINE *e, const char *key_id,
|
|||||||
ret=p_surewarehk_Info_Pubkey(msg,key_id,&el,&keytype);
|
ret=p_surewarehk_Info_Pubkey(msg,key_id,&el,&keytype);
|
||||||
if (ret!=1)
|
if (ret!=1)
|
||||||
{
|
{
|
||||||
SUREWAREerr(SUREWARE_F_SUREWAREHK_LOAD_PUBLIC_KEY,ENGINE_R_FAILED_LOADING_PUBLIC_KEY);
|
SUREWAREerr(SUREWARE_F_SUREWAREHK_LOAD_PUBKEY,ENGINE_R_FAILED_LOADING_PUBLIC_KEY);
|
||||||
ERR_add_error_data(1,msg);
|
ERR_add_error_data(1,msg);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -842,7 +842,7 @@ static void surewarehk_dh_ex_free(void *obj, void *item, CRYPTO_EX_DATA *ad,
|
|||||||
{
|
{
|
||||||
if(!p_surewarehk_Free)
|
if(!p_surewarehk_Free)
|
||||||
{
|
{
|
||||||
SUREWAREerr(SUREWARE_F_SUREWAREHK_EX_FREE,ENGINE_R_NOT_INITIALISED);
|
SUREWAREerr(SUREWARE_F_SUREWAREHK_DH_EX_FREE,ENGINE_R_NOT_INITIALISED);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
p_surewarehk_Free((char *)item,1);
|
p_surewarehk_Free((char *)item,1);
|
||||||
@ -888,7 +888,7 @@ static int surewarehk_rsa_priv_dec(int flen,const unsigned char *from,unsigned c
|
|||||||
/* intermediate buffer for padding */
|
/* intermediate buffer for padding */
|
||||||
if ((buf=OPENSSL_malloc(tlen)) == NULL)
|
if ((buf=OPENSSL_malloc(tlen)) == NULL)
|
||||||
{
|
{
|
||||||
RSAerr(SUREWARE_F_SUREWAREHK_RSA_PRIV_DEC,ERR_R_MALLOC_FAILURE);
|
SUREWAREerr(SUREWARE_F_SUREWAREHK_RSA_PRIV_DEC,ERR_R_MALLOC_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
memcpy(buf,to,tlen);/* transfert to into buf */
|
memcpy(buf,to,tlen);/* transfert to into buf */
|
||||||
@ -906,11 +906,11 @@ static int surewarehk_rsa_priv_dec(int flen,const unsigned char *from,unsigned c
|
|||||||
ret=RSA_padding_check_none(to,tlen,(unsigned char *)buf,flen,tlen);
|
ret=RSA_padding_check_none(to,tlen,(unsigned char *)buf,flen,tlen);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
RSAerr(SUREWARE_F_SUREWAREHK_RSA_PRIV_DEC,RSA_R_UNKNOWN_PADDING_TYPE);
|
SUREWAREerr(SUREWARE_F_SUREWAREHK_RSA_PRIV_DEC,SUREWARE_R_UNKNOWN_PADDING_TYPE);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
RSAerr(SUREWARE_F_SUREWAREHK_RSA_PRIV_DEC,RSA_R_PADDING_CHECK_FAILED);
|
SUREWAREerr(SUREWARE_F_SUREWAREHK_RSA_PRIV_DEC,SUREWARE_R_PADDING_CHECK_FAILED);
|
||||||
}
|
}
|
||||||
err:
|
err:
|
||||||
if (buf)
|
if (buf)
|
||||||
@ -932,12 +932,12 @@ static int surewarehk_rsa_sign(int flen,const unsigned char *from,unsigned char
|
|||||||
char msg[64]="ENGINE_rsa_sign";
|
char msg[64]="ENGINE_rsa_sign";
|
||||||
if (!p_surewarehk_Rsa_Sign)
|
if (!p_surewarehk_Rsa_Sign)
|
||||||
{
|
{
|
||||||
SUREWAREerr(SUREWARE_F_SUREWAREHK_RSA_PRIV_ENC,ENGINE_R_NOT_INITIALISED);
|
SUREWAREerr(SUREWARE_F_SUREWAREHK_RSA_SIGN,ENGINE_R_NOT_INITIALISED);
|
||||||
}
|
}
|
||||||
/* extract ref to private key */
|
/* extract ref to private key */
|
||||||
else if (!(hptr=RSA_get_ex_data(rsa, rsaHndidx)))
|
else if (!(hptr=RSA_get_ex_data(rsa, rsaHndidx)))
|
||||||
{
|
{
|
||||||
SUREWAREerr(SUREWARE_F_SUREWAREHK_RSA_PRIV_ENC,SUREWARE_R_MISSING_KEY_COMPONENTS);
|
SUREWAREerr(SUREWARE_F_SUREWAREHK_RSA_SIGN,SUREWARE_R_MISSING_KEY_COMPONENTS);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -945,11 +945,11 @@ static int surewarehk_rsa_sign(int flen,const unsigned char *from,unsigned char
|
|||||||
{
|
{
|
||||||
case RSA_PKCS1_PADDING: /* do it in one shot */
|
case RSA_PKCS1_PADDING: /* do it in one shot */
|
||||||
ret=p_surewarehk_Rsa_Sign(msg,flen,(unsigned char *)from,&tlen,to,hptr,SUREWARE_PKCS1_PAD);
|
ret=p_surewarehk_Rsa_Sign(msg,flen,(unsigned char *)from,&tlen,to,hptr,SUREWARE_PKCS1_PAD);
|
||||||
surewarehk_error_handling(msg,SUREWARE_F_SUREWAREHK_RSA_PRIV_ENC,ret);
|
surewarehk_error_handling(msg,SUREWARE_F_SUREWAREHK_RSA_SIGN,ret);
|
||||||
break;
|
break;
|
||||||
case RSA_NO_PADDING:
|
case RSA_NO_PADDING:
|
||||||
default:
|
default:
|
||||||
RSAerr(SUREWARE_F_SUREWAREHK_RSA_PRIV_ENC,RSA_R_UNKNOWN_PADDING_TYPE);
|
SUREWAREerr(SUREWARE_F_SUREWAREHK_RSA_SIGN,SUREWARE_R_UNKNOWN_PADDING_TYPE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret==1 ? tlen : ret;
|
return ret==1 ? tlen : ret;
|
||||||
@ -1016,7 +1016,7 @@ static int surewarehk_modexp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
|||||||
char msg[64]="ENGINE_modexp";
|
char msg[64]="ENGINE_modexp";
|
||||||
if (!p_surewarehk_Mod_Exp)
|
if (!p_surewarehk_Mod_Exp)
|
||||||
{
|
{
|
||||||
SUREWAREerr(SUREWARE_F_SUREWAREHK_MOD_EXP,ENGINE_R_NOT_INITIALISED);
|
SUREWAREerr(SUREWARE_F_SUREWAREHK_MODEXP,ENGINE_R_NOT_INITIALISED);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1032,7 +1032,7 @@ static int surewarehk_modexp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
|||||||
a->top*sizeof(BN_ULONG),
|
a->top*sizeof(BN_ULONG),
|
||||||
(unsigned long *)a->d,
|
(unsigned long *)a->d,
|
||||||
(unsigned long *)r->d);
|
(unsigned long *)r->d);
|
||||||
surewarehk_error_handling(msg,SUREWARE_F_SUREWAREHK_MOD_EXP,ret);
|
surewarehk_error_handling(msg,SUREWARE_F_SUREWAREHK_MODEXP,ret);
|
||||||
if (ret==1)
|
if (ret==1)
|
||||||
{
|
{
|
||||||
/* normalise result */
|
/* normalise result */
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* hw_sureware_err.c */
|
/* e_sureware_err.c */
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -64,31 +64,39 @@
|
|||||||
|
|
||||||
/* BEGIN ERROR CODES */
|
/* BEGIN ERROR CODES */
|
||||||
#ifndef OPENSSL_NO_ERR
|
#ifndef OPENSSL_NO_ERR
|
||||||
|
|
||||||
|
#define ERR_FUNC(func) ERR_PACK(0,func,0)
|
||||||
|
#define ERR_REASON(reason) ERR_PACK(0,0,reason)
|
||||||
|
|
||||||
static ERR_STRING_DATA SUREWARE_str_functs[]=
|
static ERR_STRING_DATA SUREWARE_str_functs[]=
|
||||||
{
|
{
|
||||||
{ERR_PACK(0,SUREWARE_F_SUREWAREHK_CTRL,0), "SUREWAREHK_CTRL"},
|
{ERR_FUNC(SUREWARE_F_SUREWAREHK_CTRL), "SUREWAREHK_CTRL"},
|
||||||
{ERR_PACK(0,SUREWARE_F_SUREWAREHK_DSA_DO_SIGN,0), "SUREWAREHK_DSA_DO_SIGN"},
|
{ERR_FUNC(SUREWARE_F_SUREWAREHK_DH_EX_FREE), "SUREWAREHK_DH_EX_FREE"},
|
||||||
{ERR_PACK(0,SUREWARE_F_SUREWAREHK_EX_FREE,0), "SUREWAREHK_EX_FREE"},
|
{ERR_FUNC(SUREWARE_F_SUREWAREHK_DSA_DO_SIGN), "SUREWAREHK_DSA_DO_SIGN"},
|
||||||
{ERR_PACK(0,SUREWARE_F_SUREWAREHK_FINISH,0), "SUREWAREHK_FINISH"},
|
{ERR_FUNC(SUREWARE_F_SUREWAREHK_EX_FREE), "SUREWAREHK_EX_FREE"},
|
||||||
{ERR_PACK(0,SUREWARE_F_SUREWAREHK_INIT,0), "SUREWAREHK_INIT"},
|
{ERR_FUNC(SUREWARE_F_SUREWAREHK_FINISH), "SUREWAREHK_FINISH"},
|
||||||
{ERR_PACK(0,SUREWARE_F_SUREWAREHK_LOAD_PRIVATE_KEY,0), "SUREWAREHK_LOAD_PRIVATE_KEY"},
|
{ERR_FUNC(SUREWARE_F_SUREWAREHK_INIT), "SUREWAREHK_INIT"},
|
||||||
{ERR_PACK(0,SUREWARE_F_SUREWAREHK_LOAD_PUBLIC_KEY,0), "SUREWAREHK_LOAD_PUBLIC_KEY"},
|
{ERR_FUNC(SUREWARE_F_SUREWAREHK_LOAD_PRIVKEY), "SUREWAREHK_LOAD_PRIVKEY"},
|
||||||
{ERR_PACK(0,SUREWARE_F_SUREWAREHK_MOD_EXP,0), "SUREWAREHK_MOD_EXP"},
|
{ERR_FUNC(SUREWARE_F_SUREWAREHK_LOAD_PUBKEY), "SUREWAREHK_LOAD_PUBKEY"},
|
||||||
{ERR_PACK(0,SUREWARE_F_SUREWAREHK_RAND_BYTES,0), "SUREWAREHK_RAND_BYTES"},
|
{ERR_FUNC(SUREWARE_F_SUREWAREHK_MODEXP), "SUREWAREHK_MODEXP"},
|
||||||
{ERR_PACK(0,SUREWARE_F_SUREWAREHK_RAND_SEED,0), "SUREWAREHK_RAND_SEED"},
|
{ERR_FUNC(SUREWARE_F_SUREWAREHK_RAND_BYTES), "SUREWAREHK_RAND_BYTES"},
|
||||||
{ERR_PACK(0,SUREWARE_F_SUREWAREHK_RSA_PRIV_DEC,0), "SUREWAREHK_RSA_PRIV_DEC"},
|
{ERR_FUNC(SUREWARE_F_SUREWAREHK_RAND_SEED), "SUREWAREHK_RAND_SEED"},
|
||||||
{ERR_PACK(0,SUREWARE_F_SUREWAREHK_RSA_PRIV_ENC,0), "SUREWAREHK_RSA_PRIV_ENC"},
|
{ERR_FUNC(SUREWARE_F_SUREWAREHK_RSA_PRIV_DEC), "SUREWAREHK_RSA_PRIV_DEC"},
|
||||||
|
{ERR_FUNC(SUREWARE_F_SUREWAREHK_RSA_SIGN), "SUREWAREHK_RSA_SIGN"},
|
||||||
|
{ERR_FUNC(SUREWARE_F_SUREWARE_LOAD_PUBLIC), "SUREWARE_LOAD_PUBLIC"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static ERR_STRING_DATA SUREWARE_str_reasons[]=
|
static ERR_STRING_DATA SUREWARE_str_reasons[]=
|
||||||
{
|
{
|
||||||
{SUREWARE_R_BIO_WAS_FREED ,"bio was freed"},
|
{ERR_REASON(SUREWARE_R_BIO_WAS_FREED) ,"bio was freed"},
|
||||||
{SUREWARE_R_MISSING_KEY_COMPONENTS ,"missing key components"},
|
{ERR_REASON(SUREWARE_R_MISSING_KEY_COMPONENTS),"missing key components"},
|
||||||
{SUREWARE_R_REQUEST_FAILED ,"request failed"},
|
{ERR_REASON(SUREWARE_R_PADDING_CHECK_FAILED),"padding check failed"},
|
||||||
{SUREWARE_R_REQUEST_FALLBACK ,"request fallback"},
|
{ERR_REASON(SUREWARE_R_REQUEST_FAILED) ,"request failed"},
|
||||||
{SUREWARE_R_SIZE_TOO_LARGE_OR_TOO_SMALL ,"size too large or too small"},
|
{ERR_REASON(SUREWARE_R_REQUEST_FALLBACK) ,"request fallback"},
|
||||||
{SUREWARE_R_UNIT_FAILURE ,"unit failure"},
|
{ERR_REASON(SUREWARE_R_SIZE_TOO_LARGE_OR_TOO_SMALL),"size too large or too small"},
|
||||||
|
{ERR_REASON(SUREWARE_R_UNIT_FAILURE) ,"unit failure"},
|
||||||
|
{ERR_REASON(SUREWARE_R_UNKNOWN_PADDING_TYPE),"unknown padding type"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -68,25 +68,29 @@ static void ERR_SUREWARE_error(int function, int reason, char *file, int line);
|
|||||||
|
|
||||||
/* Function codes. */
|
/* Function codes. */
|
||||||
#define SUREWARE_F_SUREWAREHK_CTRL 100
|
#define SUREWARE_F_SUREWAREHK_CTRL 100
|
||||||
|
#define SUREWARE_F_SUREWAREHK_DH_EX_FREE 112
|
||||||
#define SUREWARE_F_SUREWAREHK_DSA_DO_SIGN 101
|
#define SUREWARE_F_SUREWAREHK_DSA_DO_SIGN 101
|
||||||
#define SUREWARE_F_SUREWAREHK_EX_FREE 102
|
#define SUREWARE_F_SUREWAREHK_EX_FREE 102
|
||||||
#define SUREWARE_F_SUREWAREHK_FINISH 103
|
#define SUREWARE_F_SUREWAREHK_FINISH 103
|
||||||
#define SUREWARE_F_SUREWAREHK_INIT 104
|
#define SUREWARE_F_SUREWAREHK_INIT 104
|
||||||
#define SUREWARE_F_SUREWAREHK_LOAD_PRIVATE_KEY 105
|
#define SUREWARE_F_SUREWAREHK_LOAD_PRIVKEY 105
|
||||||
#define SUREWARE_F_SUREWAREHK_LOAD_PUBLIC_KEY 106
|
#define SUREWARE_F_SUREWAREHK_LOAD_PUBKEY 113
|
||||||
#define SUREWARE_F_SUREWAREHK_MOD_EXP 107
|
#define SUREWARE_F_SUREWAREHK_MODEXP 107
|
||||||
#define SUREWARE_F_SUREWAREHK_RAND_BYTES 108
|
#define SUREWARE_F_SUREWAREHK_RAND_BYTES 108
|
||||||
#define SUREWARE_F_SUREWAREHK_RAND_SEED 109
|
#define SUREWARE_F_SUREWAREHK_RAND_SEED 109
|
||||||
#define SUREWARE_F_SUREWAREHK_RSA_PRIV_DEC 110
|
#define SUREWARE_F_SUREWAREHK_RSA_PRIV_DEC 110
|
||||||
#define SUREWARE_F_SUREWAREHK_RSA_PRIV_ENC 111
|
#define SUREWARE_F_SUREWAREHK_RSA_SIGN 111
|
||||||
|
#define SUREWARE_F_SUREWARE_LOAD_PUBLIC 106
|
||||||
|
|
||||||
/* Reason codes. */
|
/* Reason codes. */
|
||||||
#define SUREWARE_R_BIO_WAS_FREED 100
|
#define SUREWARE_R_BIO_WAS_FREED 100
|
||||||
#define SUREWARE_R_MISSING_KEY_COMPONENTS 105
|
#define SUREWARE_R_MISSING_KEY_COMPONENTS 105
|
||||||
|
#define SUREWARE_R_PADDING_CHECK_FAILED 106
|
||||||
#define SUREWARE_R_REQUEST_FAILED 101
|
#define SUREWARE_R_REQUEST_FAILED 101
|
||||||
#define SUREWARE_R_REQUEST_FALLBACK 102
|
#define SUREWARE_R_REQUEST_FALLBACK 102
|
||||||
#define SUREWARE_R_SIZE_TOO_LARGE_OR_TOO_SMALL 103
|
#define SUREWARE_R_SIZE_TOO_LARGE_OR_TOO_SMALL 103
|
||||||
#define SUREWARE_R_UNIT_FAILURE 104
|
#define SUREWARE_R_UNIT_FAILURE 104
|
||||||
|
#define SUREWARE_R_UNKNOWN_PADDING_TYPE 107
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -573,7 +573,7 @@ static int ubsec_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
|||||||
|
|
||||||
if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0) {
|
if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0) {
|
||||||
fd = 0;
|
fd = 0;
|
||||||
UBSECerr(UBSEC_F_UBSEC_INIT, UBSEC_R_UNIT_FAILURE);
|
UBSECerr(UBSEC_F_UBSEC_MOD_EXP, UBSEC_R_UNIT_FAILURE);
|
||||||
return BN_mod_exp(r, a, p, m, ctx);
|
return BN_mod_exp(r, a, p, m, ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -632,18 +632,18 @@ static int ubsec_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
|||||||
|
|
||||||
/* Check if hardware can't handle this argument. */
|
/* Check if hardware can't handle this argument. */
|
||||||
if (y_len > max_key_len) {
|
if (y_len > max_key_len) {
|
||||||
UBSECerr(UBSEC_F_UBSEC_MOD_EXP, UBSEC_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
|
UBSECerr(UBSEC_F_UBSEC_MOD_EXP_CRT, UBSEC_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
|
||||||
return FAIL_TO_SOFTWARE;
|
return FAIL_TO_SOFTWARE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!bn_wexpand(r, p->top + q->top + 1)) {
|
if (!bn_wexpand(r, p->top + q->top + 1)) {
|
||||||
UBSECerr(UBSEC_F_UBSEC_RSA_MOD_EXP_CRT, UBSEC_R_BN_EXPAND_FAIL);
|
UBSECerr(UBSEC_F_UBSEC_MOD_EXP_CRT, UBSEC_R_BN_EXPAND_FAIL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0) {
|
if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0) {
|
||||||
fd = 0;
|
fd = 0;
|
||||||
UBSECerr(UBSEC_F_UBSEC_INIT, UBSEC_R_UNIT_FAILURE);
|
UBSECerr(UBSEC_F_UBSEC_MOD_EXP_CRT, UBSEC_R_UNIT_FAILURE);
|
||||||
return FAIL_TO_SOFTWARE;
|
return FAIL_TO_SOFTWARE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -655,7 +655,7 @@ static int ubsec_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
|||||||
(unsigned char *)dq->d, BN_num_bits(dq),
|
(unsigned char *)dq->d, BN_num_bits(dq),
|
||||||
(unsigned char *)q->d, BN_num_bits(q),
|
(unsigned char *)q->d, BN_num_bits(q),
|
||||||
(unsigned char *)r->d, &y_len) != 0) {
|
(unsigned char *)r->d, &y_len) != 0) {
|
||||||
UBSECerr(UBSEC_F_UBSEC_MOD_EXP, UBSEC_R_REQUEST_FAILED);
|
UBSECerr(UBSEC_F_UBSEC_MOD_EXP_CRT, UBSEC_R_REQUEST_FAILED);
|
||||||
p_UBSEC_ubsec_close(fd);
|
p_UBSEC_ubsec_close(fd);
|
||||||
return FAIL_TO_SOFTWARE;
|
return FAIL_TO_SOFTWARE;
|
||||||
}
|
}
|
||||||
@ -749,19 +749,19 @@ static DSA_SIG *ubsec_dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
|
|||||||
|
|
||||||
if(!bn_wexpand(r, (160+BN_BITS2-1)/BN_BITS2) ||
|
if(!bn_wexpand(r, (160+BN_BITS2-1)/BN_BITS2) ||
|
||||||
(!bn_wexpand(s, (160+BN_BITS2-1)/BN_BITS2))) {
|
(!bn_wexpand(s, (160+BN_BITS2-1)/BN_BITS2))) {
|
||||||
UBSECerr(UBSEC_F_UBSEC_DSA_SIGN, UBSEC_R_BN_EXPAND_FAIL);
|
UBSECerr(UBSEC_F_UBSEC_DSA_DO_SIGN, UBSEC_R_BN_EXPAND_FAIL);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BN_bin2bn(dgst,dlen,&m) == NULL) {
|
if (BN_bin2bn(dgst,dlen,&m) == NULL) {
|
||||||
UBSECerr(UBSEC_F_UBSEC_DSA_SIGN, UBSEC_R_BN_EXPAND_FAIL);
|
UBSECerr(UBSEC_F_UBSEC_DSA_DO_SIGN, UBSEC_R_BN_EXPAND_FAIL);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0) {
|
if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0) {
|
||||||
const DSA_METHOD *meth;
|
const DSA_METHOD *meth;
|
||||||
fd = 0;
|
fd = 0;
|
||||||
UBSECerr(UBSEC_F_UBSEC_INIT, UBSEC_R_UNIT_FAILURE);
|
UBSECerr(UBSEC_F_UBSEC_DSA_DO_SIGN, UBSEC_R_UNIT_FAILURE);
|
||||||
meth = DSA_OpenSSL();
|
meth = DSA_OpenSSL();
|
||||||
to_return = meth->dsa_do_sign(dgst, dlen, dsa);
|
to_return = meth->dsa_do_sign(dgst, dlen, dsa);
|
||||||
goto err;
|
goto err;
|
||||||
@ -778,7 +778,7 @@ static DSA_SIG *ubsec_dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
|
|||||||
(unsigned char *)s->d, &s_len ) != 0) {
|
(unsigned char *)s->d, &s_len ) != 0) {
|
||||||
const DSA_METHOD *meth;
|
const DSA_METHOD *meth;
|
||||||
|
|
||||||
UBSECerr(UBSEC_F_UBSEC_DSA_SIGN, UBSEC_R_REQUEST_FAILED);
|
UBSECerr(UBSEC_F_UBSEC_DSA_DO_SIGN, UBSEC_R_REQUEST_FAILED);
|
||||||
p_UBSEC_ubsec_close(fd);
|
p_UBSEC_ubsec_close(fd);
|
||||||
meth = DSA_OpenSSL();
|
meth = DSA_OpenSSL();
|
||||||
to_return = meth->dsa_do_sign(dgst, dlen, dsa);
|
to_return = meth->dsa_do_sign(dgst, dlen, dsa);
|
||||||
@ -793,7 +793,7 @@ static DSA_SIG *ubsec_dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
|
|||||||
|
|
||||||
to_return = DSA_SIG_new();
|
to_return = DSA_SIG_new();
|
||||||
if(to_return == NULL) {
|
if(to_return == NULL) {
|
||||||
UBSECerr(UBSEC_F_UBSEC_DSA_SIGN, UBSEC_R_BN_EXPAND_FAIL);
|
UBSECerr(UBSEC_F_UBSEC_DSA_DO_SIGN, UBSEC_R_BN_EXPAND_FAIL);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -820,7 +820,7 @@ static int ubsec_dsa_verify(const unsigned char *dgst, int dgst_len,
|
|||||||
BN_init(&v);
|
BN_init(&v);
|
||||||
|
|
||||||
if(!bn_wexpand(&v, dsa->p->top)) {
|
if(!bn_wexpand(&v, dsa->p->top)) {
|
||||||
UBSECerr(UBSEC_F_UBSEC_DSA_VERIFY ,UBSEC_R_BN_EXPAND_FAIL);
|
UBSECerr(UBSEC_F_UBSEC_DSA_VERIFY, UBSEC_R_BN_EXPAND_FAIL);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -831,7 +831,7 @@ static int ubsec_dsa_verify(const unsigned char *dgst, int dgst_len,
|
|||||||
if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0) {
|
if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0) {
|
||||||
const DSA_METHOD *meth;
|
const DSA_METHOD *meth;
|
||||||
fd = 0;
|
fd = 0;
|
||||||
UBSECerr(UBSEC_F_UBSEC_INIT, UBSEC_R_UNIT_FAILURE);
|
UBSECerr(UBSEC_F_UBSEC_DSA_VERIFY, UBSEC_R_UNIT_FAILURE);
|
||||||
meth = DSA_OpenSSL();
|
meth = DSA_OpenSSL();
|
||||||
to_return = meth->dsa_do_verify(dgst, dgst_len, sig, dsa);
|
to_return = meth->dsa_do_verify(dgst, dgst_len, sig, dsa);
|
||||||
goto err;
|
goto err;
|
||||||
@ -847,7 +847,7 @@ static int ubsec_dsa_verify(const unsigned char *dgst, int dgst_len,
|
|||||||
(unsigned char *)sig->s->d, BN_num_bits(sig->s),
|
(unsigned char *)sig->s->d, BN_num_bits(sig->s),
|
||||||
(unsigned char *)v.d, &v_len) != 0) {
|
(unsigned char *)v.d, &v_len) != 0) {
|
||||||
const DSA_METHOD *meth;
|
const DSA_METHOD *meth;
|
||||||
UBSECerr(UBSEC_F_UBSEC_DSA_VERIFY , UBSEC_R_REQUEST_FAILED);
|
UBSECerr(UBSEC_F_UBSEC_DSA_VERIFY, UBSEC_R_REQUEST_FAILED);
|
||||||
p_UBSEC_ubsec_close(fd);
|
p_UBSEC_ubsec_close(fd);
|
||||||
|
|
||||||
meth = DSA_OpenSSL();
|
meth = DSA_OpenSSL();
|
||||||
@ -866,7 +866,7 @@ err:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_DH
|
#ifndef OPENSSL_NO_DH
|
||||||
static int ubsec_dh_compute_key (unsigned char *key,const BIGNUM *pub_key,DH *dh)
|
static int ubsec_dh_compute_key(unsigned char *key,const BIGNUM *pub_key,DH *dh)
|
||||||
{
|
{
|
||||||
int ret = -1,
|
int ret = -1,
|
||||||
k_len,
|
k_len,
|
||||||
@ -877,7 +877,7 @@ static int ubsec_dh_compute_key (unsigned char *key,const BIGNUM *pub_key,DH *dh
|
|||||||
if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0)
|
if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0)
|
||||||
{
|
{
|
||||||
const DH_METHOD *meth;
|
const DH_METHOD *meth;
|
||||||
ENGINEerr(UBSEC_F_UBSEC_INIT, UBSEC_R_UNIT_FAILURE);
|
UBSECerr(UBSEC_F_UBSEC_DH_COMPUTE_KEY, UBSEC_R_UNIT_FAILURE);
|
||||||
meth = DH_OpenSSL();
|
meth = DH_OpenSSL();
|
||||||
ret = meth->compute_key(key, pub_key, dh);
|
ret = meth->compute_key(key, pub_key, dh);
|
||||||
goto err;
|
goto err;
|
||||||
@ -891,7 +891,7 @@ static int ubsec_dh_compute_key (unsigned char *key,const BIGNUM *pub_key,DH *dh
|
|||||||
{
|
{
|
||||||
/* Hardware's a no go, failover to software */
|
/* Hardware's a no go, failover to software */
|
||||||
const DH_METHOD *meth;
|
const DH_METHOD *meth;
|
||||||
ENGINEerr(UBSEC_F_UBSEC_DH_COMPUTE_KEY, UBSEC_R_REQUEST_FAILED);
|
UBSECerr(UBSEC_F_UBSEC_DH_COMPUTE_KEY, UBSEC_R_REQUEST_FAILED);
|
||||||
p_UBSEC_ubsec_close(fd);
|
p_UBSEC_ubsec_close(fd);
|
||||||
|
|
||||||
meth = DH_OpenSSL();
|
meth = DH_OpenSSL();
|
||||||
@ -907,7 +907,7 @@ err:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ubsec_dh_generate_key (DH *dh)
|
static int ubsec_dh_generate_key(DH *dh)
|
||||||
{
|
{
|
||||||
int ret = 0,
|
int ret = 0,
|
||||||
random_bits = 0,
|
random_bits = 0,
|
||||||
@ -953,7 +953,7 @@ static int ubsec_dh_generate_key (DH *dh)
|
|||||||
if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0)
|
if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0)
|
||||||
{
|
{
|
||||||
const DH_METHOD *meth;
|
const DH_METHOD *meth;
|
||||||
ENGINEerr(UBSEC_F_UBSEC_INIT, UBSEC_R_UNIT_FAILURE);
|
UBSECerr(UBSEC_F_UBSEC_DH_GENERATE_KEY, UBSEC_R_UNIT_FAILURE);
|
||||||
meth = DH_OpenSSL();
|
meth = DH_OpenSSL();
|
||||||
ret = meth->generate_key(dh);
|
ret = meth->generate_key(dh);
|
||||||
goto err;
|
goto err;
|
||||||
@ -969,7 +969,7 @@ static int ubsec_dh_generate_key (DH *dh)
|
|||||||
/* Hardware's a no go, failover to software */
|
/* Hardware's a no go, failover to software */
|
||||||
const DH_METHOD *meth;
|
const DH_METHOD *meth;
|
||||||
|
|
||||||
ENGINEerr(UBSEC_F_UBSEC_DH_COMPUTE_KEY, UBSEC_R_REQUEST_FAILED);
|
UBSECerr(UBSEC_F_UBSEC_DH_GENERATE_KEY, UBSEC_R_REQUEST_FAILED);
|
||||||
p_UBSEC_ubsec_close(fd);
|
p_UBSEC_ubsec_close(fd);
|
||||||
|
|
||||||
meth = DH_OpenSSL();
|
meth = DH_OpenSSL();
|
||||||
@ -1001,7 +1001,7 @@ static int ubsec_rand_bytes(unsigned char * buf,
|
|||||||
if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0)
|
if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0)
|
||||||
{
|
{
|
||||||
const RAND_METHOD *meth;
|
const RAND_METHOD *meth;
|
||||||
ENGINEerr(UBSEC_F_UBSEC_INIT, UBSEC_R_UNIT_FAILURE);
|
UBSECerr(UBSEC_F_UBSEC_RAND_BYTES, UBSEC_R_UNIT_FAILURE);
|
||||||
num = p_UBSEC_ubsec_bits_to_bytes(num);
|
num = p_UBSEC_ubsec_bits_to_bytes(num);
|
||||||
meth = RAND_SSLeay();
|
meth = RAND_SSLeay();
|
||||||
meth->seed(buf, num);
|
meth->seed(buf, num);
|
||||||
@ -1019,7 +1019,7 @@ static int ubsec_rand_bytes(unsigned char * buf,
|
|||||||
/* Hardware's a no go, failover to software */
|
/* Hardware's a no go, failover to software */
|
||||||
const RAND_METHOD *meth;
|
const RAND_METHOD *meth;
|
||||||
|
|
||||||
ENGINEerr(UBSEC_F_UBSEC_RNG_BYTES, UBSEC_R_REQUEST_FAILED);
|
UBSECerr(UBSEC_F_UBSEC_RAND_BYTES, UBSEC_R_REQUEST_FAILED);
|
||||||
p_UBSEC_ubsec_close(fd);
|
p_UBSEC_ubsec_close(fd);
|
||||||
|
|
||||||
num = p_UBSEC_ubsec_bits_to_bytes(num);
|
num = p_UBSEC_ubsec_bits_to_bytes(num);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* hw_ubsec_err.c */
|
/* e_ubsec_err.c */
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -64,32 +64,38 @@
|
|||||||
|
|
||||||
/* BEGIN ERROR CODES */
|
/* BEGIN ERROR CODES */
|
||||||
#ifndef OPENSSL_NO_ERR
|
#ifndef OPENSSL_NO_ERR
|
||||||
|
|
||||||
|
#define ERR_FUNC(func) ERR_PACK(0,func,0)
|
||||||
|
#define ERR_REASON(reason) ERR_PACK(0,0,reason)
|
||||||
|
|
||||||
static ERR_STRING_DATA UBSEC_str_functs[]=
|
static ERR_STRING_DATA UBSEC_str_functs[]=
|
||||||
{
|
{
|
||||||
{ERR_PACK(0,UBSEC_F_UBSEC_CTRL,0), "UBSEC_CTRL"},
|
{ERR_FUNC(UBSEC_F_UBSEC_CTRL), "UBSEC_CTRL"},
|
||||||
{ERR_PACK(0,UBSEC_F_UBSEC_DH_COMPUTE_KEY,0), "UBSEC_DH_COMPUTE_KEY"},
|
{ERR_FUNC(UBSEC_F_UBSEC_DH_COMPUTE_KEY), "UBSEC_DH_COMPUTE_KEY"},
|
||||||
{ERR_PACK(0,UBSEC_F_UBSEC_DSA_SIGN,0), "UBSEC_DSA_SIGN"},
|
{ERR_FUNC(UBSEC_F_UBSEC_DH_GENERATE_KEY), "UBSEC_DH_GENERATE_KEY"},
|
||||||
{ERR_PACK(0,UBSEC_F_UBSEC_DSA_VERIFY,0), "UBSEC_DSA_VERIFY"},
|
{ERR_FUNC(UBSEC_F_UBSEC_DSA_DO_SIGN), "UBSEC_DSA_DO_SIGN"},
|
||||||
{ERR_PACK(0,UBSEC_F_UBSEC_FINISH,0), "UBSEC_FINISH"},
|
{ERR_FUNC(UBSEC_F_UBSEC_DSA_VERIFY), "UBSEC_DSA_VERIFY"},
|
||||||
{ERR_PACK(0,UBSEC_F_UBSEC_INIT,0), "UBSEC_INIT"},
|
{ERR_FUNC(UBSEC_F_UBSEC_FINISH), "UBSEC_FINISH"},
|
||||||
{ERR_PACK(0,UBSEC_F_UBSEC_MOD_EXP,0), "UBSEC_MOD_EXP"},
|
{ERR_FUNC(UBSEC_F_UBSEC_INIT), "UBSEC_INIT"},
|
||||||
{ERR_PACK(0,UBSEC_F_UBSEC_RNG_BYTES,0), "UBSEC_RNG_BYTES"},
|
{ERR_FUNC(UBSEC_F_UBSEC_MOD_EXP), "UBSEC_MOD_EXP"},
|
||||||
{ERR_PACK(0,UBSEC_F_UBSEC_RSA_MOD_EXP,0), "UBSEC_RSA_MOD_EXP"},
|
{ERR_FUNC(UBSEC_F_UBSEC_MOD_EXP_CRT), "UBSEC_MOD_EXP_CRT"},
|
||||||
{ERR_PACK(0,UBSEC_F_UBSEC_RSA_MOD_EXP_CRT,0), "UBSEC_RSA_MOD_EXP_CRT"},
|
{ERR_FUNC(UBSEC_F_UBSEC_RAND_BYTES), "UBSEC_RAND_BYTES"},
|
||||||
|
{ERR_FUNC(UBSEC_F_UBSEC_RSA_MOD_EXP), "UBSEC_RSA_MOD_EXP"},
|
||||||
|
{ERR_FUNC(UBSEC_F_UBSEC_RSA_MOD_EXP_CRT), "UBSEC_RSA_MOD_EXP_CRT"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static ERR_STRING_DATA UBSEC_str_reasons[]=
|
static ERR_STRING_DATA UBSEC_str_reasons[]=
|
||||||
{
|
{
|
||||||
{UBSEC_R_ALREADY_LOADED ,"already loaded"},
|
{ERR_REASON(UBSEC_R_ALREADY_LOADED) ,"already loaded"},
|
||||||
{UBSEC_R_BN_EXPAND_FAIL ,"bn expand fail"},
|
{ERR_REASON(UBSEC_R_BN_EXPAND_FAIL) ,"bn expand fail"},
|
||||||
{UBSEC_R_CTRL_COMMAND_NOT_IMPLEMENTED ,"ctrl command not implemented"},
|
{ERR_REASON(UBSEC_R_CTRL_COMMAND_NOT_IMPLEMENTED),"ctrl command not implemented"},
|
||||||
{UBSEC_R_DSO_FAILURE ,"dso failure"},
|
{ERR_REASON(UBSEC_R_DSO_FAILURE) ,"dso failure"},
|
||||||
{UBSEC_R_MISSING_KEY_COMPONENTS ,"missing key components"},
|
{ERR_REASON(UBSEC_R_MISSING_KEY_COMPONENTS),"missing key components"},
|
||||||
{UBSEC_R_NOT_LOADED ,"not loaded"},
|
{ERR_REASON(UBSEC_R_NOT_LOADED) ,"not loaded"},
|
||||||
{UBSEC_R_REQUEST_FAILED ,"request failed"},
|
{ERR_REASON(UBSEC_R_REQUEST_FAILED) ,"request failed"},
|
||||||
{UBSEC_R_SIZE_TOO_LARGE_OR_TOO_SMALL ,"size too large or too small"},
|
{ERR_REASON(UBSEC_R_SIZE_TOO_LARGE_OR_TOO_SMALL),"size too large or too small"},
|
||||||
{UBSEC_R_UNIT_FAILURE ,"unit failure"},
|
{ERR_REASON(UBSEC_R_UNIT_FAILURE) ,"unit failure"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -69,12 +69,14 @@ static void ERR_UBSEC_error(int function, int reason, char *file, int line);
|
|||||||
/* Function codes. */
|
/* Function codes. */
|
||||||
#define UBSEC_F_UBSEC_CTRL 100
|
#define UBSEC_F_UBSEC_CTRL 100
|
||||||
#define UBSEC_F_UBSEC_DH_COMPUTE_KEY 101
|
#define UBSEC_F_UBSEC_DH_COMPUTE_KEY 101
|
||||||
#define UBSEC_F_UBSEC_DSA_SIGN 102
|
#define UBSEC_F_UBSEC_DH_GENERATE_KEY 111
|
||||||
|
#define UBSEC_F_UBSEC_DSA_DO_SIGN 102
|
||||||
#define UBSEC_F_UBSEC_DSA_VERIFY 103
|
#define UBSEC_F_UBSEC_DSA_VERIFY 103
|
||||||
#define UBSEC_F_UBSEC_FINISH 104
|
#define UBSEC_F_UBSEC_FINISH 104
|
||||||
#define UBSEC_F_UBSEC_INIT 105
|
#define UBSEC_F_UBSEC_INIT 105
|
||||||
#define UBSEC_F_UBSEC_MOD_EXP 106
|
#define UBSEC_F_UBSEC_MOD_EXP 106
|
||||||
#define UBSEC_F_UBSEC_RNG_BYTES 107
|
#define UBSEC_F_UBSEC_MOD_EXP_CRT 110
|
||||||
|
#define UBSEC_F_UBSEC_RAND_BYTES 107
|
||||||
#define UBSEC_F_UBSEC_RSA_MOD_EXP 108
|
#define UBSEC_F_UBSEC_RSA_MOD_EXP 108
|
||||||
#define UBSEC_F_UBSEC_RSA_MOD_EXP_CRT 109
|
#define UBSEC_F_UBSEC_RSA_MOD_EXP_CRT 109
|
||||||
|
|
||||||
|
@ -1091,7 +1091,7 @@ start:
|
|||||||
if (s->s3->tmp.new_cipher == NULL)
|
if (s->s3->tmp.new_cipher == NULL)
|
||||||
{
|
{
|
||||||
al=SSL_AD_UNEXPECTED_MESSAGE;
|
al=SSL_AD_UNEXPECTED_MESSAGE;
|
||||||
SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_CCS_RECEIVED_EARLY);
|
SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_CCS_RECEIVED_EARLY);
|
||||||
goto f_err;
|
goto f_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ foreach $file (@ARGV)
|
|||||||
$n=$2;
|
$n=$2;
|
||||||
|
|
||||||
if ($lib ne $errlib)
|
if ($lib ne $errlib)
|
||||||
{ print "$file:$.:$func:$n\n"; next; }
|
{ print "$file:$.:$func:$n [${errlib}err]\n"; next; }
|
||||||
|
|
||||||
$n =~ tr/A-Z/a-z/;
|
$n =~ tr/A-Z/a-z/;
|
||||||
if (($n ne $func) && ($errlib ne "SYS"))
|
if (($n ne $func) && ($errlib ne "SYS"))
|
||||||
|
@ -148,7 +148,7 @@ while (($hdr, $lib) = each %libinc)
|
|||||||
my $name = $1;
|
my $name = $1;
|
||||||
$name =~ tr/[a-z]/[A-Z]/;
|
$name =~ tr/[a-z]/[A-Z]/;
|
||||||
$ftrans{$name} = $1;
|
$ftrans{$name} = $1;
|
||||||
} elsif (/\(/ and not (/=/ or /DECLARE_STACK/)) {
|
} elsif (/\(/ and not (/=/ or /DECLARE_STACK/ or /TYPEDEF_D2I2D_OF/)) {
|
||||||
print STDERR "Header $hdr: cannot parse: $_;\n";
|
print STDERR "Header $hdr: cannot parse: $_;\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user