Coder Social home page Coder Social logo

Comments (6)

cedrozor avatar cedrozor commented on September 27, 2024

Hi,

The CERTENROLLLib COM object is referenced under "Myrtille.Common" project (there) and is used by the installer to create a self-signed certificate.

After looking a bit, I found that : http://stackoverflow.com/questions/11421502/asp-net-certenroll-cx509certificaterequestpkcs10-exception

Since in Win2008 R2 Microsoft overwrote the interface, if the code is written in Win2008 R2 the run time is looking for the new interface GUID and in regular Win2008 it can't be found because Win2008 R2 interface GUID differs from Win2008 interface Guid.
So, object can't be created, and as the result exception is thrown.
Accessing the interface by ProgID solves the issue.

I will try to update the code (CreateSelfSignedCertificate) as detailed there : http://stackoverflow.com/questions/33001983/issues-compiling-in-windows-10

...or I could also use another libs, such as Bouncy Castle, just like they did there: bertjohnson/OpaqueMail#45

Thanks for the report :)

from myrtille.

mak1311 avatar mak1311 commented on September 27, 2024

Thank you,

Work fine after remplacing :
var privateKey = new CX509PrivateKey();

by :
var privateKey = (IX509PrivateKey)Activator.CreateInstance(Type.GetTypeFromProgID("X509Enrollment.CX509PrivateKey"));

:-)

from myrtille.

cedrozor avatar cedrozor commented on September 27, 2024

Thanks, I will report it to the master branch :)

from myrtille.

cedrozor avatar cedrozor commented on September 27, 2024

This may occurs again on Windows 7 machines while the latest release (myrtille 1.8.0) because I moved to Visual Studio 2017 and Windows 10 as build environment; following the method indicated here: https://stackoverflow.com/a/39397121

from myrtille.

MrZakos avatar MrZakos commented on September 27, 2024

Hi ,
this error also occurs on Window Server 2012 R2 with the latest release 1.8.0 , please fix

from myrtille.

cedrozor avatar cedrozor commented on September 27, 2024

Fixed into 1.8.1

Tested successfully under Windows 10, Windows 7, Windows Server 2016 and Windows Server 2012 R2

from myrtille.

Related Issues (20)

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.