mirror of
				https://github.com/Telecominfraproject/wlan-cloud-lib-poco.git
				synced 2025-10-31 18:47:47 +00:00 
			
		
		
		
	Crypto and NetSSL fixes for OpenSSL 1.1
This commit is contained in:
		 Günter Obiltschnig
					Günter Obiltschnig
				
			
				
					committed by
					
						 Guenter Obiltschnig
						Guenter Obiltschnig
					
				
			
			
				
	
			
			
			 Guenter Obiltschnig
						Guenter Obiltschnig
					
				
			
						parent
						
							780430487b
						
					
				
				
					commit
					bfaa161c61
				
			| @@ -207,19 +207,43 @@ int RSAKeyImpl::size() const | ||||
|  | ||||
| RSAKeyImpl::ByteVec RSAKeyImpl::modulus() const | ||||
| { | ||||
| #if OPENSSL_VERSION_NUMBER >= 0x10100000L | ||||
| 	const BIGNUM* n = 0; | ||||
| 	const BIGNUM* e = 0; | ||||
| 	const BIGNUM* d = 0; | ||||
| 	RSA_get0_key(_pRSA, &n, &e, &d); | ||||
| 	return convertToByteVec(n); | ||||
| #else | ||||
| 	return convertToByteVec(_pRSA->n); | ||||
| #endif | ||||
| } | ||||
|  | ||||
|  | ||||
| RSAKeyImpl::ByteVec RSAKeyImpl::encryptionExponent() const | ||||
| { | ||||
| #if OPENSSL_VERSION_NUMBER >= 0x10100000L | ||||
| 	const BIGNUM* n = 0; | ||||
| 	const BIGNUM* e = 0; | ||||
| 	const BIGNUM* d = 0; | ||||
| 	RSA_get0_key(_pRSA, &n, &e, &d); | ||||
| 	return convertToByteVec(e); | ||||
| #else | ||||
| 	return convertToByteVec(_pRSA->e); | ||||
| #endif | ||||
| } | ||||
|  | ||||
|  | ||||
| RSAKeyImpl::ByteVec RSAKeyImpl::decryptionExponent() const | ||||
| { | ||||
| #if OPENSSL_VERSION_NUMBER >= 0x10100000L | ||||
| 	const BIGNUM* n = 0; | ||||
| 	const BIGNUM* e = 0; | ||||
| 	const BIGNUM* d = 0; | ||||
| 	RSA_get0_key(_pRSA, &n, &e, &d); | ||||
| 	return convertToByteVec(d); | ||||
| #else | ||||
| 	return convertToByteVec(_pRSA->d); | ||||
| #endif | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user