コード例 #1
0
ファイル: cipher.c プロジェクト: enukane/netbsd-src
void
cipher_set_keycontext(CipherContext *cc, u_char *dat)
{
	const Cipher *c = cc->cipher;
	int plen;

	if (c->evptype == EVP_rc4) {
		plen = EVP_X_STATE_LEN(cc->evp);
		memcpy(EVP_X_STATE(cc->evp), dat, plen);
	}
}
コード例 #2
0
ファイル: cipher.c プロジェクト: mpitzl/libopenssh
void
cipher_set_keycontext(struct sshcipher_ctx *cc, const u_char *dat)
{
	struct sshcipher *c = cc->cipher;
	int plen;

	if (c->evptype == EVP_rc4 || c->evptype == EVP_acss) {
		plen = EVP_X_STATE_LEN(cc->evp);
		memcpy(EVP_X_STATE(cc->evp), dat, plen);
	}
}
コード例 #3
0
ファイル: cipher.c プロジェクト: knakahara/netbsd-src
void
cipher_set_keycontext(struct sshcipher_ctx *cc, const u_char *dat)
{
#ifdef WITH_OPENSSL
	const struct sshcipher *c = cc->cipher;
	int plen;

	if (c->evptype == EVP_rc4) {
		plen = EVP_X_STATE_LEN(cc->evp);
		memcpy(EVP_X_STATE(cc->evp), dat, plen);
	}
#endif
}
コード例 #4
0
ファイル: cipher.c プロジェクト: enukane/netbsd-src
int
cipher_get_keycontext(const CipherContext *cc, u_char *dat)
{
	const Cipher *c = cc->cipher;
	int plen = 0;

	if (c->evptype == EVP_rc4) {
		plen = EVP_X_STATE_LEN(cc->evp);
		if (dat == NULL)
			return (plen);
		memcpy(dat, EVP_X_STATE(cc->evp), plen);
	}
	return (plen);
}
コード例 #5
0
ファイル: cipher.c プロジェクト: mpitzl/libopenssh
int
cipher_get_keycontext(const struct sshcipher_ctx *cc, u_char *dat)
{
	struct sshcipher *c = cc->cipher;
	int plen = 0;

	if (c->evptype == EVP_rc4 || c->evptype == EVP_acss) {
		plen = EVP_X_STATE_LEN(cc->evp);
		if (dat == NULL)
			return (plen);
		memcpy(dat, EVP_X_STATE(cc->evp), plen);
	}
	return (plen);
}
コード例 #6
0
ファイル: cipher.c プロジェクト: knakahara/netbsd-src
int
cipher_get_keycontext(const struct sshcipher_ctx *cc, u_char *dat)
{
#ifdef WITH_OPENSSL
	const struct sshcipher *c = cc->cipher;
	int plen = 0;

	if (c->evptype == EVP_rc4) {
		plen = EVP_X_STATE_LEN(cc->evp);
		if (dat == NULL)
			return (plen);
		memcpy(dat, EVP_X_STATE(cc->evp), plen);
	}
	return (plen);
#else
	return 0;
#endif
}