X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=ssl%2Fssl_lib.c;h=d716d97c54771299d79f294ddcd8816dfdffd5d3;hp=b504c2cea232f5bca732680102609416efbebe78;hb=c6c2e3135dd6cff21bb4cd05a3891b5fdde04977;hpb=4b26fe30de5c29439ebcf39f0baf897864211883;ds=sidebyside diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index b504c2cea2..d716d97c54 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1204,7 +1204,8 @@ char *SSL_get_shared_ciphers(const SSL *s,char *buf,int len) return(buf); } -int ssl_cipher_list_to_bytes(SSL *s,STACK_OF(SSL_CIPHER) *sk,unsigned char *p) +int ssl_cipher_list_to_bytes(SSL *s,STACK_OF(SSL_CIPHER) *sk,unsigned char *p, + int (*put_cb)(const SSL_CIPHER *, unsigned char *)) { int i,j=0; SSL_CIPHER *c; @@ -1223,7 +1224,8 @@ int ssl_cipher_list_to_bytes(SSL *s,STACK_OF(SSL_CIPHER) *sk,unsigned char *p) if ((c->algorithms & SSL_KRB5) && nokrb5) continue; #endif /* OPENSSL_NO_KRB5 */ - j=ssl_put_cipher_by_char(s,c,p); + + j = put_cb ? put_cb(c,p) : ssl_put_cipher_by_char(s,c,p); p+=j; } return(p-q);