diff options
author | lloyd <[email protected]> | 2007-02-28 02:41:40 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2007-02-28 02:41:40 +0000 |
commit | eb0bd01952a834e35f70c139807140ec6ce06038 (patch) | |
tree | b7ff104e6694bc60dae584494bb0abb4ae46adb5 | |
parent | 5b9be64b1238ce2c8672c3dcaa764ffadf8af852 (diff) | |
parent | c54e7ea2c9276214021c392aad6c901624913393 (diff) |
propagate from branch 'net.randombit.botan.stable' (head fd0242cd1f44b6d9d0e526c778860fcded174d62)
to branch 'net.randombit.botan' (head 8a5aa356cb3aab0af22b09f51bfa5540fe890bdf)
-rwxr-xr-x | configure.pl | 2 | ||||
-rw-r--r-- | misc/config/cc/gcc | 2 | ||||
-rw-r--r-- | src/libstate.cpp | 3 | ||||
-rw-r--r-- | src/pkcs8.cpp | 20 |
4 files changed, 10 insertions, 17 deletions
diff --git a/configure.pl b/configure.pl index 6c6ac01e6..8b67d3751 100755 --- a/configure.pl +++ b/configure.pl @@ -1585,7 +1585,7 @@ sub guess_cpu_from_this $cpu = 'athlon64' if($cpuinfo =~ /athlon64/); $cpu = 'athlon64' if($cpuinfo =~ /athlon\(tm\) 64/); - $cpu = 'amd64' if($cpuinfo =~ /opteron/); + $cpu = 'opteron' if($cpuinfo =~ /opteron/); # The 32-bit SPARC stuff is impossible to match to arch type easily, and # anyway the uname stuff will pick up that it's a SPARC so it doesn't diff --git a/misc/config/cc/gcc b/misc/config/cc/gcc index f448dc913..0088f6758 100644 --- a/misc/config/cc/gcc +++ b/misc/config/cc/gcc @@ -79,7 +79,7 @@ ppc64 -> "-m64" openbsd -> "-pthread" freebsd -> "-pthread" netbsd -> "-pthread" -qnx -> "-fexceptions" +qnx -> "-fexceptions -D_QNX_SOURCE" </mach_abi_linking> <os> diff --git a/src/libstate.cpp b/src/libstate.cpp index a8269a2b9..9eaa8a8b3 100644 --- a/src/libstate.cpp +++ b/src/libstate.cpp @@ -31,10 +31,7 @@ Library_State* global_lib_state = 0; Library_State& global_state() { if(!global_lib_state) - { - abort(); throw Invalid_State("Library was not initialized correctly"); - } return (*global_lib_state); } diff --git a/src/pkcs8.cpp b/src/pkcs8.cpp index 5815e4f67..efc500c16 100644 --- a/src/pkcs8.cpp +++ b/src/pkcs8.cpp @@ -24,22 +24,18 @@ namespace { * Get info from an EncryptedPrivateKeyInfo * *************************************************/ SecureVector<byte> PKCS8_extract(DataSource& source, - AlgorithmIdentifier& alg_id) + AlgorithmIdentifier& pbe_alg_id) { - SecureVector<byte> enc_pkcs8_key; + SecureVector<byte> key_data; - try { - BER_Decoder(source).start_cons(SEQUENCE) - .decode(alg_id) - .decode(enc_pkcs8_key, OCTET_STRING) + BER_Decoder(source) + .start_cons(SEQUENCE) + .decode(pbe_alg_id) + .decode(key_data, OCTET_STRING) .verify_end(); - } - catch(Decoding_Error) - { - throw PKCS8_Exception("Private key decoding failed"); - } - return enc_pkcs8_key; + + return key_data; } /************************************************* |