Lines Matching refs:digest
50 krb5_digest_alloc(krb5_context context, krb5_digest *digest) in krb5_digest_alloc() argument
56 *digest = NULL; in krb5_digest_alloc()
60 *digest = d; in krb5_digest_alloc()
66 krb5_digest_free(krb5_digest digest) in krb5_digest_free() argument
68 if (digest == NULL) in krb5_digest_free()
70 free_DigestInit(&digest->init); in krb5_digest_free()
71 free_DigestInitReply(&digest->initReply); in krb5_digest_free()
72 free_DigestRequest(&digest->request); in krb5_digest_free()
73 free_DigestResponse(&digest->response); in krb5_digest_free()
74 memset(digest, 0, sizeof(*digest)); in krb5_digest_free()
75 free(digest); in krb5_digest_free()
81 krb5_digest digest, in krb5_digest_set_server_cb() argument
85 if (digest->init.channel) { in krb5_digest_set_server_cb()
90 digest->init.channel = calloc(1, sizeof(*digest->init.channel)); in krb5_digest_set_server_cb()
91 if (digest->init.channel == NULL) in krb5_digest_set_server_cb()
94 digest->init.channel->cb_type = strdup(type); in krb5_digest_set_server_cb()
95 if (digest->init.channel->cb_type == NULL) in krb5_digest_set_server_cb()
98 digest->init.channel->cb_binding = strdup(binding); in krb5_digest_set_server_cb()
99 if (digest->init.channel->cb_binding == NULL) in krb5_digest_set_server_cb()
103 if (digest->init.channel) { in krb5_digest_set_server_cb()
104 free(digest->init.channel->cb_type); in krb5_digest_set_server_cb()
105 free(digest->init.channel->cb_binding); in krb5_digest_set_server_cb()
106 free(digest->init.channel); in krb5_digest_set_server_cb()
107 digest->init.channel = NULL; in krb5_digest_set_server_cb()
115 krb5_digest digest, in krb5_digest_set_type() argument
118 if (digest->init.type) { in krb5_digest_set_type()
122 digest->init.type = strdup(type); in krb5_digest_set_type()
123 if (digest->init.type == NULL) { in krb5_digest_set_type()
132 krb5_digest digest, in krb5_digest_set_hostname() argument
135 if (digest->init.hostname) { in krb5_digest_set_hostname()
139 digest->init.hostname = malloc(sizeof(*digest->init.hostname)); in krb5_digest_set_hostname()
140 if (digest->init.hostname == NULL) { in krb5_digest_set_hostname()
144 *digest->init.hostname = strdup(hostname); in krb5_digest_set_hostname()
145 if (*digest->init.hostname == NULL) { in krb5_digest_set_hostname()
147 free(digest->init.hostname); in krb5_digest_set_hostname()
148 digest->init.hostname = NULL; in krb5_digest_set_hostname()
156 krb5_digest digest) in krb5_digest_get_server_nonce() argument
158 return digest->initReply.nonce; in krb5_digest_get_server_nonce()
163 krb5_digest digest, in krb5_digest_set_server_nonce() argument
166 if (digest->request.serverNonce) { in krb5_digest_set_server_nonce()
170 digest->request.serverNonce = strdup(nonce); in krb5_digest_set_server_nonce()
171 if (digest->request.serverNonce == NULL) { in krb5_digest_set_server_nonce()
180 krb5_digest digest) in krb5_digest_get_opaque() argument
182 return digest->initReply.opaque; in krb5_digest_get_opaque()
187 krb5_digest digest, in krb5_digest_set_opaque() argument
190 if (digest->request.opaque) { in krb5_digest_set_opaque()
194 digest->request.opaque = strdup(opaque); in krb5_digest_set_opaque()
195 if (digest->request.opaque == NULL) { in krb5_digest_set_opaque()
204 krb5_digest digest) in krb5_digest_get_identifier() argument
206 if (digest->initReply.identifier == NULL) in krb5_digest_get_identifier()
208 return *digest->initReply.identifier; in krb5_digest_get_identifier()
213 krb5_digest digest, in krb5_digest_set_identifier() argument
216 if (digest->request.identifier) { in krb5_digest_set_identifier()
220 digest->request.identifier = calloc(1, sizeof(*digest->request.identifier)); in krb5_digest_set_identifier()
221 if (digest->request.identifier == NULL) { in krb5_digest_set_identifier()
225 *digest->request.identifier = strdup(id); in krb5_digest_set_identifier()
226 if (*digest->request.identifier == NULL) { in krb5_digest_set_identifier()
228 free(digest->request.identifier); in krb5_digest_set_identifier()
229 digest->request.identifier = NULL; in krb5_digest_set_identifier()
411 krb5_digest digest, in krb5_digest_init_request() argument
422 if (digest->init.type == NULL) { in krb5_digest_init_request()
429 ireq.u.init = digest->init; in krb5_digest_init_request()
450 ret = copy_DigestInitReply(&irep.u.initReply, &digest->initReply); in krb5_digest_init_request()
466 krb5_digest digest, in krb5_digest_set_client_nonce() argument
469 if (digest->request.clientNonce) { in krb5_digest_set_client_nonce()
474 digest->request.clientNonce = in krb5_digest_set_client_nonce()
475 calloc(1, sizeof(*digest->request.clientNonce)); in krb5_digest_set_client_nonce()
476 if (digest->request.clientNonce == NULL) { in krb5_digest_set_client_nonce()
480 *digest->request.clientNonce = strdup(nonce); in krb5_digest_set_client_nonce()
481 if (*digest->request.clientNonce == NULL) { in krb5_digest_set_client_nonce()
483 free(digest->request.clientNonce); in krb5_digest_set_client_nonce()
484 digest->request.clientNonce = NULL; in krb5_digest_set_client_nonce()
492 krb5_digest digest, in krb5_digest_set_digest() argument
495 if (digest->request.digest) { in krb5_digest_set_digest()
500 digest->request.digest = strdup(dgst); in krb5_digest_set_digest()
501 if (digest->request.digest == NULL) { in krb5_digest_set_digest()
510 krb5_digest digest, in krb5_digest_set_username() argument
513 if (digest->request.username) { in krb5_digest_set_username()
517 digest->request.username = strdup(username); in krb5_digest_set_username()
518 if (digest->request.username == NULL) { in krb5_digest_set_username()
527 krb5_digest digest, in krb5_digest_set_authid() argument
530 if (digest->request.authid) { in krb5_digest_set_authid()
534 digest->request.authid = malloc(sizeof(*digest->request.authid)); in krb5_digest_set_authid()
535 if (digest->request.authid == NULL) { in krb5_digest_set_authid()
539 *digest->request.authid = strdup(authid); in krb5_digest_set_authid()
540 if (*digest->request.authid == NULL) { in krb5_digest_set_authid()
542 free(digest->request.authid); in krb5_digest_set_authid()
543 digest->request.authid = NULL; in krb5_digest_set_authid()
551 krb5_digest digest, in krb5_digest_set_authentication_user() argument
556 if (digest->request.authentication_user) { in krb5_digest_set_authentication_user()
563 &digest->request.authentication_user); in krb5_digest_set_authentication_user()
571 krb5_digest digest, in krb5_digest_set_realm() argument
574 if (digest->request.realm) { in krb5_digest_set_realm()
578 digest->request.realm = malloc(sizeof(*digest->request.realm)); in krb5_digest_set_realm()
579 if (digest->request.realm == NULL) { in krb5_digest_set_realm()
583 *digest->request.realm = strdup(realm); in krb5_digest_set_realm()
584 if (*digest->request.realm == NULL) { in krb5_digest_set_realm()
586 free(digest->request.realm); in krb5_digest_set_realm()
587 digest->request.realm = NULL; in krb5_digest_set_realm()
595 krb5_digest digest, in krb5_digest_set_method() argument
598 if (digest->request.method) { in krb5_digest_set_method()
603 digest->request.method = malloc(sizeof(*digest->request.method)); in krb5_digest_set_method()
604 if (digest->request.method == NULL) { in krb5_digest_set_method()
608 *digest->request.method = strdup(method); in krb5_digest_set_method()
609 if (*digest->request.method == NULL) { in krb5_digest_set_method()
611 free(digest->request.method); in krb5_digest_set_method()
612 digest->request.method = NULL; in krb5_digest_set_method()
620 krb5_digest digest, in krb5_digest_set_uri() argument
623 if (digest->request.uri) { in krb5_digest_set_uri()
627 digest->request.uri = malloc(sizeof(*digest->request.uri)); in krb5_digest_set_uri()
628 if (digest->request.uri == NULL) { in krb5_digest_set_uri()
632 *digest->request.uri = strdup(uri); in krb5_digest_set_uri()
633 if (*digest->request.uri == NULL) { in krb5_digest_set_uri()
635 free(digest->request.uri); in krb5_digest_set_uri()
636 digest->request.uri = NULL; in krb5_digest_set_uri()
644 krb5_digest digest, in krb5_digest_set_nonceCount() argument
647 if (digest->request.nonceCount) { in krb5_digest_set_nonceCount()
652 digest->request.nonceCount = in krb5_digest_set_nonceCount()
653 malloc(sizeof(*digest->request.nonceCount)); in krb5_digest_set_nonceCount()
654 if (digest->request.nonceCount == NULL) { in krb5_digest_set_nonceCount()
658 *digest->request.nonceCount = strdup(nonce_count); in krb5_digest_set_nonceCount()
659 if (*digest->request.nonceCount == NULL) { in krb5_digest_set_nonceCount()
661 free(digest->request.nonceCount); in krb5_digest_set_nonceCount()
662 digest->request.nonceCount = NULL; in krb5_digest_set_nonceCount()
670 krb5_digest digest, in krb5_digest_set_qop() argument
673 if (digest->request.qop) { in krb5_digest_set_qop()
677 digest->request.qop = malloc(sizeof(*digest->request.qop)); in krb5_digest_set_qop()
678 if (digest->request.qop == NULL) { in krb5_digest_set_qop()
682 *digest->request.qop = strdup(qop); in krb5_digest_set_qop()
683 if (*digest->request.qop == NULL) { in krb5_digest_set_qop()
685 free(digest->request.qop); in krb5_digest_set_qop()
686 digest->request.qop = NULL; in krb5_digest_set_qop()
694 krb5_digest digest, in krb5_digest_set_responseData() argument
697 digest->request.responseData = strdup(response); in krb5_digest_set_responseData()
698 if (digest->request.responseData == NULL) { in krb5_digest_set_responseData()
707 krb5_digest digest, in krb5_digest_request() argument
719 ireq.u.digestRequest = digest->request; in krb5_digest_request()
721 if (digest->request.type == NULL) { in krb5_digest_request()
722 if (digest->init.type == NULL) { in krb5_digest_request()
727 ireq.u.digestRequest.type = digest->init.type; in krb5_digest_request()
730 if (ireq.u.digestRequest.digest == NULL) { in krb5_digest_request()
732 ireq.u.digestRequest.digest = md5; in krb5_digest_request()
755 ret = copy_DigestResponse(&irep.u.response, &digest->response); in krb5_digest_request()
770 krb5_digest digest) in krb5_digest_rep_get_status() argument
772 return digest->response.success ? TRUE : FALSE; in krb5_digest_rep_get_status()
777 krb5_digest digest) in krb5_digest_get_rsp() argument
779 if (digest->response.rsp == NULL) in krb5_digest_get_rsp()
781 return *digest->response.rsp; in krb5_digest_get_rsp()
786 krb5_digest digest, in krb5_digest_get_tickets() argument
796 krb5_digest digest, in krb5_digest_get_client_binding() argument
800 if (digest->response.channel) { in krb5_digest_get_client_binding()
801 *type = strdup(digest->response.channel->cb_type); in krb5_digest_get_client_binding()
802 *binding = strdup(digest->response.channel->cb_binding); in krb5_digest_get_client_binding()
818 krb5_digest digest, in krb5_digest_get_session_key() argument
824 if (digest->response.session_key == NULL) in krb5_digest_get_session_key()
826 ret = der_copy_octet_string(digest->response.session_key, data); in krb5_digest_get_session_key()