Codebase list openssl / 335d4d0
Tweaks for comments due to indent's inability to handle them Reviewed-by: Tim Hudson <tjh@openssl.org> Matt Caswell 9 years ago
6 changed file(s) with 59 addition(s) and 17 deletion(s). Raw diff Collapse all Expand all
143143
144144 /* Callbacks */
145145 void cb_ssl_info(const SSL *s, int where, int ret);
146 void cb_ssl_info_set_output(FILE *fp); /* Called if output should be sent too */
146 /* Called if output should be sent too */
147 void cb_ssl_info_set_output(FILE *fp);
147148 int cb_ssl_verify(int ok, X509_STORE_CTX *ctx);
148149 void cb_ssl_verify_set_output(FILE *fp);
149150 void cb_ssl_verify_set_depth(unsigned int verify_depth);
458458 }
459459
460460 /* Generate all functions with appropriate opcodes */
461 PADLOCK_XCRYPT_ASM(padlock_xcrypt_ecb, ".byte 0xf3,0x0f,0xa7,0xc8") /* rep xcryptecb */
462 PADLOCK_XCRYPT_ASM(padlock_xcrypt_cbc, ".byte 0xf3,0x0f,0xa7,0xd0") /* rep xcryptcbc */
463 PADLOCK_XCRYPT_ASM(padlock_xcrypt_cfb, ".byte 0xf3,0x0f,0xa7,0xe0") /* rep xcryptcfb */
464 PADLOCK_XCRYPT_ASM(padlock_xcrypt_ofb, ".byte 0xf3,0x0f,0xa7,0xe8") /* rep xcryptofb */
461 /* rep xcryptecb */
462 PADLOCK_XCRYPT_ASM(padlock_xcrypt_ecb, ".byte 0xf3,0x0f,0xa7,0xc8")
463 /* rep xcryptcbc */
464 PADLOCK_XCRYPT_ASM(padlock_xcrypt_cbc, ".byte 0xf3,0x0f,0xa7,0xd0")
465 /* rep xcryptcfb */
466 PADLOCK_XCRYPT_ASM(padlock_xcrypt_cfb, ".byte 0xf3,0x0f,0xa7,0xe0")
467 /* rep xcryptofb */
468 PADLOCK_XCRYPT_ASM(padlock_xcrypt_ofb, ".byte 0xf3,0x0f,0xa7,0xe8")
465469 #endif
466470
467471 /* The RNG call itself */
387387 i = ssl2_read(s,(char *)&(buf[s->init_num]),j);
388388 if (i != j) return(ssl2_part_read(s,SSL_F_GET_SERVER_HELLO,i));
389389 if (s->msg_callback)
390 s->msg_callback(0, s->version, 0, buf, (size_t)len, s, s->msg_callback_arg); /* SERVER-HELLO */
390 {
391 /* SERVER-HELLO */
392 s->msg_callback(0, s->version, 0, buf, (size_t)len, s, s->msg_callback_arg);
393 }
391394
392395 /* things are looking good */
393396
765768 return(ssl2_part_read(s,SSL_F_CLIENT_CERTIFICATE,i));
766769 s->init_num += i;
767770 if (s->msg_callback)
768 s->msg_callback(0, s->version, 0, buf, (size_t)s->init_num, s, s->msg_callback_arg); /* REQUEST-CERTIFICATE */
771 {
772 /* REQUEST-CERTIFICATE */
773 s->msg_callback(0, s->version, 0, buf, (size_t)s->init_num, s, s->msg_callback_arg);
774 }
769775
770776 /* type=buf[0]; */
771777 /* type eq x509 */
934940 if (i < n)
935941 return(ssl2_part_read(s,SSL_F_GET_SERVER_VERIFY,i));
936942 if (s->msg_callback)
937 s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg); /* SERVER-VERIFY */
943 {
944 /* SERVER-VERIFY */
945 s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg);
946 }
938947 p += 1;
939948
940949 if (CRYPTO_memcmp(p,s->s2->challenge,s->s2->challenge_length) != 0)
988997 len = 1 + SSL2_SSL_SESSION_ID_LENGTH;
989998 n = len - s->init_num;
990999 i = ssl2_read(s,(char *)&(buf[s->init_num]), n);
991 if (i < n) /* XXX could be shorter than SSL2_SSL_SESSION_ID_LENGTH, that's the maximum */
1000 if (i < n)
1001 {
1002 /*
1003 * XXX could be shorter than SSL2_SSL_SESSION_ID_LENGTH,
1004 * that's the maximum
1005 */
9921006 return(ssl2_part_read(s,SSL_F_GET_SERVER_FINISHED,i));
1007 }
9931008 s->init_num += i;
9941009 if (s->msg_callback)
995 s->msg_callback(0, s->version, 0, buf, (size_t)s->init_num, s, s->msg_callback_arg); /* SERVER-FINISHED */
1010 {
1011 /* SERVER-FINISHED */
1012 s->msg_callback(0, s->version, 0, buf, (size_t)s->init_num, s, s->msg_callback_arg);
1013 }
9961014
9971015 if (!s->hit) /* new session */
9981016 {
536536
537537 if (s->error == 0)
538538 if (s->msg_callback)
539 s->msg_callback(1, s->version, 0, buf, 3, s, s->msg_callback_arg); /* ERROR */
539 {
540 /* ERROR */
541 s->msg_callback(1, s->version, 0, buf, 3, s, s->msg_callback_arg);
542 }
540543 }
541544 }
542545
441441 i = ssl2_read(s,(char *)&(p[s->init_num]),n);
442442 if (i != n) return(ssl2_part_read(s,SSL_F_GET_CLIENT_MASTER_KEY,i));
443443 if (s->msg_callback)
444 s->msg_callback(0, s->version, 0, p, (size_t)len, s, s->msg_callback_arg); /* CLIENT-MASTER-KEY */
444 {
445 /* CLIENT-MASTER-KEY */
446 s->msg_callback(0, s->version, 0, p, (size_t)len, s, s->msg_callback_arg);
447 }
445448 p += 10;
446449
447450 memcpy(s->session->key_arg,&(p[s->s2->tmp.clear+s->s2->tmp.enc]),
590593 i = ssl2_read(s,(char *)&(p[s->init_num]),n);
591594 if (i != n) return(ssl2_part_read(s,SSL_F_GET_CLIENT_HELLO,i));
592595 if (s->msg_callback)
593 s->msg_callback(0, s->version, 0, p, (size_t)len, s, s->msg_callback_arg); /* CLIENT-HELLO */
596 {
597 /* CLIENT-HELLO */
598 s->msg_callback(0, s->version, 0, p, (size_t)len, s, s->msg_callback_arg);
599 }
594600 p += 9;
595601
596602 /* get session-id before cipher stuff so we can get out session
863869 return(ssl2_part_read(s,SSL_F_GET_CLIENT_FINISHED,i));
864870 }
865871 if (s->msg_callback)
866 s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg); /* CLIENT-FINISHED */
872 {
873 /* CLIENT-FINISHED */
874 s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg);
875 }
867876 p += 1;
868877 if (memcmp(p,s->s2->conn_id,s->s2->conn_id_length) != 0)
869878 {
986995 }
987996
988997 if (s->msg_callback)
989 s->msg_callback(0, s->version, 0, p, 3, s, s->msg_callback_arg); /* ERROR */
998 {
999 /* ERROR */
1000 s->msg_callback(0, s->version, 0, p, 3, s, s->msg_callback_arg);
1001 }
9901002
9911003 /* this is the one place where we can recover from an SSL 2.0 error */
9921004
10411053 goto end;
10421054 }
10431055 if (s->msg_callback)
1044 s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg); /* CLIENT-CERTIFICATE */
1056 {
1057 /* CLIENT-CERTIFICATE */
1058 s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg);
1059 }
10451060 p += 6;
10461061
10471062 cp = p;
12981298 else if (s->hit)
12991299 comp = NULL;
13001300 else if (!(s->options & SSL_OP_NO_COMPRESSION) && s->ctx->comp_methods)
1301 { /* See if we have a match */
1301 {
1302 /* See if we have a match */
13021303 int m,nn,o,v,done=0;
13031304
13041305 nn=sk_SSL_COMP_num(s->ctx->comp_methods);