Giter Site home page Giter Site logo

mococrw's People

Contributors

catiamesquitactw avatar cps-b avatar davidpereiracriticaltechworkscom avatar dnnr avatar flmei avatar fmonteiro93 avatar garw avatar hpsware avatar istepic avatar joaoferreira-ctw avatar johnfxgalea-e avatar maltgelt avatar marcoczech avatar miroshko avatar neverpanic avatar wusto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mococrw's Issues

AsymmetricKeyPair with already owned keys

Hi,
I need to create an ECIESEncryptionCtx (and an ECIESDecryption context) using already owned encryption keys, so I should create an AsymmetricKeyPair object containing those keys.
How can I do that?

Non-informative message when building GCM decryptor without an IV

Following code, note setting of an empty IV vector:

    auto decryptor = mococrw::AESCipherBuilder{mococrw::SymmetricCipherMode::GCM,
                                               mococrw::SymmetricCipherKeySize::S_128,
                                               mKey}
                         .setPadding(mococrw::SymmetricCipherPadding::NO)
                         .setIV({})
                         .buildAuthenticatedDecryptor();

Results in an exception:

terminate called after throwing an instance of 'mococrw::openssl::OpenSSLException'
  what():  error:00000000:lib(0):func(0):reason(0): 0

Which has no useful information for a developer to understand the issue. Maybe this can be improved.

Can not sign a certificate out of notBefore and notAfter validity.

The "sanity check" in CertificateAuthority::_signCSR() does not allow me to sign a certificate with expired validity or a certificate that will be valid in the future, because validation at the moment must succeed at the end of the function. Anything that is not valid at the moment of the signature can not be signed.

Compilation Errror with openssl1.1 and g++ 9.5.0, ubuntu 22.04

Dear all,

I'm facing a compilation error:

/home/ycheng/MoCOCrW/src/openssl_lib.cpp:788:32: error: invalid conversion from ‘const ec_key_st*’ to ‘EC_KEY*’ {aka ‘ec_key_st*’} [-fpermissive]
  788 |     return EVP_PKEY_get0_EC_KEY(pkey);
      |            ~~~~~~~~~~~~~~~~~~~~^~~~~~
      |                                |
      |                                const ec_key_st*

Can you please help me on this? Thanks a lot!

versioning

Few questions about versioning:

  • Any plan to reflect the version of MoCOCrw also in git?
  • How does the version of the library is supposed to change? Is MoCOCrW using https://semver.org/ ?

MoCOCrW reorders distinguished name fields when loading a CA cert from PEM

When a CA's X509Certificate is loaded from a PEM file and then used to sign a certificate, the Issuer name in the signed certificate ends up with attributes in a different order from the Subject name in the parent CA certificate.

For instance, my CA had:

Subject: C = PT, ST = Testing, O = Critical TechWorks, OU = Chronos Team, CN = Test-Signing-CA

while the signed certificate ended up with:

Issuer: CN = Test-Signing-CA, C = PT, ST = Testing, OU = Chronos Team, O = Critical TechWorks

This causes the MoCOCrW itself to fail to validate the certificate it just signed (as well as openssl command line), and the sanity check inside function CertificateAuthority::_signCSR() throws an mococrw::MoCOCrWException with the error:

what(): Certificate creation failed: the generated certificate is invalid: unable to get local issuer certificate

Cannot compile with OpenSSL 1.1.0l

Hello!
I'm trying to compile this library in a docker image with OpenSSL at version 1.1.0l, but when I start to compile the process fails immediately:

root@4cba3a1fe286:~# cmake -Bbuild -SMoCOCrW -DBUILD_TESTING=Off                       
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.0l")  
-- Using OpenSSL 1.1.0l
-- Found Boost: /usr/include (found version "1.62.0")  
-- Configuring done
-- Generating done
-- Build files have been written to: /root/build
root@4cba3a1fe286:~# cmake --build build
Scanning dependencies of target mococrw
[  4%] Building CXX object src/CMakeFiles/mococrw.dir/asn1time.cpp.o
In file included from /root/MoCOCrW/src/mococrw/asn1time.h:21:0,
                 from /root/MoCOCrW/src/asn1time.cpp:19:
/root/MoCOCrW/src/mococrw/openssl_wrap.h:1349:13: error: 'NID_ED448' was not declared in this scope
     Ed448 = NID_ED448,
             ^~~~~~~~~
/root/MoCOCrW/src/mococrw/openssl_wrap.h:1350:15: error: 'NID_ED25519' was not declared in this scope
     Ed25519 = NID_ED25519
               ^~~~~~~~~~~
src/CMakeFiles/mococrw.dir/build.make:79: recipe for target 'src/CMakeFiles/mococrw.dir/asn1time.cpp.o' failed
make[2]: *** [src/CMakeFiles/mococrw.dir/asn1time.cpp.o] Error 1
CMakeFiles/Makefile2:149: recipe for target 'src/CMakeFiles/mococrw.dir/all' failed
make[1]: *** [src/CMakeFiles/mococrw.dir/all] Error 2
Makefile:146: recipe for target 'all' failed
make: *** [all] Error 2

The branch I'm trying to compile is openssl1.1.

Can you help me?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.