diff options
author | lloyd <[email protected]> | 2011-05-24 17:35:49 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2011-05-24 17:35:49 +0000 |
commit | 1a282af78a78759668d5210ff5aae8248618f416 (patch) | |
tree | 3f39a7a5f6e32fdc2bdfb4aabd82daf8396cd794 /src | |
parent | 12d4fcffc291c7e9efcb811e8d4d33d34f5b7cb9 (diff) |
Explicitly specify the types for make_pair when passing a const array
as the first value. Oddly, Sun Studio's default STL tries to make a
pair with the first value a 'const byte[2]', and then subsequently
rejects that as invalid. Reported by Jeremy Reed.
Diffstat (limited to 'src')
-rw-r--r-- | src/asn1/alg_id.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/asn1/alg_id.cpp b/src/asn1/alg_id.cpp index b48db3e50..665e42fb3 100644 --- a/src/asn1/alg_id.cpp +++ b/src/asn1/alg_id.cpp @@ -41,8 +41,12 @@ AlgorithmIdentifier::AlgorithmIdentifier(const OID& alg_id, const byte DER_NULL[] = { 0x05, 0x00 }; oid = alg_id; + if(option == USE_NULL_PARAM) - parameters += std::make_pair(DER_NULL, sizeof(DER_NULL)); + { + parameters += std::make_pair<const byte*, size_t>( + DER_NULL, sizeof(DER_NULL)); + } } /* @@ -54,8 +58,12 @@ AlgorithmIdentifier::AlgorithmIdentifier(const std::string& alg_id, const byte DER_NULL[] = { 0x05, 0x00 }; oid = OIDS::lookup(alg_id); + if(option == USE_NULL_PARAM) - parameters += std::make_pair(DER_NULL, sizeof(DER_NULL)); + { + parameters += std::make_pair<const byte*, size_t>( + DER_NULL, sizeof(DER_NULL)); + } } /* |