[cpp-xmltooling] 07/09: CPPXT-110 OpenSSL 1.1: Fix some signatures and names

Rod Widdowson rdw at steadingsoftware.com
Wed Nov 23 04:54:48 EST 2016


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch master
in repository cpp-xmltooling.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-xmltooling.git;a=commit;h=1d41f3aa173bdce6ce00fc56839afab00e6e3dbe

commit 1d41f3aa173bdce6ce00fc56839afab00e6e3dbe
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Fri Jul 29 16:10:19 2016 +0100

    CPPXT-110 OpenSSL 1.1: Fix some signatures and names
    
    https://issues.shibboleth.net/jira/browse/CPPXT-110
    
    Some of the helper functions previously introduced had the
    wrong signature and namespace.
    
    (Cherry-picked from openssl1.1 branch)
---
 xmltooling/security/impl/OpenSSLSupport.cpp | 20 ++++++++++----------
 xmltooling/security/impl/OpenSSLSupport.h   | 10 +++++-----
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/xmltooling/security/impl/OpenSSLSupport.cpp b/xmltooling/security/impl/OpenSSLSupport.cpp
index 28dd378..ab9fe00 100644
--- a/xmltooling/security/impl/OpenSSLSupport.cpp
+++ b/xmltooling/security/impl/OpenSSLSupport.cpp
@@ -69,56 +69,56 @@ void X509StoreCtxRAII::set0TrustedStack(STACK_OF(X509) *sk)
     }
 }
 
-BIGNUM *DSA_get0_pubkey(const DSA *dsa)
+const BIGNUM *xmltooling::DSA_get0_pubkey(const DSA *dsa)
 {
 #if (OPENSSL_VERSION_NUMBER < 0x10100000L)
     return dsa->pub_key;
 #else
-    BIGNUM *result;
+    const BIGNUM *result;
     DSA_get0_key(dsa, &result, NULL);
     return result;
 #endif
 }
 
-BIGNUM *DSA_get0_privkey(const DSA *dsa)
+const BIGNUM *xmltooling::DSA_get0_privkey(const DSA *dsa)
 {
 #if (OPENSSL_VERSION_NUMBER < 0x10100000L)
     return dsa->priv_key;
 #else
-    BIGNUM *result;
+    const BIGNUM *result;
     DSA_get0_key(dsa, NULL, &result);
     return result;
 #endif
 }
 
-BIGNUM *RSA_get0_n(const RSA *rsa)
+const BIGNUM *xmltooling::RSA_get0_n(const RSA *rsa)
 {
 #if (OPENSSL_VERSION_NUMBER < 0x10100000L)
     return rsa->n;
 #else
-    BIGNUM *result;
+    const BIGNUM *result;
     RSA_get0_key(rsa, &result, NULL, NULL);
     return result;
 #endif
 }
 
-BIGNUM *RSA_get0_e(const RSA *rsa)
+const BIGNUM *xmltooling::RSA_get0_e(const RSA *rsa)
 {
 #if (OPENSSL_VERSION_NUMBER < 0x10100000L)
     return rsa->e;
 #else
-    BIGNUM *result;
+    const BIGNUM *result;
     RSA_get0_key(rsa, NULL, &result, NULL);
     return result;
 #endif
 }
 
-BIGNUM *RSA_get0_d(const RSA *rsa)
+const BIGNUM *xmltooling::RSA_get0_d(const RSA *rsa)
 {
 #if (OPENSSL_VERSION_NUMBER < 0x10100000L)
     return rsa->d;
 #else
-    BIGNUM *result;
+    const BIGNUM *result;
     RSA_get0_key(rsa, NULL, NULL, &result);
     return result;
 #endif
diff --git a/xmltooling/security/impl/OpenSSLSupport.h b/xmltooling/security/impl/OpenSSLSupport.h
index 2d267be..cf3e799 100644
--- a/xmltooling/security/impl/OpenSSLSupport.h
+++ b/xmltooling/security/impl/OpenSSLSupport.h
@@ -71,11 +71,11 @@ namespace xmltooling {
     };
 
 
-    BIGNUM *DSA_get0_pubkey(const DSA *dsa);
-    BIGNUM *DSA_get0_privkey(const DSA *dsa);
+    const BIGNUM *DSA_get0_pubkey(const DSA *dsa);
+    const BIGNUM *DSA_get0_privkey(const DSA *dsa);
 
-    BIGNUM *RSA_get0_n(const RSA *rsa);
-    BIGNUM *RSA_get0_d(const RSA *rsa);
-    BIGNUM *RSA_get0_e(const RSA *rsa);
+    const BIGNUM *RSA_get0_n(const RSA *rsa);
+    const BIGNUM *RSA_get0_d(const RSA *rsa);
+    const BIGNUM *RSA_get0_e(const RSA *rsa);
 
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list