diff options
author | lloyd <[email protected]> | 2007-03-01 00:14:49 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2007-03-01 00:14:49 +0000 |
commit | fe17e1b8f9f73fcc7664b1f880677f45c8d6f1ea (patch) | |
tree | b6c6ac461f69e01fc39ea2846fbe6d09cf87d78e | |
parent | 3009920d500adada75f8e9dd7b28eeca3c42354f (diff) | |
parent | eb0bd01952a834e35f70c139807140ec6ce06038 (diff) |
merge of '8d39383f5142c3a42ccef1b06333f5aef24e998f'
and 'e5ca819cb65b0c124d3ca9538d2e8bc0faa8ecb0'
-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; } /************************************************* |