A Bhattacharya

Ranch Hand
+ Follow
since Oct 22, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by A Bhattacharya

I knew nobody will help.
The goddammed api I used will only work with DER format it seems, not PEM.
13 years ago
Goddammit, the p7b file was actually found to be different on both the machines, I had missed it before by oversight.
However the p7b file on the problematic machine is openable by doubleclicking it and I'm able to view the certificate in it. I'm pasting the file contents below, as this website doesn't allow file with any extension at all to be uploaded. Can anyone tell me why it can't be read using the Java Apis, before I shoot myself?

-----BEGIN CERTIFICATE-----
MIIE5gYJKoZIhvcNAQcCoIIE1zCCBNMCAQExADALBgkqhkiG9w0BBwGgggS7MIIE
tzCCA5+gAwIBAgIQcKib9zN6/oxP+/AVKmDplDANBgkqhkiG9w0BAQUFADBnMRMw
EQYKCZImiZPyLGQBGRYDY29tMRUwEwYKCZImiZPyLGQBGRYFYXJjb3QxGDAWBgoJ
kiaJk/IsZAEZFghibmdhbG9yZTESMBAGCgmSJomT8ixkARkWAmNhMQswCQYDVQQD
EwJDQTAeFw0xMDA2MTkwMjA2MzNaFw0yMDA2MTkwMjE0MzhaMGcxEzARBgoJkiaJ
k/IsZAEZFgNjb20xFTATBgoJkiaJk/IsZAEZFgVhcmNvdDEYMBYGCgmSJomT8ixk
ARkWCGJuZ2Fsb3JlMRIwEAYKCZImiZPyLGQBGRYCY2ExCzAJBgNVBAMTAkNBMIIB
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuTkotLHs68q5YoUHBQv0D/ZA
bw1wtYBkNwdLDraurswR5LX8iPulMO2x6zjM3CXxIvxSzPIFhdxcZG2OfP4cUbsY
3i/drrslsarMQM+CtVApDAAqSdkxV8RZTtlEvYAR4qkOB3EtfvWnFo1JreffGn+I
W2+O9bVkkQbn2NWxTi40XifHqNqMt7jIz2QZslrz4eM6EZGvrt/xCCrc258OpKkf
s5e/gyARCHtgNnyTpP+E4oV1ExyuKsuMRkNxB+x/l5g0woEFflfcBJEBklMcR8Rm
SHqavV1VpBrNN0YI3sVB+xxpzDDPOwUKqmoWUqjH08GBcuIC5grWmNztaCZGPwID
AQABo4IBXTCCAVkwCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O
BBYEFOTK+zX56qT90RqQ7hFhfIxLOK4mMIIBBgYDVR0fBIH+MIH7MIH4oIH1oIHy
hoG4bGRhcDovLy9DTj1DQSxDTj13MmszY2EsQ049Q0RQLENOPVB1YmxpYyUyMEtl
eSUyMFNlcnZpY2VzLENOPVNlcnZpY2VzLENOPUNvbmZpZ3VyYXRpb24sREM9Y2Es
REM9Ym5nYWxvcmUsREM9YXJjb3QsREM9Y29tP2NlcnRpZmljYXRlUmV2b2NhdGlv
bkxpc3Q/YmFzZT9vYmplY3RDbGFzcz1jUkxEaXN0cmlidXRpb25Qb2ludIY1aHR0
cDovL3cyazNjYS5jYS5ibmdhbG9yZS5hcmNvdC5jb20vQ2VydEVucm9sbC9DQS5j
cmwwEAYJKwYBBAGCNxUBBAMCAQAwDQYJKoZIhvcNAQEFBQADggEBADPNjL73hrrd
Q/0Vuaj1IdHm7+9LifSSDujd39A75WzGGDeczEuSypXymN2OncfJwJ4kIldcynKm
4liuU+plRknOOrq7Y+IHuTZbtM+5m2pdxSX7/ztLlcrRl6w6dK4haLnQ9ErJox/l
QjapZsv8VIwONS8YMgPJUutJD5I2nGLEzDbBN9DjsAa5zoa5jIme8YqIT+iYg9dF
33et55xXIzz3qpIgflKx4HBPO3H/HE7NgIFAyh2Kin/iopLrg0JTi63VeQvEwFpZ
PZ10iD1vrmQPbPRP7tAx56IYyIg0MjgshQTCLTC3mxyHN+L2ZLzgjEHDLJef22E+
Z6pC0C1zoLMxAA==
-----END CERTIFICATE-----
13 years ago
I even wrote a standalone program and I’m running even explicitly specifying the java.exe to use but I’m facing the same exception on that machine alone.

