diff options
author | Bodo Möller <bodo@openssl.org> | 2000-01-06 01:19:17 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2000-01-06 01:19:17 +0000 |
commit | ca03109c3aa2a907885f299d7af749754c4d172d (patch) | |
tree | 8aadf85d3d6e4bf9ca4e572a3e9e93af1476557e /ssl/ssl_lib.c | |
parent | 9fb617e252dd4534ed54ae1049fb71e4687cf8f7 (diff) |
New functions SSL_get_finished, SSL_get_peer_finished.
Add short state string for MS SGC.
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r-- | ssl/ssl_lib.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 88ff03b3ac..02f8d11256 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -477,6 +477,38 @@ err: } #endif + +/* return length of latest Finished message we sent, copy to 'buf' */ +size_t SSL_get_finished(SSL *s, void *buf, size_t count) + { + size_t ret = 0; + + if (s->s3 != NULL) + { + ret = s->s3->tmp.finish_md_len; + if (count > ret) + count = ret; + memcpy(buf, s->s3->tmp.finish_md, count); + } + return ret; + } + +/* return length of latest Finished message we expected, copy to 'buf' */ +size_t SSL_get_peer_finished(SSL *s, void *buf, size_t count) + { + size_t ret = 0; + + if (s->s3 != NULL) + { + ret = s->s3->tmp.peer_finish_md_len; + if (count > ret) + count = ret; + memcpy(buf, s->s3->tmp.peer_finish_md, count); + } + return ret; + } + + int SSL_get_verify_mode(SSL *s) { return(s->verify_mode); |