diff options
author | tedu <> | 2014-05-30 03:31:29 +0000 |
---|---|---|
committer | tedu <> | 2014-05-30 03:31:29 +0000 |
commit | eabe480fe28b41eb99034e3189aa5158a1cc815d (patch) | |
tree | 666d68fd1404009d15c35763c054b7bab94ac8b4 /src | |
parent | 9598b4272312fc9b55154e675c1adb3a21b491b3 (diff) | |
download | openbsd-eabe480fe28b41eb99034e3189aa5158a1cc815d.tar.gz openbsd-eabe480fe28b41eb99034e3189aa5158a1cc815d.tar.bz2 openbsd-eabe480fe28b41eb99034e3189aa5158a1cc815d.zip |
remove CONST_STRICT. ok beck deraadt
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/asn1/a_object.c | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/bio/bio.h | 7 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/evp.h | 6 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/asn1/a_object.c | 2 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/bio/bio.h | 7 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/evp/evp.h | 6 |
6 files changed, 2 insertions, 28 deletions
diff --git a/src/lib/libcrypto/asn1/a_object.c b/src/lib/libcrypto/asn1/a_object.c index f86d54f527..b3a7e672ee 100644 --- a/src/lib/libcrypto/asn1/a_object.c +++ b/src/lib/libcrypto/asn1/a_object.c | |||
@@ -365,12 +365,10 @@ ASN1_OBJECT_free(ASN1_OBJECT *a) | |||
365 | if (a == NULL) | 365 | if (a == NULL) |
366 | return; | 366 | return; |
367 | if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_STRINGS) { | 367 | if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_STRINGS) { |
368 | #ifndef CONST_STRICT /* disable purely for compile-time strict const checking. Doing this on a "real" compile will cause memory leaks */ | ||
369 | if (a->sn != NULL) | 368 | if (a->sn != NULL) |
370 | free((void *)a->sn); | 369 | free((void *)a->sn); |
371 | if (a->ln != NULL) | 370 | if (a->ln != NULL) |
372 | free((void *)a->ln); | 371 | free((void *)a->ln); |
373 | #endif | ||
374 | a->sn = a->ln = NULL; | 372 | a->sn = a->ln = NULL; |
375 | } | 373 | } |
376 | if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_DATA) { | 374 | if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_DATA) { |
diff --git a/src/lib/libcrypto/bio/bio.h b/src/lib/libcrypto/bio/bio.h index 6809b70e9d..43562d4872 100644 --- a/src/lib/libcrypto/bio/bio.h +++ b/src/lib/libcrypto/bio/bio.h | |||
@@ -499,15 +499,8 @@ struct bio_dgram_sctp_prinfo { | |||
499 | 499 | ||
500 | /* name is cast to lose const, but might be better to route through a function | 500 | /* name is cast to lose const, but might be better to route through a function |
501 | so we can do it safely */ | 501 | so we can do it safely */ |
502 | #ifdef CONST_STRICT | ||
503 | /* If you are wondering why this isn't defined, its because CONST_STRICT is | ||
504 | * purely a compile-time kludge to allow const to be checked. | ||
505 | */ | ||
506 | int BIO_read_filename(BIO *b, const char *name); | ||
507 | #else | ||
508 | #define BIO_read_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \ | 502 | #define BIO_read_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \ |
509 | BIO_CLOSE|BIO_FP_READ,(char *)name) | 503 | BIO_CLOSE|BIO_FP_READ,(char *)name) |
510 | #endif | ||
511 | #define BIO_write_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \ | 504 | #define BIO_write_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \ |
512 | BIO_CLOSE|BIO_FP_WRITE,name) | 505 | BIO_CLOSE|BIO_FP_WRITE,name) |
513 | #define BIO_append_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \ | 506 | #define BIO_append_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \ |
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h index 3bd36e9266..c32e49dd62 100644 --- a/src/lib/libcrypto/evp/evp.h +++ b/src/lib/libcrypto/evp/evp.h | |||
@@ -510,11 +510,7 @@ unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx); | |||
510 | #define EVP_DigestSignUpdate(a,b,c) EVP_DigestUpdate(a,b,c) | 510 | #define EVP_DigestSignUpdate(a,b,c) EVP_DigestUpdate(a,b,c) |
511 | #define EVP_DigestVerifyUpdate(a,b,c) EVP_DigestUpdate(a,b,c) | 511 | #define EVP_DigestVerifyUpdate(a,b,c) EVP_DigestUpdate(a,b,c) |
512 | 512 | ||
513 | #ifdef CONST_STRICT | 513 | #define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,0,(char *)md) |
514 | void BIO_set_md(BIO *, const EVP_MD *md); | ||
515 | #else | ||
516 | # define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,0,(char *)md) | ||
517 | #endif | ||
518 | #define BIO_get_md(b,mdp) BIO_ctrl(b,BIO_C_GET_MD,0,(char *)mdp) | 514 | #define BIO_get_md(b,mdp) BIO_ctrl(b,BIO_C_GET_MD,0,(char *)mdp) |
519 | #define BIO_get_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_GET_MD_CTX,0,(char *)mdcp) | 515 | #define BIO_get_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_GET_MD_CTX,0,(char *)mdcp) |
520 | #define BIO_set_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_SET_MD_CTX,0,(char *)mdcp) | 516 | #define BIO_set_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_SET_MD_CTX,0,(char *)mdcp) |
diff --git a/src/lib/libssl/src/crypto/asn1/a_object.c b/src/lib/libssl/src/crypto/asn1/a_object.c index f86d54f527..b3a7e672ee 100644 --- a/src/lib/libssl/src/crypto/asn1/a_object.c +++ b/src/lib/libssl/src/crypto/asn1/a_object.c | |||
@@ -365,12 +365,10 @@ ASN1_OBJECT_free(ASN1_OBJECT *a) | |||
365 | if (a == NULL) | 365 | if (a == NULL) |
366 | return; | 366 | return; |
367 | if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_STRINGS) { | 367 | if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_STRINGS) { |
368 | #ifndef CONST_STRICT /* disable purely for compile-time strict const checking. Doing this on a "real" compile will cause memory leaks */ | ||
369 | if (a->sn != NULL) | 368 | if (a->sn != NULL) |
370 | free((void *)a->sn); | 369 | free((void *)a->sn); |
371 | if (a->ln != NULL) | 370 | if (a->ln != NULL) |
372 | free((void *)a->ln); | 371 | free((void *)a->ln); |
373 | #endif | ||
374 | a->sn = a->ln = NULL; | 372 | a->sn = a->ln = NULL; |
375 | } | 373 | } |
376 | if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_DATA) { | 374 | if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_DATA) { |
diff --git a/src/lib/libssl/src/crypto/bio/bio.h b/src/lib/libssl/src/crypto/bio/bio.h index 6809b70e9d..43562d4872 100644 --- a/src/lib/libssl/src/crypto/bio/bio.h +++ b/src/lib/libssl/src/crypto/bio/bio.h | |||
@@ -499,15 +499,8 @@ struct bio_dgram_sctp_prinfo { | |||
499 | 499 | ||
500 | /* name is cast to lose const, but might be better to route through a function | 500 | /* name is cast to lose const, but might be better to route through a function |
501 | so we can do it safely */ | 501 | so we can do it safely */ |
502 | #ifdef CONST_STRICT | ||
503 | /* If you are wondering why this isn't defined, its because CONST_STRICT is | ||
504 | * purely a compile-time kludge to allow const to be checked. | ||
505 | */ | ||
506 | int BIO_read_filename(BIO *b, const char *name); | ||
507 | #else | ||
508 | #define BIO_read_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \ | 502 | #define BIO_read_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \ |
509 | BIO_CLOSE|BIO_FP_READ,(char *)name) | 503 | BIO_CLOSE|BIO_FP_READ,(char *)name) |
510 | #endif | ||
511 | #define BIO_write_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \ | 504 | #define BIO_write_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \ |
512 | BIO_CLOSE|BIO_FP_WRITE,name) | 505 | BIO_CLOSE|BIO_FP_WRITE,name) |
513 | #define BIO_append_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \ | 506 | #define BIO_append_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \ |
diff --git a/src/lib/libssl/src/crypto/evp/evp.h b/src/lib/libssl/src/crypto/evp/evp.h index 3bd36e9266..c32e49dd62 100644 --- a/src/lib/libssl/src/crypto/evp/evp.h +++ b/src/lib/libssl/src/crypto/evp/evp.h | |||
@@ -510,11 +510,7 @@ unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx); | |||
510 | #define EVP_DigestSignUpdate(a,b,c) EVP_DigestUpdate(a,b,c) | 510 | #define EVP_DigestSignUpdate(a,b,c) EVP_DigestUpdate(a,b,c) |
511 | #define EVP_DigestVerifyUpdate(a,b,c) EVP_DigestUpdate(a,b,c) | 511 | #define EVP_DigestVerifyUpdate(a,b,c) EVP_DigestUpdate(a,b,c) |
512 | 512 | ||
513 | #ifdef CONST_STRICT | 513 | #define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,0,(char *)md) |
514 | void BIO_set_md(BIO *, const EVP_MD *md); | ||
515 | #else | ||
516 | # define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,0,(char *)md) | ||
517 | #endif | ||
518 | #define BIO_get_md(b,mdp) BIO_ctrl(b,BIO_C_GET_MD,0,(char *)mdp) | 514 | #define BIO_get_md(b,mdp) BIO_ctrl(b,BIO_C_GET_MD,0,(char *)mdp) |
519 | #define BIO_get_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_GET_MD_CTX,0,(char *)mdcp) | 515 | #define BIO_get_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_GET_MD_CTX,0,(char *)mdcp) |
520 | #define BIO_set_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_SET_MD_CTX,0,(char *)mdcp) | 516 | #define BIO_set_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_SET_MD_CTX,0,(char *)mdcp) |