c:\jdk1.5.0_14\jre\bin\java.exe -classpath .;bcprov-jdk15-143.jar MSCAConfigurator

Exception in thread "main" java.security.cert.CertificateException: java.lang.IllegalArgumentException: sequence wrong size for a certificate

at org.bouncycastle.jce.provider.JDKX509CertificateFactory.engineGenerateCertificate(Unknown Source)

at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:271)

at MSCAConfigurator.main(MSCAConfigurator.java:31)

Caused by: java.lang.IllegalArgumentException: sequence wrong size for a certificate

at org.bouncycastle.asn1.x509.X509CertificateStructure.<init>(Unknown Source)

at org.bouncycastle.asn1.x509.X509CertificateStructure.getInstance(Unknown Source)

at org.bouncycastle.jce.provider.JDKX509CertificateFactory.readPEMCertificate(Unknown Source)



I have the unlimited strength policy jars present.



C:\jdk1.5.0_14\jre\lib\security>dir *.jar

Volume in drive C has no label.

Volume Serial Number is D214-CB94



Directory of C:\jdk1.5.0_14\jre\lib\security



09/13/2004 04:12 PM 2,486 local_policy.jar

09/13/2004 04:12 PM 2,472 US_export_policy.jar



What’s wrong with this machine? If it helps, it is a 64 bit machine but the java I’m using is 32 bit.

13 years ago
I tried to upload the screenshot from Eclipse debugging session for the CertificateFactory object and the X509CertificateObject read from the p7b file, but it is not getting uploaded, so here is what it had. The values looked similar in both the working and non-working setups.

For the certFactory object:

certFactory= CertificateFactory (id=82)

+ certFacSpi=JDKX509CertificateFactory (id=86)

+ provider= BouncyCastleProvider (id=89)

+ type= “X.509” (id=94)

java.security.cert.CertificateFactory@1e27046



And for the X509CertificateObject

Cert= X509CertificateObject (id=104)

+ attrCarrier= PKCS12BagAttributeCarrierImpl (id=110)

+ basicConstraints= BasicConstraints (id=112)

+ c= X509CertificateStructure (id=115)

hashValue= 0

hashValueSet= false

issuerX500Principal= null

+ keyUsage= (id=138)

subjectX500Principal= null

+ type=”X.509” (id=94)



[+] Version: 3

SerialNumber: 1165509368

IssuerDN: O=Identrus LLC,OU=Identrus Root Certificate

Start Date: …..

Final Date: ……..

SubjectDN: …………

Public Key: RSA Public Key

Modulus: ………….

Public exponent: 10001



Signature Algorithm: SHA1WithRSAEncryption

Signature: ……………………..

13 years ago
Hello

I’m trying to open a p7b file and read the CA certificates out of it. Below is my code. It works fine in one machine but in another machine the call to certFactory.generateCertificate throws exception

Error Message:java.lang.IllegalArgumentException: sequence wrong size for a certificate



On both machines I have the same p7b file, and the same bouncycastle jars. The machine where is works is a Windows Xp and the one where it doesn’t work is a Windows 2007 server machine. It is a 64 bit machine but I’m using the 32 bit jvm only.





Someone please help before I shoot myself.



Thanks

Bhattacharya.
13 years ago

Rajeev Masand wrote:Instead of *repeating* the *very same* act of job hopping, why don't you try to offset the situation by sticking with current company for little more time ? You are trying to do the same thing all over again ?



You are making job hopping sound like a sin, as do the employers who keep questioning why I changed jobs. They don't realize I don't have to explain and it is not their business. I have even changed job once because I started to wear wig on my bald head and didn't want to be found out.
13 years ago
I'm looking for a job change but nobody is willing to hire me due to my past history of frequent job hopping. I'd like to reapply to some companies I applied to over a year ago, but with job experiences "combined" into a fewer number of companies. I'm worried if they would cross check against a stored resume in their database. Do they store them forever or delete them after a year? I think most big companies in India use some resume management software so I'm hoping this software would delete older resumes as time goes by.
13 years ago



I have the above code that pushes a html attachment to response stream. This results in the browser asking whether to open or save the file, and if we choose open, it opens in the same window and thus the form disappears. How to make it open in a pop up window or new tab so that the form is intact?
13 years ago
While submitting a form the text in the textarea doesn’t get submitted as it is not the “value” of the textarea. So how to accomplish it?

FYI this is how I tried but null gets submitted to the controller.




It is surprising I don’t find a single help about this on the internet.

