I'm trying to create an exportable key set using aspnet regiis, here is the command I'm running:
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -pc "SampleKeys" -exp
But the response is the same as if the tool is given a command it doesn't recognise:
Administration utility (4.0.30319) to install and uninstall ASP.NET on the local machine.
Copyright (c) Microsoft Corporation. All rights reserved.
Followed by regular command-line help section
So I ommitted the -exp flag and just ran
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -pc "SampleKeys"
Which worked fine, but when I try to export the key using this command:
aspnet_regiis -px "SampleKeys" "C:\SampleKeys.xml" -pri
I get the following:
Exporting RSA Keys to file...
Key not valid for use in specified state.
Failed!
Has anyone had this problem before? I seemed to be able to do this without issue a few months ago. I've tried this on several machines and different .NET versions already and the same result is returned....
I don't know how but right after I posted this question I was able to create an exportable key set using the same command I used before:
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -pc "SampleKeys" -exp
Keys are importable on other machines and work as expected
Related
I'm trying to connect my firebase auth to an expo project.
I'm following the main docs of each library. I'm stucking on this step.
I'm not able in windows to exeute this command line openssl rand -base64 32 | openssl sha1 -c.
I've tried with the specific https://code.google.com/archive/p/openssl-for-windows/downloads but I don't know how to reproduce the same line.
Any help would be great, thanks in advance.
You need to install openssl. It is usually available on Linux (which I think that article might have been written for). There are some Windows binaries available at here. Alternatively, you could setup a WSL session, and run the command from there.
that is a linux command. Therefore a linux terminal is needed.
there are at least 2 ways to get this done
using virtual machine with ubuntu or some other operating system that uses a linux terminal aka shell (which I doubt you know about)
OR
installing a linux emulator (windows 8+ since it's from the windows store)
assuming you would prefer option 2, go to the windows store, search "Kali" and you will find an app called Kali. install it and if an error shows up, here's a nice video here that talks about solving that error and you would have a kali terminal on your windows computer (your command would work there)
I have entered the following command on my windows cql shell
set SSL_VERSION=TLSv1_2;
and got this error
No viable alternative at input 'set'([set]..)
Are you getting this error when you atemmpt to set the variable or upon launching the cqlsh cmd?
Please ensure you have the two following variables set, where SSL_CERTFILE references a trusted root ca bundle. This is the trusted root bundle from an OpenSSL install on Ubuntu.
export SSL_VERSION=TLSv1_2
export SSL_CERTFILE=/usr/lib/ssl/certs/ca-certificates.crt
Optionally, you can use: export SSL_VALIDATE=true should there be any concerns with the certificate.
In windows, you use set instead of export.
Use export in place of set. Export is used for Linux and Serbia used for windows
I am trying to execute a simple db2 command in Linux command prompt. but Linux command prompt is not recognizing the command it is giving - bash db2 command not found. but db2 is installed in the Linux machine.
command I am trying to execute from Linux command line processor is db2 "create database smaple"
Error I am getting is below "If db2 in not a typo you can run the following command to lookup the package that contains the binary" command-not-found db2 -bash: db2: command not found"
Is this because of environment variable problem ?? or there is only one instance of db2 ie db2inst1 is running in the machine.my user name in appsusr and db2 instance name is db2inst1 are different is this causing problem?? and I am not having super user access.Is this is causing any problem?? do I need super user access is required ??
Just type, echo $PATH in your command prompt , where you can see all the exported paths in your system.
If the db2 path is not found in your environment variable list, then do the following.
export PATH=$PATH:/opt/IBM/db2/V10.1/bin
and then press enter.
I hope this will resolve your issue.
On Linux and UNIX DB2 platforms, the proper way to set your environment variables to run DB2 commands is to source the sqllib/db2profile script belonging to the local DB2 instance owner. That will set not only your PATH but also other important variables that DB2 requires.
In your case, the instance is owned by the db2inst1 user, so your login startup file or batch script should run this command:
. ~db2inst1/sqllib/db2profile
The leading dot is necessary to set the variables in your current shell process, not the sub-process that quickly vanishes after db2profile finishes.
It's more than likely that, if DB2 is installed, it's simply not in your path.
Your path should contain something like:
/opt/IBM/db2/V10.1/bin
which is where the executables live (depending on which version you're running).
Changing your path will probably entail changes to one of the startup files, such as .bashrc or .bash_profile.
Can anybody advice me what I need to do in order to open ciphered (http://sqlcipher.net/) database in command line.
When I try to do something with it like watch schema it response with following message
sqlite> .schema
Error: file is encrypted or is not a database
I know password for db, I just want to figure out steps how to correctly open it. My OS is Ubuntu 11.10
Finally I managed to do that, in case if somebody need it, here is my steps:
I've started from http://sqlcipher.net/introduction/ & downloaded sqlcipher.
The first problem was for me that I was unable to configure and build it from source because I have no libcrypto.a which is part of openssl crypto libraries.
I've installed it apt-get install libssl-dev
Then I successfully configured sqlcipher running
$./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
$make
after that executable sqlite3 file was created and I was able to open ciphered database.
To provide a password you should execute following statement.
PRAGMA key='password'
I downloaded the binaries for windos for sqlite and extracted them. There were three files
a shell
dll
analyzer
when I try to run to create a database and a table from the sqlite shell i get....
SQLite version 3.7.8 2011-09-19 14:49:19
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> sqlite3 test.db
...> create table tbl1(one varchar(10), two smallint);
Error: near "sqlite3": syntax error
sqlite>
when I try to run to create a database and a table from the command line(Vista) shell I get....
Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
C:\Users\codenamejupiterx>sqlite3 test.db
'sqlite3' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\codenamejupiterx>
does anyone have any ideas?????
There is no "installation".
The error is that "sqlite3.exe" was not found in the search path as defined by the (Windows) PATH environment variable. Either add it to %PATH% (see How do I set or change the PATH system variable?) or use a complete file qualification that does not rely on %PATH%. A fully qualified invocation may look like:
C:\path\to\sqlite\sqlite3.exe test.db
Running sqlite3 by "double clicking" the executable in Windows Explorer is the same as above [as it uses an absolute path to run the sqlite3 executable] -- albeit without the ability to specify the database name or other options. (These can be specified in a "shortcut" to sqlite3, if desired.)
Happy coding.
You run the command sqlite3 test.db to start the sqlite shell. (your first example) From in there, you do not need that part of the command again, just issue the "create table " command.
I think you need this:
SQLite-1.0.66.0-setup.exe And sqliteadmin to open sqlite database
Regards