ACMESharp Invalid URI: The URI scheme is not valid - powershell

I have a script created to automate the process of generating Let's Encrypt certificates for my websites.
The Script always worked fine, but starting yesterday I am receiving the issue below when I try to run:
New-ACMERegistration -Contacts mailto:user#email.com -AcceptTos
Error:
System.UriFormatException: Invalid URI: The URI scheme is not valid.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at ACMESharp.AcmeClient.GetDirectory(Boolean saveRelative) in
C:\projects\acmesharp\ACMESharp\ACMESharp\AcmeClient.cs:line 145
at ACMESharp.POSH.NewRegistration.ProcessRecord() in
C:\projects\acmesharp\ACMESharp\ACMESharp.POSH\NewRegistration.cs:line 63
at System.Management.Automation.CommandProcessor.ProcessRecord()
I have the latest version of th PowerShell module installed (https://www.powershellgallery.com/packages/ACMESharp/0.9.1.326).
Has anybody stumbled on a similar issue?

An error is thrown because the BaseUri: https://acme-v01.api.letsencrypt.org/directory returns a JSON Error. ACME Protocol Version 1 has been deprecated. You will need to use a client that uses ACME Protocol Version 2.
Consider replacing ACMESharp with ACME-PS.

Related

Vertx Form Login Handler with Postgresql Failure

I am trying to authenticate user using FormLoginHandler and Postgresql Database with SqlAuthentication.
But I get the following error:
Jun 15, 2022 1:14:34 PM io.vertx.ext.web.RoutingContext
SEVERE: Unhandled exception in router
io.vertx.ext.web.handler.HttpException: Unauthorized
Caused by: io.vertx.core.impl.NoStackTraceThrowable: Invalid username/password
I am providing the right credentials.
The code snippet is:
SqlAuthenticationOptions sauthopts = new SqlAuthenticationOptions();
sauthopts.setAuthenticationQuery(AUTHENTICATE_QUERY);
SqlAuthentication authenticationProvider = SqlAuthentication.create(sqlClient, sauthopts);
router.route("/secure/*").handler(RedirectAuthHandler.create(authenticationProvider, "/login.html"));
FormLoginHandler formLoginHandler = FormLoginHandler.create(authenticationProvider);
router.route("/loginhandler").handler(formLoginHandler);
Please let me know if I am missing something here; or point me to a sample example.
Thanks in Advance.
Your setup doesn't show anything abnormal at first sight. For security reasons, we cannot "just" log the authentication data, as it would be a critical OWASP bug and security vulnerability.
My best guess is that probably is something not totally correct with the query, so this means you have now 2 options:
debug the application and see the query that is being sent + the arguments
prepare a small complete example that shows the bug and open an issue in vert.x so we can debug it further.
If you're upgrading from an older version, be aware that in vert.x 4.2.0 some changes were made to the base64 encoding to keep it consistent across modules. This could be a reason why authentication could fail as the encoded hashes may be slightly different. If you're just doing 4.3.0 from the start, then this would not be a problem.

Parse error generating server stub with openapitools/openapi-generator-cli using OAS 3.0

I am trying to generate server code using openapitools/openapi-generator-cli which I installed globally using NPM.
When I run the command:
openapi-generator generate -i MyApi.yaml -g aspnetcore -o ./src
I get the following error:
[main] ERROR i.s.parser.SwaggerCompatConverter - failed to read resource listing
com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'openapi': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
I have also tried converting my spec file to json and encountered the same error.
How can I resolve this error with parsing the yaml file?
I ran my spec file through the online editor at http://editor.swagger.io/ and found an error in my yaml (I forgot to add a parameter entry for a path with a parameter in the path). Once I fixed the error, the generator worked correctly.
So this was user error, though the error message could be better.

Protocol error when using Net:SSH:Perl module

I have a script that uses Net::SSH:Perl module. It is able to ssh to RHEL6.9 hosts but not RHEL7.4 hosts. I get the following error:
Protocol error: expected packet type 91, got 80 at /Net/SSH/Perl/Packet.pm line 221
How do I remedy this?
A simple search for the error message gives this post from 2016 and this bug report from 2016 which both indicate that the issue was fixed in version 2.01 of the module, released in 10/2016. Thus, you are probably using an older version and need to upgrade.

Crowdin error when I tried to upload translations

I've an issue (I'm still blocked), I've created my configuration file like :
project_identifier: test
api_key: KeepTheAPIkeySecret
base_url: https://api.crowdin.com
base_path: /path/to/your/project
files:
-
source: /locale/en/LC_MESSAGES/messages.po
translation: /locale/%two_letters_code%/LC_MESSAGES/%original_file_name%
See : https://github.com/crowdin/crowdin-cli
However, I received an error message when I execute my command line to upload translation in Crowdin :
error: Seems Crowdin server API URL is not valid.
Please check the `base_url` parameter in the configuration file.
I don't know why it's not working!Thanks for any help !
Crowdin sent me another JAR,
The last one was not good for windows path.

rampart encryption error when execute WSO2 sample 100 (a WS-Security sample)

My WSO2-ESB throws following error message when I execute WSO2 sample 100 (a WS-Security sample), http://wso2.org/project/esb/java/4.0.3/docs/samples/qos_mediation_samples.html):
ERROR - Axis2Sender Unexpected error during sending message out org.apache.axis2.AxisFault: Error in encryption
At org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:117)
....
org.apache.xml.security.encryption.XMLEncryptionException: Illegal key size or default parameters
And my WSO2-AS throws:
ERROR {org.apache.axis2.engine.AxisEngine} - Missing wsse:Security header in request org.apache.axis2.AxisFault: Missing wsse:Security header in request
What is "Illegal key size or default parameters" means? How to fix this error?
BTW, I am using JDK 1.6 which has included the JCE API and local_policy.jar, US_export_policy.jar, et al. So, I guess it isn't a JCE problem. (http://wso2.org/node/2520/print)
You may have to patch local_policy.jar and US_export_policy.jar which are relevant to your jdk version.
Please refer http://blog.rampartfaq.com/2009/08/faq-001-javasecurityinvalidkeyexception.html
--
Thilini
Type in cmd: java -version, check whether this version is equal to the version displayed at the startup of wso2.
If these versions were not equal, modify your path and put %JAVA_HOME%\bin before %SystemRoot%\system32.