Its been 2.5 months with the company. Yes, I have decided to leave the company. I'm happy that he provoked me, as I'm now free to leave the job I joined so unwillingly. Probably I will go back to my previous company if they hire me back.
13 years ago
Please understand we should not look at this incident in isolation, but in view of the expectations set by them at the time of hiring. Entitlement mentality? Yes. I was in a great dilemma when I was offered this job, whether or not to accept, because they don't have many of the facilities and freedom my previous employer had - work from home, breakfast at company cafeteria, gym at the office, internet expenses reimbursable (outside the pay package). But I finally accepted the offer because the job consultant, the HR, and also one of the employee I talked to created such a great image about the company, that the career growth will be excellent, that the promotions will be fair, and all. Few days after accepting the offer I had a change of heart, because rational thinking is something, inclination of the heart is something else. Still I did not renege from joining, just to keep my word, it was a difficult sacrifice to make.
But the kind of work has been mediocre at best, and there is hardly any work really, completely different from the "lot of exciting work is there" promises made to me, even after I joined. Another guy joined in the team soon after me, and we both are to fill the single position a previous person was occupying. It has become increasingly apparant to me that they didn't expect both of us guys to join, and there is hardly enough work to occupy one person's time. That also makes my old knight's way of keeping my word afterall undeserving for these people.
If there was enough exciting work, where will be the time to micro manage a document, sending back & forth emails on that, even after I said to him the feature itself was complete and ready for him to see? What about the great career growth promises made? Won't I be a fool to believe that this person who has already lied so much, and micro-managing will be fair in promotions? It is clear that he wants to stretch time by making people spend time of trivia, because he knows there is nothing else to assign. In my previous jobs, I have seen managers focus only on the content. For trivia like styling issues, I have seen them do it themselves, because it takes far less time to do it than email someone and ask them to do, besides also not causing a show of arrogance. Heck, I have seen documents in big companies shared across inter-country teams that have lots of spelling and grammar mistakes, and nobody's productivity was lessened.
13 years ago
At the time of interviewing for the job, they had created great expectations - that the career growth is awe-awesome at the place, that the work environment is excellent. But I find my manager is micro-managing - Before starting on a new feature, he asked me to write up a design document. I did, and he suggested some changes, which I did and emailed him. No hassles about that. He had provided some comments (using microsoft word features) which I had not removed. After that he wrote back "There is no title for the document. Please provide one. Remove my comments wherever you have accepted them. Also it doesn't look like you have proof read the document before sending it out."
I felt ridiculous, no manager in my previous jobs has put so much emphasis on such trivia (which he could correct himself if he wanted, without sending back and forth emails). I have known from my long list of previous jobs, to spot red flags, for example if a manager puts too much emphasis on "coding neatly" by having so many whitespaces at the start of each line, it is almost certain that he can't be relied upon to be able to judge more important issues, and is usually ethically retarded, ie he will be a suc*er placing too much emphasis on processes rather than results. Nobody bullies me like that, so I ignored his email and just started working on the feature. Two days later, I emailed him saying the feature is complete and he can check it. But he did not reply one whole day, and then replied saying, "Where is the documentation I asked?". I replied back saying "Where are we uploading the document? I don't want to spend time styling a document that only you look at." . He then uploaded the documents at a intranet site and said he had indeed meant to upload it for others to read (which he did not until I questioned). Even if that was his intention, he could himself have done the cosmetic changes (the content was fine) instead of showing off his authority over me. Anyway, I feel the bridge is broken, you see?
I have authority issues and don't take bullshit well. I could otherwise tolerate his controlling behaviour, but in the light of the fact that I was promised excellent career growth and all, I don't see how a person so micro-managing can do well about the bigger issues and be helpful in my career. He just comes across as an insecure wuss who needs to show off his power over his subordinates. Either that, or he is trying to cover up the fact that there is no work at all to assign to his subordinates, so he wants them to keep themselves busy doing just something. In which case also (which is atleast partly true) there is no chance of career growth.
Shouldn't I leave the job already?
13 years ago
Every employee is I see is literally plundering the company's money. Not one person works 40 hour work week even though they are called full-time employees. Flexible-time policy is horrendously abused, most employees hardly put in 1 hour of fully productive work per day. They only come to eat, talk,day-dream and browse the internet for personal use. The managers are the pioneers of this plundering, stupid idiots whose only work is to ask for estimates, and keep asking for it, and they only estimate based on 5 hour work per day. And noone cares if the work has been overestimated, which I see happens all the time, and the complacent employees take full advantage of it and estimate time several times more than it would require if done sincerely. I feel sick to my throat all the the time surrounded by thieves.
How can a company be so stupidly throw away money like it is running a charity and not business? About half the problem would be solved and much money would be saved if the managers are all fired.
Assembly workers are much more productive.
14 years ago