| 156 |
156 |
| 157 silc_socket_stream_get_info(silc_packet_stream_get_stream(conn->stream), |
157 silc_socket_stream_get_info(silc_packet_stream_get_stream(conn->stream), |
| 158 NULL, &hostname, &ip, &port); |
158 NULL, &hostname, &ip, &port); |
| 159 |
159 |
| 160 pk = silc_pkcs_public_key_encode(public_key, &pk_len); |
160 pk = silc_pkcs_public_key_encode(public_key, &pk_len); |
| |
161 if (!pk) { |
| |
162 if (completion) |
| |
163 completion(FALSE, context); |
| |
164 return; |
| |
165 } |
| 161 |
166 |
| 162 if (conn_type == SILC_CONN_SERVER || |
167 if (conn_type == SILC_CONN_SERVER || |
| 163 conn_type == SILC_CONN_ROUTER) { |
168 conn_type == SILC_CONN_ROUTER) { |
| 164 if (!name) { |
169 if (!name) { |
| 165 g_snprintf(file, sizeof(file) - 1, "%skey_%s_%d.pub", entity, |
170 g_snprintf(file, sizeof(file) - 1, "%skey_%s_%d.pub", entity, |