mirror of
				https://github.com/libssh2/libssh2.git
				synced 2025-11-03 22:13:11 +03:00 
			
		
		
		
	Support AES-Counter ciphers.
This commit is contained in:
		@@ -544,8 +544,11 @@ _libssh2_cipher_init(_libssh2_cipher_ctx * h,
 | 
			
		||||
 | 
			
		||||
    if (mode != GCRY_CIPHER_MODE_STREAM) {
 | 
			
		||||
        int blklen = gcry_cipher_get_algo_blklen(cipher);
 | 
			
		||||
        ret = gcry_cipher_setiv(*h, iv, blklen);
 | 
			
		||||
        if (ret) {
 | 
			
		||||
	if (mode == GCRY_CIPHER_MODE_CTR)
 | 
			
		||||
	  ret = gcry_cipher_setctr(*h, iv, blklen);
 | 
			
		||||
	else
 | 
			
		||||
	  ret = gcry_cipher_setiv(*h, iv, blklen);
 | 
			
		||||
	if (ret) {
 | 
			
		||||
            gcry_cipher_close(*h);
 | 
			
		||||
            return -1;
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user