Retrieving SecretKey data using SunPKCS11 with HSM
I need to create a symmetric key in the HSM that can be read completely in Java code. This key is going to be the source for Password-based encryption and hence the need for reading the bytes of the key.
I am using a Safenet HSM with a LunaSA client on windows with the SunPKCS11 provider in JDK to connect to the HSM. Per different documentation that I have read one needs to set CKA_SENSITIVE to false and CKA_EXTRACTABLE to true for the key data to be readable.
I have tried setting these attributes in the PKCS11 config file but I keep getting CKR_ATTRIBUTE_VALUE_INVALID when I use keytool to create the key -
attributes(*,CKO_SECRET_KEY,*) =
CKA_EXTRACTABLE = true
CKA_SENSITIVE = false
Here's the command I issue -
keytool -v -keystore NONE -storetype PKCS11 -providerClass sun.security.pkcs11.SunPKCS11 -providerArg pkcs11.cfg -genseckey -alias MY_COMMONKEY -keyalg DESede -keysize 128
And here is the error I get -
keytool error: java.security.ProviderException: Could not generate key java.security.ProviderException:
Could not generate key at sun.security.pkcs11.P11KeyGenerator.engineGenerateKey(P11KeyGenerator.java:260)
at
javax.crypto.KeyGenerator.generateKey(DashoA13*..)
at sun.security.tools.KeyTool.doGenSecretKey(KeyTool.java:1099)
at sun.security.tools.KeyTool.doCommands(KeyTool.java:792)
at sun.security.tools.KeyTool.run(KeyTool.java:172)
at sun.security.tools.KeyTool.main(KeyTool.java:166)
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_ATTRIBUTE_VALUE_INVALID
at sun.security.pkcs11.wrapper.PKCS11.C_GenerateKey(Native Method)
at sun.security.pkcs11.P11KeyGenerator.engineGenerateKey(P11KeyGenerator.java:255)
... 5 more
If I remove CKA_SENSITIVE from the attributes list the SecretKey generation works fine.
Any ideas what may be going on?
Hi,
Check wthr SAP_APPLICATION_STAT_COLLECTOR are running at os level also check SAPOSCOL. Every hour COLLECTOR_FOR_PERFORMANCE job and report RSCOLL00 aggregates this data into MONI table, there will be default size for this table(100MB)so make sure that it is enough memory for the data retention.
If every thing is fine then may be the Workload collector parameters are not configured properly.
[reports used|http://help.sap.com/saphelp_nw04/helpdata/en/51/84e93ad578f915e10000000a11402f/content.htm]
Rakesh
Similar Messages
-
Write / store xml data in Xe and retrieve stored data using pl/sql
Hi to all,
i'm searching a tutorial on:
A - how to write / store xml data in Xe and retrieve stored data using pl/sql
I don't want to use other technologies, because i use htmldb and my best practice is with pl/sql.
I was reading an ebook (quite old maybe) however it's about oracle 9 and it's talking about xmltype:
1 - I don't understand if this is a user type (clob/varchar) or it's integrated in Oracle 9 however i will read it (it's chapter 3 titled Using Oracle xmldb).
Please dont'reply here: i would be glad if someone can suggest me a good tutorial / pdf to achieve task A in Oracle XE.
ThanxThank you very much Carl,
However my fault is that i've not tried to create the table via sql plus.
Infact i was wrong thinking that oracle sql developer allows me to create an xmltype column via the create table tool.
however with a ddl script like the following the table was created successfully.
create table example1
keyvalue varchar2(10) primary key,
xmlcolumn xmltype
Thank you very much for your link.
Message was edited by:
Marcello Nocito -
Fetch data using structure with full working example
does any body tell me how to fetch data using structure with full working example
the structure name is RSTXT and the field is TXLINE
the data in the form of text is entered from the functional side using t-code ME52N
from there i have to fetch the data
in smartform or in reportusing this code to get text from ME52N this is a structure still not getting output
DATA:BEGIN OF TA_ROW occurs 0,
TXZ01(1000) TYPE C,
END OF TA_ROW.
DATA:BEGIN OF IT_ROW OCCURS 0,
TXZ01(1000) TYPE C,
END OF IT_ROW.
DATA: thread LIKE thead.
DATA: headerid TYPE char24.
DATA: it_text LIKE tline OCCURS 0 WITH HEADER LINE.
data:wa_banfn like eban-banfn.
thread-tdid = 'B01'.
thread-tdname = headerid.
thread-tdobject = 'EBAN'.
select txz01 from eban into corresponding fields of table ta_row
where banfn = wa_banfn.
headerid = ' '.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id = thread-tdid
language = sy-langu
name = thread-tdname
object = thread-tdobject
ARCHIVE_HANDLE
= 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
lines = it_text
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
LOOP AT it_text.
CLEAR ta_row.
BREAK-POINT.
FROM THIS POINT TEXT IS COMING
ta_row-txz01 = it_text-tdline.
APPEND ta_row TO it_row.
ENDLOOP. -
Function Module to retrieve appraisal data using a Document ID (GUID)
Hi,
Is there a function module to retrieve appraisal data of a document using the document ID (GUID). The new Document ID is of 32 char length. I am working on version 4.7 110.
Edited by: Beril PC on Jul 16, 2008 8:01 AMcheck for functiona modules starting with phap* or hap*
Regards,
Divya -
Can we create TDMS file using C# and retrieve the data using a diadem
I want to write a tdms file from a dot net application and to use the diadem to retrieve the data and to create a user defined report
Hello,
If you want this kind of output, you can use Java Mapping e.g
1. Create your data type like this:
CHARSET 0..1
LOADMODE 0..1
CODEFORMAT 0..1
CURRENCY 0..1
SUPPLIERID_DOMAIN 0..1
ITEMCOUNT 0..1
TIMESTAMP 0..1
UNUOM 0..1
COMMENTS 0..1
FIELDNAMES 0..1
DATA 0..unbounded
ENDOFDATA
2.In your message mapping assign all the constants. You might want to concat all the values of the FIELDNAMES and output them to DATA
3.In your Java Mapping, replace all the XML fields including ,, with ,''',
4.In ID, do not use FCC.
Hope this helps,
Mark -
My iphone 4 is broken due to water damage.
I'm considering purchasing a cheap iphone until my upgrade.
If I bought and iphone 3gs would I be able to retrieve the date from my icloud (contacts etc) for the 3gs?
Thanks
SarahTo access iCloud all your iPhone needs is iOS 5 or later and an Internet connection, either via cell service or WiFi. Then just set up iCloud with the same Apple ID and password you've been using on your iPhone 4.
You might want to consider just getting your iPhone 4 replaced by Apple. Based on the prices I've seen for iPhone 3GS units, Apple's replacement price isn't that much more, and you'll be certain of getting a working, non-hacked iPhone. Apple's replacement price for the iPhone 4 is US $149.
http://www.apple.com/support/iphone/service/faq/
Regards. -
Unable to insert and retrieve Unicode data using Microsoft OLE DB Provider
Hi,
I have an ASP.NET web application that uses OLEDB connection to Oracle database.
Database: Oracle 11g
Provider: MSDAORA
ConnectionString: "Provider=MSDAORA;Data Source=localhost;User ID=system; Password=oracle;*convertNcharLiterals*=true;"
When I use SQL Develeoper client and add convertNcharLiterals=true; in sqldeveloper.conf then I am able to store and retrieve Unicode data.
The character sets are as follows:
Database character set is: WE8MSWIN1252
National Language character set: AL16UTF16
Select * from nls_database_parameters where parameter in ('NLS_CHARACTERSET','NLS_LENGTH_SEMANTICS','NLS_NCHAR_CHARACTERSET');
PARAMETER VALUE ---------------------------------------
NLS_CHARACTERSET WE8MSWIN1252
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CHARACTERSET AL16UTF16
I have a test table:
desc TestingUni
Name Null Type
UNI1 VARCHAR2(20)
UNI2 VARCHAR2(20)
UNI3 NVARCHAR2(20)
I execute the below mentioned query from a System.OleDb.OleDbCommand object.
Insert into TestingUni(UNI3 ) values(N'汉语漢語');
BUT when retrieving the same I get question marks (¿¿¿¿) instead of the Chinese characters (汉语漢語)
Is there any way to add the above property(convertNcharLiterals) when querying the Oracle database from OLEDB connection?
OR is there any other provider for Oracle which would help me solve my problem?
OR any other help regarding this?
Thanksusing OraOLEDB Provider.
set the environment variable ORA_NCHAR_LITERAL_REPLACE to TRUE. Doing so transparently replaces the n' internally and preserves the text literal for SQL processing.
http://docs.oracle.com/cd/B28359_01/server.111/b28286/sql_elements003.htm#i42617 -
Moving Large amount of data using IMPDP with network link
Hi Guru,
Here we are having a requirement to move 2TB of data from production to non-prod using Network_link parameter. What is the process to make it fast.
Previously we did it but it took 7 days for importing data and index .
Here i am having an idea can you please guide me is it good to make import faster .
Step 1) import only metadata .
Step 2) import only table data using table_exists_action=append or truncate.( Here indexes are allready created in step 1 and import will be fast as per my plan.)
Please help me the better way if we can.
Thanks & Regards,
Venkata Poorna Prasad.SYou might want to check these as well:
DataPump Import (IMPDP) Over NETWORK_LINK Is Sometimes Very Slow (Doc ID 1439691.1)
DataPump Import Via NETWORK_LINK Is Slow With CURSOR_SHARING=FORCE (Doc ID 421441.1)
Performance Problems When Transferring LOBs Using IMPDP With NETWORK_LINK (Doc ID 1488229.1) -
How to read azure storage data using JAVA with REST API
Hi,
We have a cloud service in our lab. We have enabled diagnostics
in cloud services. So WADPerformanceCounterTable was created in storage account. Now , We want to read the WADPerformanceTable using
JAVA with REST API. Is there any way to collect these details. please give me any
sample code to connect azure storage using table service REST API.
Thanks & Regards
RathideviHi,
Please have a look at this article:
https://convective.wordpress.com/2010/08/18/examples-of-the-windows-azure-storage-services-rest-api/, it demonstrate how to use table service Rest API, it also give us the code, hope this helps. Of course, the
MSDN article could also help us coding.
Best Regards,
Jambor
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to transfer data using Lsmw with Recording...
hi,
Please let me know .How to use Lsmw to transfer data using recording.
Thanks,
Lawrence.Hi Lawrence,
please go thru this link for LSMW data transfer techniques in PM, MM and SD modules.
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90d90895-68dd-2a10-f096-bf8cf2e2f65b
If u want to know in detail go thru this link
http://help.sap.com/saphelp_nw04s/helpdata/en/87/f3ae74e68111d1b3ff006094b944c8/frameset.htm
Hope this will be useful to u..
Thanks
Vijayasree -
Addon disconnected while retrieving huge data using orecordset on client
Hi,
My addon is using orecordset to retrieve about 11000 records on client pc and the addon disconnected while processing half way. When I trace the error, it seems like when the server fetches the records back to client pc, the addon disconnected. However, it's run perfectly on the server.
This addon has another function that fetches a small records using orecordset and it's working fine on the client pc.
Is there a limitation of using orecordset to fetch huge volume of data?
Appreciate if anyone could help.
Regards,
CherineHi,
My sdk is used to do GL Consolidation. What it does is to extract journal entries from other company and do some calculation and store the data in UDT. This sdk is installed on the holding company. I use ocompany.connect to connect to other company and once it is connected I will execute a query to extract the journal entries from this company back to my holding company and store the data in UDT.
The addon stop half way while retrieving journal entries due to large volume of data.
The connection to other company is as below:-
With oSubCompany
.Server = oCompany.Server
.CompanyDB = DbName
.UseTrusted = False
.UserName = Login
.Password = Password
.DbUserName = DBLogin
.DbPassword = DBPwd
If SQLVer = "MSSQL2005" Then
.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2005
Else
.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL
End If
If .Connect <> 0 Then
.GetLastError(ErrCode, ErrMsg)
Throw New ApplicationException("Failed to connect to Source Company: " )
End If
End With
The query is as below:-
select j.transid, j.transtype, j1.baseref, j.memo, j.refdate, j.number, n1.seriesname, j1.line_id, j1.account, j1.debit, j1.credit, j1.profitcode, a.acctname, a.formatcode, a.u_acquisition,
Replace((Case When a.U_ConsolAcct = '*' Then a.FormatCode Else a.U_ConsolAcct End),'-','') As 'ConsolAcct', (Case When a.groupmask < 4 Then 'BS' Else 'PL' End) As 'AcctTyp'
from OJDT j left join JDT1 j1 on j.transid = j1.transid
left join nnm1 n1 on n1.objectcode = 30 and n1.series = j.series
left join oact a on a.acctcode = j1.account
where j.refdate >= oSubRecordset1.Fields.Item("f_refdate").Value
and j.refdate <= oSubRecordset1.Fields.Item("t_refdate").Value
and isnull(a.u_acquisition,'') <> 'Y'"
oSubRecordset.DoQuery(sQuery)
I just wander whether is it disconnected due to the connection to other company got disconnected or oRecordset disconnected after sometimes.
For 2005A SP20, do we still use com object? How and where to set the time out value?
Regards,
Cherine -
Sending and retrieving blob data using JSP
I need to upload images to a database through a web page (jsp)
and then display them.
Environment is tomcat + mysql.
Anyone know a good site that explains
how to work with blobs through JSP?
thanks for any help!hello Sir,
I have to make a Image Library.
What I have done is I am just stroing the Image Path into the path
and retrieving the path from the database.
But now I am asked to Store the Image in the Database..
Could U Please tell me at the time of retrieving the Image
what exactly I have to do..
I am just 1 month new to JSP...(Practically)
Could U please write me the Code for Converting the BINARY Data into
InputStream ...
or what exactlt I have to do..
Please Guide me man..
Thanks In Advance...
With Regards
Eklavya -
How to retrieve latest date column comparing with rest of the date columns ??
Hi Friends,
I have 6 Date columns (some of col has Null data) I need to compare all 6 columns date, how can I produce recent date to
new Column! can you please help me Tsql Code or Function.
Thanks for advance.Hej
create table datetest(id int,date1 datetime,date2 datetime,date3 datetime,date4 datetime)
insert into datetest values(1,GETDATE(),GETDATE()-1,GETDATE()-2,GETDATE()-3)
go
SELECT MAX(date_columns) AS max_dateFROM ( (SELECT date1 AS date_columns FROM datetest ) UNION ( SELECT date2 AS date_columns FROM datetest ) UNION ( SELECT date3 AS date_columns FROM datetest ) UNION ( SELECT date4 AS date_columns FROM datetest ) ) AS date_query -
Can I still retrieve my data in iPhone 4s stuck in DFU mode?
My iPhone 4s was suddenly ended in DFU loop. I already talked to Apple store and their only solution is to replace another new one for me. However, I still have a lot of information and photo in that phone which I didn't backup, so I hope I can retrieve the data using some softwares. Unforturnately nothing worked so far: Dr.Fone, TinyUmbrella, Recboot, etc. Here comes fundamental question: Can I still retrieve/access data in iPhone 4s that is stuck in DFU mode (with device ID: 0x1227)? If yes, which tool can help me?
Thanks
TomRe: Can "unknown error 21" be fixed ?? (iphone 4)
-
hi,
i am new for bapi , can anyone tell me how to upload data using bapi with example?
plz tell how to find bapi & how to use in coding to upload the data?Hi ,
To find Bapi There a tcode Bapi which will take you to bapi Explorer From there you can find required
the Bapi Function Module and its Documentation .
[ www.sap-img.com/abap/bapi-step-by-step-guidance.htm ]
[http://www.sappro.com/tag.cfm?session=&tag=bapi%20programming]
[https://wiki.sdn.sap.com/wiki/display/Snippets/SalesordercreationusingBAPI]
Regards
Nilesh
Maybe you are looking for
-
Mystery: Error while making pdf in Illustrator
Hi, I'm experiencing a really weird problem with Illustrator lately... When I'm at work in the office and my laptop is on its docking station everything works perfectly, but if I take the laptop of its docking station, Illustrator refuses to work wit
-
Images Rotated 90 Degrees on prints
i am having this issue with the Apple version of Adobe Illustrator CS3. We just got a new printer (Sharp MX-3501N) and it has a Fiery 2 print server on it. When i print illustrator documents to it, the first page comes out great. Comes out landscape
-
Is iTunes "Sound Check" better than five years ago?
I got into iTunes (briefly) about five years ago. I got all excited about mixed playlists and what-all ... but I burned out quickly because the Sound Check feature that would regulate the volumes from different CDs was mostly worthless. Most songs
-
Expdp only export tables without having to exclude everything else
Hi all, I want to export only tables from certain accounts. No indexes, sequences, procedures, packages etc. Is there a way to just tell expdp the schemaname and then make it to only export the specified users' tables (including contents)? Without ex
-
Hi Does any one in the group installed OBIEE on AIX environment. We need some serious help from you as we are facing so many issues while installing OBI on AIX. I got an idea that 1st we need to install it on Windows and then Unix box, and need to co