Lines Matching refs:msg
113 Buffer msg; in pkcs11_rsa_private_encrypt() local
121 buffer_init(&msg); in pkcs11_rsa_private_encrypt()
122 buffer_put_char(&msg, SSH2_AGENTC_SIGN_REQUEST); in pkcs11_rsa_private_encrypt()
123 buffer_put_string(&msg, blob, blen); in pkcs11_rsa_private_encrypt()
124 buffer_put_string(&msg, from, flen); in pkcs11_rsa_private_encrypt()
125 buffer_put_int(&msg, 0); in pkcs11_rsa_private_encrypt()
127 send_msg(&msg); in pkcs11_rsa_private_encrypt()
128 buffer_clear(&msg); in pkcs11_rsa_private_encrypt()
130 if (recv_msg(&msg) == SSH2_AGENT_SIGN_RESPONSE) { in pkcs11_rsa_private_encrypt()
131 signature = buffer_get_string(&msg, &slen); in pkcs11_rsa_private_encrypt()
138 buffer_free(&msg); in pkcs11_rsa_private_encrypt()
193 Buffer msg; in pkcs11_add_provider() local
198 buffer_init(&msg); in pkcs11_add_provider()
199 buffer_put_char(&msg, SSH_AGENTC_ADD_SMARTCARD_KEY); in pkcs11_add_provider()
200 buffer_put_cstring(&msg, name); in pkcs11_add_provider()
201 buffer_put_cstring(&msg, pin); in pkcs11_add_provider()
202 send_msg(&msg); in pkcs11_add_provider()
203 buffer_clear(&msg); in pkcs11_add_provider()
205 if (recv_msg(&msg) == SSH2_AGENT_IDENTITIES_ANSWER) { in pkcs11_add_provider()
206 nkeys = buffer_get_int(&msg); in pkcs11_add_provider()
209 blob = buffer_get_string(&msg, &blen); in pkcs11_add_provider()
210 free(buffer_get_string(&msg, NULL)); in pkcs11_add_provider()
219 buffer_free(&msg); in pkcs11_add_provider()
227 Buffer msg; in pkcs11_del_provider() local
229 buffer_init(&msg); in pkcs11_del_provider()
230 buffer_put_char(&msg, SSH_AGENTC_REMOVE_SMARTCARD_KEY); in pkcs11_del_provider()
231 buffer_put_cstring(&msg, name); in pkcs11_del_provider()
232 buffer_put_cstring(&msg, ""); in pkcs11_del_provider()
233 send_msg(&msg); in pkcs11_del_provider()
234 buffer_clear(&msg); in pkcs11_del_provider()
236 if (recv_msg(&msg) == SSH_AGENT_SUCCESS) in pkcs11_del_provider()
238 buffer_free(&msg); in pkcs11_del_provider()