comparison libpurple/certificate.c @ 19515:b62683f4120d

There's some disagreement over the response-id sent to the callbacks to purple_request_action. The best fix is to not use the same callback. Fix this so when I click 'Yes', purple doesn't think I REJECTED the certification.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 28 Aug 2007 21:17:28 +0000
parents d5ecaf5bce93
children 7bea9c9fd2a5
comparison
equal deleted inserted replaced
19514:7b348650524e 19515:b62683f4120d
1122 purple_certificate_verify_complete(vrq, 1122 purple_certificate_verify_complete(vrq,
1123 PURPLE_CERTIFICATE_INVALID); 1123 PURPLE_CERTIFICATE_INVALID);
1124 } 1124 }
1125 } 1125 }
1126 1126
1127 static void
1128 x509_tls_cached_user_auth_accept_cb(x509_tls_cached_ua_ctx *c, gint ignore)
1129 {
1130 x509_tls_cached_user_auth_cb(c, 2);
1131 }
1132
1133 static void
1134 x509_tls_cached_user_auth_reject_cb(x509_tls_cached_ua_ctx *c, gint ignore)
1135 {
1136 x509_tls_cached_user_auth_cb(c, 1);
1137 }
1138
1127 /** Validates a certificate by asking the user 1139 /** Validates a certificate by asking the user
1128 * @param reason String to explain why the user needs to accept/refuse the 1140 * @param reason String to explain why the user needs to accept/refuse the
1129 * certificate. 1141 * certificate.
1130 * @todo Needs a handle argument 1142 * @todo Needs a handle argument
1131 */ 1143 */
1149 NULL, /* No account */ 1161 NULL, /* No account */
1150 NULL, /* No other user */ 1162 NULL, /* No other user */
1151 NULL, /* No associated conversation */ 1163 NULL, /* No associated conversation */
1152 x509_tls_cached_ua_ctx_new(vrq, reason), 1164 x509_tls_cached_ua_ctx_new(vrq, reason),
1153 3, /* Number of actions */ 1165 3, /* Number of actions */
1154 _("Yes"), x509_tls_cached_user_auth_cb, 1166 _("Yes"), x509_tls_cached_user_auth_accept_cb,
1155 _("No"), x509_tls_cached_user_auth_cb, 1167 _("No"), x509_tls_cached_user_auth_reject_cb,
1156 _("_View Certificate..."), x509_tls_cached_show_cert); 1168 _("_View Certificate..."), x509_tls_cached_show_cert);
1157 1169
1158 /* Cleanup */ 1170 /* Cleanup */
1159 g_free(primary); 1171 g_free(primary);
1160 } 1172 }