1 diff -ur openssl-0.9.8i-ORIG/apps/speed.c openssl-0.9.8i/apps/speed.c
2 --- openssl-0.9.8i/apps/speed.c 2007-11-15 13:33:47.000000000 +0000
3 +++ openssl-0.9.8i/apps/speed-new.c 2008-12-04 00:00:00.000000000 +0000
6 ret=RSA_verify(NID_md5_sha1, buf,36, buf2,
12 "RSA verify failure\n");
13 diff -ur openssl-0.9.8i-ORIG/apps/spkac.c openssl-0.9.8i/apps/spkac.c
14 --- openssl-0.9.8i-ORIG/apps/spkac.c 2005-04-05 19:11:18.000000000 +0000
15 +++ openssl-0.9.8i/apps/spkac.c 2008-12-04 00:00:00.000000000 +0000
17 pkey = NETSCAPE_SPKI_get_pubkey(spki);
19 i = NETSCAPE_SPKI_verify(spki, pkey);
20 - if(i) BIO_printf(bio_err, "Signature OK\n");
21 + if (i > 0) BIO_printf(bio_err, "Signature OK\n");
23 BIO_printf(bio_err, "Signature Failure\n");
24 ERR_print_errors(bio_err);
25 diff -ur openssl-0.9.8i-ORIG/apps/verify.c openssl-0.9.8i/apps/verify.c
26 --- openssl-0.9.8i-ORIG/apps/verify.c 2004-11-29 11:28:07.000000000 +0000
27 +++ openssl-0.9.8i/apps/verify.c 2008-12-04 00:00:00.600000000 +0000
35 fprintf(stdout,"OK\n");
42 diff -ur openssl-0.9.8i-ORIG/apps/x509.c openssl-0.9.8i/apps/x509.c
43 --- openssl-0.9.8i-ORIG/apps/x509.c 2007-10-12 00:00:10.000000000 +0000
44 +++ openssl-0.9.8i/apps/x509.c 2008-12-04 00:00:00.400000000 +0000
46 /* NOTE: this certificate can/should be self signed, unless it was
47 * a certificate request in which case it is not. */
48 X509_STORE_CTX_set_cert(&xsc,x);
49 - if (!reqfile && !X509_verify_cert(&xsc))
50 + if (!reqfile && X509_verify_cert(&xsc) <= 0)
53 if (!X509_check_private_key(xca,pkey))
54 diff -ur openssl-0.9.8i-ORIG/crypto/cms/cms_sd.c openssl-0.9.8i/crypto/cms/cms_sd.c
55 --- openssl-0.9.8i-ORIG/crypto/cms/cms_sd.c 2008-04-06 16:30:38.000000000 +0000
56 +++ openssl-0.9.8i/crypto/cms/cms_sd.c 2008-12-04 00:00:00.400000000 +0000
58 cms_fixup_mctx(&mctx, si->pkey);
59 r = EVP_VerifyFinal(&mctx,
60 si->signature->data, si->signature->length, si->pkey);
63 CMSerr(CMS_F_CMS_SIGNERINFO_VERIFY, CMS_R_VERIFICATION_FAILURE);
65 EVP_MD_CTX_cleanup(&mctx);
66 diff -ur openssl-0.9.8i-ORIG/ssl/s2_clnt.c openssl-0.9.8i/ssl/s2_clnt.c
67 --- openssl-0.9.8i-ORIG/ssl/s2_clnt.c 2007-09-06 12:43:53.000000000 +0000
68 +++ openssl-0.9.8i/ssl/s2_clnt.c 2008-12-04 00:00:00.100000000 +0000
71 i=ssl_verify_cert_chain(s,sk);
73 - if ((s->verify_mode != SSL_VERIFY_NONE) && (!i))
74 + if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0))
76 SSLerr(SSL_F_SSL2_SET_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED);
78 diff -ur openssl-0.9.8i-ORIG/ssl/s2_srvr.c openssl-0.9.8i/ssl/s2_srvr.c
79 --- openssl-0.9.8i-ORIG/ssl/s2_srvr.c 2007-09-06 12:43:53.000000000 +0000
80 +++ openssl-0.9.8i/ssl/s2_srvr.c 2008-12-04 00:00:00.900000000 +0000
83 i=ssl_verify_cert_chain(s,sk);
85 - if (i) /* we like the packet, now check the chksum */
86 + if (i > 0) /* we like the packet, now check the chksum */
92 EVP_MD_CTX_cleanup(&ctx);
97 if (s->session->peer != NULL)
98 X509_free(s->session->peer);
99 diff -ur openssl-0.9.8i-ORIG/ssl/s3_clnt.c openssl-0.9.8i/ssl/s3_clnt.c
100 --- openssl-0.9.8i-ORIG/ssl/s3_clnt.c 2008-06-16 16:56:41.000000000 +0000
101 +++ openssl-0.9.8i/ssl/s3_clnt.c 2008-12-04 00:00:00.100000000 +0000
105 i=ssl_verify_cert_chain(s,sk);
106 - if ((s->verify_mode != SSL_VERIFY_NONE) && (!i)
107 + if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0)
108 #ifndef OPENSSL_NO_KRB5
109 && (s->s3->tmp.new_cipher->algorithms & (SSL_MKEY_MASK|SSL_AUTH_MASK))
110 != (SSL_aKRB5|SSL_kKRB5)
111 @@ -1459,7 +1459,7 @@
112 EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE);
113 EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE);
114 EVP_VerifyUpdate(&md_ctx,param,param_len);
115 - if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey))
116 + if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0)
119 al=SSL_AD_DECRYPT_ERROR;
120 @@ -1477,7 +1477,7 @@
121 EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE);
122 EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE);
123 EVP_VerifyUpdate(&md_ctx,param,param_len);
124 - if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey))
125 + if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0)
128 al=SSL_AD_DECRYPT_ERROR;
129 diff -ur openssl-0.9.8i-ORIG/ssl/s3_srvr.c openssl-0.9.8i/ssl/s3_srvr.c
130 --- openssl-0.9.8i-ORIG/ssl/s3_srvr.c 2008-09-14 18:16:09.000000000 +0000
131 +++ openssl-0.9.8i/ssl/s3_srvr.c 2008-12-04 00:00:00.100000000 +0000
132 @@ -2560,7 +2560,7 @@
135 i=ssl_verify_cert_chain(s,sk);
139 al=ssl_verify_alarm_type(s->verify_result);
140 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_NO_CERTIFICATE_RETURNED);
141 diff -ur openssl-0.9.8i-ORIG/ssl/ssltest.c openssl-0.9.8i/ssl/ssltest.c
142 --- openssl-0.9.8i-ORIG/ssl/ssltest.c 2008-06-16 16:56:42.000000000 +0000
143 +++ openssl-0.9.8i/ssl/ssltest.c 2008-12-04 00:00:00.900000000 +0000
144 @@ -2093,7 +2093,7 @@
146 if (cb_arg->proxy_auth)
151 const char *cond_end = NULL;