comparison src/event/ngx_event_openssl.c @ 5755:8df08465fcfd

SSL: fixed build with OPENSSL_NO_DEPRECATED defined. The RSA_generate_key() is marked as deprecated and causes build to fail. On the other hand, replacement function, RSA_generate_key_ex(), requires much more code. Since RSA_generate_key() is only needed for barely usable EXP ciphers, the #ifdef was added instead. Prodded by Piotr Sikora.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 09 Jul 2014 04:08:13 +0400
parents c7ecd097b883
children 5b7276408565
comparison
equal deleted inserted replaced
5754:c7ecd097b883 5755:8df08465fcfd
654 654
655 if (key_length != 512) { 655 if (key_length != 512) {
656 return NULL; 656 return NULL;
657 } 657 }
658 658
659 #ifndef OPENSSL_NO_DEPRECATED
660
659 if (key == NULL) { 661 if (key == NULL) {
660 key = RSA_generate_key(512, RSA_F4, NULL, NULL); 662 key = RSA_generate_key(512, RSA_F4, NULL, NULL);
661 } 663 }
664
665 #endif
662 666
663 return key; 667 return key;
664 } 668 }
665 669
666 670